I'm all of a sudden getting: Jun 29 18:08:20 2015 (8150) SHUNTING: 1435615060.9881611+e8abd6ef95261ff0597e9e286d119a4a74b80ef2 Jun 29 18:08:20 2015 (8150) Uncaught runner exception: 'module' object has no attribute 'rdatatype' Jun 29 18:08:20 2015 (8150) Traceback (most recent call last): File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 119, in _oneloop self._onefile(msg, msgdata) File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 190, in _onefile keepqueued = self._dispose(mlist, msg, msgdata) File "/usr/lib/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose more = self._dopipeline(mlist, msg, msgdata, pipeline) File "/usr/lib/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline sys.modules[modname].process(mlist, msg, msgdata) File "/usr/lib/mailman/Mailman/Handlers/SpamDetect.py", line 104, in process if Utils.IsDMARCProhibited(mlist, addr): File "/usr/lib/mailman/Mailman/Utils.py", line 1156, in IsDMARCProhibited txt_recs = resolver.query(dmarc_domain, dns.rdatatype.TXT) AttributeError: 'module' object has no attribute 'rdatatype'
on a reinstall after a CentOS Upgrade.
I've installed the latest dnspython (1.12.0), and not sure where else to look.
python 2.4.3
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
On 06/29/2015 03:16 PM, Larry Rosenman wrote:
I'm all of a sudden getting: Jun 29 18:08:20 2015 (8150) SHUNTING: 1435615060.9881611+e8abd6ef95261ff0597e9e286d119a4a74b80ef2 ... File "/usr/lib/mailman/Mailman/Handlers/SpamDetect.py", line 104, in process if Utils.IsDMARCProhibited(mlist, addr): File "/usr/lib/mailman/Mailman/Utils.py", line 1156, in IsDMARCProhibited txt_recs = resolver.query(dmarc_domain, dns.rdatatype.TXT) AttributeError: 'module' object has no attribute 'rdatatype'
on a reinstall after a CentOS Upgrade.
I've installed the latest dnspython (1.12.0), and not sure where else to look.
Did you restart Mailman after the dnspython install?
What if you invoke the Python that Mailman uses and do
import dns.resolver dns.rdatatype.TXT 16
Note that if you just
import dns
you will get the AttributeError upon reference to dns.rdatatype.TXT, but it should work after importing dns.resolver which Utils.py does.
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 2015-06-29 21:47, Mark Sapiro wrote:
On 06/29/2015 03:16 PM, Larry Rosenman wrote:
I'm all of a sudden getting: Jun 29 18:08:20 2015 (8150) SHUNTING: 1435615060.9881611+e8abd6ef95261ff0597e9e286d119a4a74b80ef2 ... File "/usr/lib/mailman/Mailman/Handlers/SpamDetect.py", line 104, in process if Utils.IsDMARCProhibited(mlist, addr): File "/usr/lib/mailman/Mailman/Utils.py", line 1156, in IsDMARCProhibited txt_recs = resolver.query(dmarc_domain, dns.rdatatype.TXT) AttributeError: 'module' object has no attribute 'rdatatype'
on a reinstall after a CentOS Upgrade.
I've installed the latest dnspython (1.12.0), and not sure where else to look.
Did you restart Mailman after the dnspython install? Yes.
What if you invoke the Python that Mailman uses and do
import dns.resolver dns.rdatatype.TXT 16
Note that if you just
import dns
you will get the AttributeError upon reference to dns.rdatatype.TXT, but it should work after importing dns.resolver which Utils.py does.
[root@gothamweb02 ~]# python Python 2.4.3 (#1, Jan 9 2013, 06:47:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import dns.resolver dns.rdatatype.TXT 16
[root@gothamweb02 ~]#
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
On 06/29/2015 07:51 PM, Larry Rosenman wrote:
[root@gothamweb02 ~]# python Python 2.4.3 (#1, Jan 9 2013, 06:47:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import dns.resolver dns.rdatatype.TXT 16
[root@gothamweb02 ~]#
Look at /usr/lib/mailman/Mailman/Utils.py. Near the beginning do you see
try: import dns.resolver from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
If not, what do you see for imports of 'dns' modules?
Also, how do you start Mailman. If via an init.d script what Python does it use (Note that a definition of PYTHON may be overridden by something imported from /etc/sysconfig).
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 06/29/2015 07:51 PM, Larry Rosenman wrote:
[root@gothamweb02 ~]# python Python 2.4.3 (#1, Jan 9 2013, 06:47:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import dns.resolver dns.rdatatype.TXT 16
[root@gothamweb02 ~]#
Look at /usr/lib/mailman/Mailman/Utils.py. Near the beginning do you see
try: import dns.resolver from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
If not, what do you see for imports of 'dns' modules?
Also, how do you start Mailman. If via an init.d script what Python does it use (Note that a definition of PYTHON may be overridden by something imported from /etc/sysconfig). Those lines ARE there:
On 2015-06-29 22:09, Mark Sapiro wrote: try: import dns.resolver from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
init.d script:
[root@gothamweb02 Mailman]# more /etc/init.d/mailman
#!/bin/sh
#
# mailman This shell script starts and stops GNU Mailman.
#
# Copyright (C) 2001-2003 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
#
# Copy this file to /etc/init.d/ (or /etc/rc.d/init.d/ depending on
# your system) and activate it as such:
#
# On Debian, type "update-rc.d mailman defaults"
# On RedHat, and derivatives, install with "chkconfig --add mailman"
#
# chkconfig: - 98 12
# description: Mailman is the GNU Mailing List Manager, a program that
# manages electronic mail discussion groups. For more
# on GNU Mailman see http://www.list.org
# processname: mailmanctl
# config: /usr/lib/mailman/Mailman/mm_cfg.py
# pidfile: /var/run/mailman/master-qrunner.pid
MAILMANHOME=/usr/lib/mailman MAILMANCTL=$MAILMANHOME/bin/mailmanctl
# We used to install the mailman cron jobs when the mailman rpm was # installed, irrespective of whether mailman was actually being # run. Although the cron jobs didn't create any problems if someone # wasn't running mailman some users complained about the cron log file # filling up, resource usage, and power consumption since systems # wouldn't really idle. It really only makes sense to run the mailman # cron jobs if the mailman service is turned on and not just merely # having the rpm installed. This init.d script is an obvious place to # install or remove the cron jobs based on the service being enabled # or not.
SRC_CRON_SCRIPT=$MAILMANHOME/cron/crontab.in DST_CRON_SCRIPT=/etc/cron.d/mailman
function InstallCron() { install -m644 -o root -g root $SRC_CRON_SCRIPT $DST_CRON_SCRIPT }
function RemoveCron()
{
cat > $DST_CRON_SCRIPT < # Source function library.
. /etc/rc.d/init.d/functions RETVAL=0
prog="mailman" function start()
{
echo -n $"Starting $prog: "
daemon $MAILMANCTL -s -q start
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
touch /var/lock/subsys/$prog
InstallCron
fi
echo
return $RETVAL
} function stop()
{
echo -n $"Shutting down $prog: "
daemon $MAILMANCTL -q stop
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
rm -f /var/lock/subsys/$prog
RemoveCron
fi
echo
return $RETVAL
} function restart()
{
stop
start
RETVAL=$?
return $RETVAL
} case "$1" in
'start')
start
RETVAL=$?
;; 'stop')
stop
RETVAL=$?
;; 'restart')
restart
RETVAL=$?
;; 'condrestart')
$MAILMANCTL -q -u status
retval=$?
if [ $retval -eq 0 ]
then
restart
RETVAL=$?
fi
;; 'status')
$MAILMANCTL -u status
RETVAL=$?
;; *)
echo $"Usage: $prog {start|stop|restart|condrestart}"
RETVAL=3
;; esac
exit $RETVAL
[root@gothamweb02 Mailman]# [root@gothamweb02 sysconfig]# ls
atd ip6tables-config pgsql
auditd ipmi pm-action
authconfig iptables-config prelink
autofs iptables-config.rpmnew raid-check
bluetooth irda rawdevices
cbq irqbalance readonly-root
clock kernel rhn
conman keyboard run-parts
console krb524 samba
cpuspeed kudzu saslauthd
crond mkinitrd selinux
desktop modules smartmontools
dovecot named squid
dsm_sa_ipmi named.rpmnew syslog
dund netconsole system-config-securitylevel
firstboot network system-config-users
grub networking tux
hidd network-scripts udev-stw
httpd nfs vncservers
hwconf nspluginwrapper wpa_supplicant
i18n ntpd xinetd
init pand
[root@gothamweb02 sysconfig]# grep PYTHON *
[root@gothamweb02 sysconfig]# and the ONLY python is the system one in /usr/bin --
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: ler@lerctr.org
US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
On 06/29/2015 08:15 PM, Larry Rosenman wrote:
Those lines ARE there: try: import dns.resolver from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
init.d script: ... MAILMANHOME=/usr/lib/mailman MAILMANCTL=$MAILMANHOME/bin/mailmanctl
What is the shebang line at the top of /usr/lib/mailman/bin/mailmanctl? Is it the python command you expect?
What if you do
sudo -u mailman python
and then do
import dns.resolver dns.rdatatype.TXT
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 2015-06-29 22:25, Mark Sapiro wrote:
On 06/29/2015 08:15 PM, Larry Rosenman wrote:
Those lines ARE there: try: import dns.resolver from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
init.d script: ... MAILMANHOME=/usr/lib/mailman MAILMANCTL=$MAILMANHOME/bin/mailmanctl
What is the shebang line at the top of /usr/lib/mailman/bin/mailmanctl? Is it the python command you expect?
What if you do
sudo -u mailman python
and then do
import dns.resolver dns.rdatatype.TXT root@gothamweb02 ~]# head /usr/lib/mailman/bin/mailmanctl #! /usr/bin/python
# Copyright (C) 2001-2013 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, [root@gothamweb02 ~]#
[root@gothamweb02 ~]# sudo -u mailman python Python 2.4.3 (#1, Jan 9 2013, 06:47:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import dns.resolver dns.rdatatype.TXT 16
[root@gothamweb02 ~]#
Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
On 06/29/2015 08:29 PM, Larry Rosenman wrote:
root@gothamweb02 ~]# head /usr/lib/mailman/bin/mailmanctl #! /usr/bin/python ...
[root@gothamweb02 ~]# sudo -u mailman python Python 2.4.3 (#1, Jan 9 2013, 06:47:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import dns.resolver dns.rdatatype.TXT 16
[root@gothamweb02 ~]#
I'm stumped. You could try
sudo -u mailman /usr/bin/python ...
just to be sure you've covered everything, but it probably won't be different. If you haven't restarted Mailman recently, you could try that.
If nothing else helps, you could always add a line to Utils.py so it says
try: import dns.resolver import dns.rdatatype from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
and restart Mailman, but that shouldn't be necessary. Basically, we're doing the exact thing that Mailman does as the mailman user and it works, but not when Mailman does it. I can't explain that.
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 2015-06-29 22:44, Mark Sapiro wrote:
On 06/29/2015 08:29 PM, Larry Rosenman wrote:
root@gothamweb02 ~]# head /usr/lib/mailman/bin/mailmanctl #! /usr/bin/python ...
[root@gothamweb02 ~]# sudo -u mailman python Python 2.4.3 (#1, Jan 9 2013, 06:47:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import dns.resolver dns.rdatatype.TXT 16
[root@gothamweb02 ~]#
I'm stumped. You could try
sudo -u mailman /usr/bin/python ...
just to be sure you've covered everything, but it probably won't be different. If you haven't restarted Mailman recently, you could try that.
If nothing else helps, you could always add a line to Utils.py so it says
try: import dns.resolver import dns.rdatatype from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
and restart Mailman, but that shouldn't be necessary. Basically, we're doing the exact thing that Mailman does as the mailman user and it works, but not when Mailman does it. I can't explain that.
I've made that change and will monitor.....
Thanks for the help (I'm stumped too).
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
On 06/29/2015 08:58 PM, Larry Rosenman wrote:
On 2015-06-29 22:44, Mark Sapiro wrote:
If nothing else helps, you could always add a line to Utils.py so it says
try: import dns.resolver import dns.rdatatype from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
and restart Mailman, but that shouldn't be necessary. Basically, we're doing the exact thing that Mailman does as the mailman user and it works, but not when Mailman does it. I can't explain that.
I've made that change and will monitor.....
Thanks for the help (I'm stumped too).
You may already know this, but you can run Mailman's bin/unshunt to requeue the shunted messages. If the problem is "fixed", the messages will be processed, and if not, they'll be shunted again.
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Yep. I had made a temp patch and did that....
On June 29, 2015 11:17:13 PM Mark Sapiro mark@msapiro.net wrote:
On 06/29/2015 08:58 PM, Larry Rosenman wrote:
On 2015-06-29 22:44, Mark Sapiro wrote:
If nothing else helps, you could always add a line to Utils.py so it says
try: import dns.resolver import dns.rdatatype from dns.exception import DNSException dns_resolver = True except ImportError: dns_resolver = False
and restart Mailman, but that shouldn't be necessary. Basically, we're doing the exact thing that Mailman does as the mailman user and it works, but not when Mailman does it. I can't explain that.
I've made that change and will monitor.....
Thanks for the help (I'm stumped too).
You may already know this, but you can run Mailman's bin/unshunt to requeue the shunted messages. If the problem is "fixed", the messages will be processed, and if not, they'll be shunted again.
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Larry Rosenman
-
Mark Sapiro