Br0ken Mailman - Ubuntu 18.04.1 LTS

I got an error this morning about some strange permission while run the cron.
Cron <list@lists> [ -x /usr/local/mailman/cron/senddigests ] && /usr/local/mailman/cron/senddigests:
Traceback (most recent call last): File "/usr/local/mailman/cron/senddigests", line 120, in <module> main() File "/usr/local/mailman/cron/senddigests", line 98, in main mlist = MailList.MailList(listname, lock=0) File "/usr/local/mailman/Mailman/MailList.py", line 133, in __init__ self.Load() File "/usr/local/mailman/Mailman/MailList.py", line 693, in Load dict, e = self.__load(file) File "/usr/local/mailman/Mailman/MailList.py", line 656, in __load fp = open(dbfile) IOError: [Errno 13] Permission denied: '/usr/local/mailman/lists/skunkworks/config.pck'
So I fumbled around trying to figure it out without success! bin/check_perms -f did not help either.
And now I tried to manually recompile and build mailman and ended up with even more problems:
root@lists:/home/wash/Mailman/2.1.29/mailman-2.1.29# ./configure --with-cgi-gid=33 --with-mail-gid=117 checking for --with-python... no checking for python... /usr/bin/python checking Python interpreter... /usr/bin/python checking Python version... 2.7.15rc1 checking dnspython... Traceback (most recent call last): File "conftest.py", line 2, in <module> import dns.resolver File "build/bdist.linux-x86_64/egg/dns/resolver.py", line 33, in <module> File "build/bdist.linux-x86_64/egg/dns/message.py", line 36, in <module> File "build/bdist.linux-x86_64/egg/dns/rrset.py", line 24, in <module> File "build/bdist.linux-x86_64/egg/dns/renderer.py", line 26, in <module> File "build/bdist.linux-x86_64/egg/dns/tsig.py", line 64, in <module> File "build/bdist.linux-x86_64/egg/dns/name.py", line 912, in from_text struct.error: cannot convert argument to integer cat: conftest.out: No such file or directory
....... .......
make install ...... ......
Compiling /usr/local/mailman/Mailman/Queue/ArchRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/BounceRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/CommandRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/IncomingRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/MaildirRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/NewsRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/OutgoingRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/RetryRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/Runner.py ... Compiling /usr/local/mailman/Mailman/Queue/Switchboard.py ... Compiling /usr/local/mailman/Mailman/Queue/VirginRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/__init__.py ... Compiling /usr/local/mailman/Mailman/Queue/sbcache.py ... Compiling /usr/local/mailman/Mailman/SafeDict.py ... Compiling /usr/local/mailman/Mailman/SecurityManager.py ... Compiling /usr/local/mailman/Mailman/Site.py ... Compiling /usr/local/mailman/Mailman/TopicMgr.py ... Compiling /usr/local/mailman/Mailman/UserDesc.py ... Compiling /usr/local/mailman/Mailman/Utils.py ... Compiling /usr/local/mailman/Mailman/Version.py ... Compiling /usr/local/mailman/Mailman/__init__.py ... Compiling /usr/local/mailman/Mailman/htmlformat.py ... Compiling /usr/local/mailman/Mailman/i18n.py ... Compiling /usr/local/mailman/Mailman/versions.py ... Traceback (most recent call last): File "bin/update", line 50, in <module> from Mailman import Utils File "/usr/local/mailman/Mailman/Utils.py", line 76, in <module> import dns.resolver File "build/bdist.linux-x86_64/egg/dns/resolver.py", line 33, in <module> File "build/bdist.linux-x86_64/egg/dns/message.py", line 36, in <module> File "build/bdist.linux-x86_64/egg/dns/rrset.py", line 24, in <module> File "build/bdist.linux-x86_64/egg/dns/renderer.py", line 26, in <module> File "build/bdist.linux-x86_64/egg/dns/tsig.py", line 64, in <module> File "build/bdist.linux-x86_64/egg/dns/name.py", line 912, in from_text struct.error: cannot convert argument to integer Makefile:133: recipe for target 'update' failed make: *** [update] Error 1
And of now I am just flummoxed :)
What is it about this dns,resolver??
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)

I somehow managed to solve this: apt install python-pip /usr/bin/pip uninstall dnspython /usr/bin/pip install dnspython
Ubuntu seems to have moved python2.7 to /usr/bin while making python3.7 resident in /usr/local/bin
On Tue, 29 Jan 2019 at 14:34, Odhiambo Washington <odhiambo@gmail.com> wrote:
I got an error this morning about some strange permission while run the cron.
Cron <list@lists> [ -x /usr/local/mailman/cron/senddigests ] && /usr/local/mailman/cron/senddigests:
Traceback (most recent call last): File "/usr/local/mailman/cron/senddigests", line 120, in <module> main() File "/usr/local/mailman/cron/senddigests", line 98, in main mlist = MailList.MailList(listname, lock=0) File "/usr/local/mailman/Mailman/MailList.py", line 133, in __init__ self.Load() File "/usr/local/mailman/Mailman/MailList.py", line 693, in Load dict, e = self.__load(file) File "/usr/local/mailman/Mailman/MailList.py", line 656, in __load fp = open(dbfile) IOError: [Errno 13] Permission denied: '/usr/local/mailman/lists/skunkworks/config.pck'
So I fumbled around trying to figure it out without success! bin/check_perms -f did not help either.
And now I tried to manually recompile and build mailman and ended up with even more problems:
root@lists:/home/wash/Mailman/2.1.29/mailman-2.1.29# ./configure --with-cgi-gid=33 --with-mail-gid=117 checking for --with-python... no checking for python... /usr/bin/python checking Python interpreter... /usr/bin/python checking Python version... 2.7.15rc1 checking dnspython... Traceback (most recent call last): File "conftest.py", line 2, in <module> import dns.resolver File "build/bdist.linux-x86_64/egg/dns/resolver.py", line 33, in <module> File "build/bdist.linux-x86_64/egg/dns/message.py", line 36, in <module> File "build/bdist.linux-x86_64/egg/dns/rrset.py", line 24, in <module> File "build/bdist.linux-x86_64/egg/dns/renderer.py", line 26, in <module> File "build/bdist.linux-x86_64/egg/dns/tsig.py", line 64, in <module> File "build/bdist.linux-x86_64/egg/dns/name.py", line 912, in from_text struct.error: cannot convert argument to integer cat: conftest.out: No such file or directory
....... .......
make install ...... ......
Compiling /usr/local/mailman/Mailman/Queue/ArchRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/BounceRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/CommandRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/IncomingRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/MaildirRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/NewsRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/OutgoingRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/RetryRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/Runner.py ... Compiling /usr/local/mailman/Mailman/Queue/Switchboard.py ... Compiling /usr/local/mailman/Mailman/Queue/VirginRunner.py ... Compiling /usr/local/mailman/Mailman/Queue/__init__.py ... Compiling /usr/local/mailman/Mailman/Queue/sbcache.py ... Compiling /usr/local/mailman/Mailman/SafeDict.py ... Compiling /usr/local/mailman/Mailman/SecurityManager.py ... Compiling /usr/local/mailman/Mailman/Site.py ... Compiling /usr/local/mailman/Mailman/TopicMgr.py ... Compiling /usr/local/mailman/Mailman/UserDesc.py ... Compiling /usr/local/mailman/Mailman/Utils.py ... Compiling /usr/local/mailman/Mailman/Version.py ... Compiling /usr/local/mailman/Mailman/__init__.py ... Compiling /usr/local/mailman/Mailman/htmlformat.py ... Compiling /usr/local/mailman/Mailman/i18n.py ... Compiling /usr/local/mailman/Mailman/versions.py ... Traceback (most recent call last): File "bin/update", line 50, in <module> from Mailman import Utils File "/usr/local/mailman/Mailman/Utils.py", line 76, in <module> import dns.resolver File "build/bdist.linux-x86_64/egg/dns/resolver.py", line 33, in <module> File "build/bdist.linux-x86_64/egg/dns/message.py", line 36, in <module> File "build/bdist.linux-x86_64/egg/dns/rrset.py", line 24, in <module> File "build/bdist.linux-x86_64/egg/dns/renderer.py", line 26, in <module> File "build/bdist.linux-x86_64/egg/dns/tsig.py", line 64, in <module> File "build/bdist.linux-x86_64/egg/dns/name.py", line 912, in from_text struct.error: cannot convert argument to integer Makefile:133: recipe for target 'update' failed make: *** [update] Error 1
And of now I am just flummoxed :)
What is it about this dns,resolver??
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)

On 1/29/19 3:34 AM, Odhiambo Washington wrote:
I got an error this morning about some strange permission while run the cron.
Cron <list@lists> [ -x /usr/local/mailman/cron/senddigests ] && /usr/local/mailman/cron/senddigests:
Traceback (most recent call last): File "/usr/local/mailman/cron/senddigests", line 120, in <module> main() File "/usr/local/mailman/cron/senddigests", line 98, in main mlist = MailList.MailList(listname, lock=0) File "/usr/local/mailman/Mailman/MailList.py", line 133, in __init__ self.Load() File "/usr/local/mailman/Mailman/MailList.py", line 693, in Load dict, e = self.__load(file) File "/usr/local/mailman/Mailman/MailList.py", line 656, in __load fp = open(dbfile) IOError: [Errno 13] Permission denied: '/usr/local/mailman/lists/skunkworks/config.pck'
So I fumbled around trying to figure it out without success! bin/check_perms -f did not help either.
Was this a new list or one that was present during a prior successful cron/senddigests run?
Could you access the list via the web UI?
What user runs the cron, i.e. the owner of the crontab or the listed user is a system crontab, and can that user access the config.pck file? Can that user successfully run cron/senddigests manually?
If the above doesn't give clues, maybe apparmor is involved.
Maybe it was a transient glitch.
In any case, I wouldn't expect re-installing Mailman to correct a permissions problem if check_perms didn't find anything.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Wed, 30 Jan 2019 at 02:21, Mark Sapiro <mark@msapiro.net> wrote:
On 1/29/19 3:34 AM, Odhiambo Washington wrote:
I got an error this morning about some strange permission while run the cron.
Cron <list@lists> [ -x /usr/local/mailman/cron/senddigests ] && /usr/local/mailman/cron/senddigests:
Traceback (most recent call last): File "/usr/local/mailman/cron/senddigests", line 120, in <module> main() File "/usr/local/mailman/cron/senddigests", line 98, in main mlist = MailList.MailList(listname, lock=0) File "/usr/local/mailman/Mailman/MailList.py", line 133, in __init__ self.Load() File "/usr/local/mailman/Mailman/MailList.py", line 693, in Load dict, e = self.__load(file) File "/usr/local/mailman/Mailman/MailList.py", line 656, in __load fp = open(dbfile) IOError: [Errno 13] Permission denied: '/usr/local/mailman/lists/skunkworks/config.pck'
So I fumbled around trying to figure it out without success! bin/check_perms -f did not help either.
Was this a new list or one that was present during a prior successful cron/senddigests run?
It's an existing list.
Could you access the list via the web UI?
After fixing the issues I had with dns.resolver, the list is alive and I can do everything via the web UI. However, the cron errors still persist.
What user runs the cron, i.e. the owner of the crontab or the listed user is a system crontab, and can that user access the config.pck file? Can that user successfully run cron/senddigests manually?
The contrab file is in /etc/cron.d/ and is owned by root:root like all the files I see in there.
If the above doesn't give clues, maybe apparmor is involved.
I need to figure out what apparmor is. Heading to Google :)
Maybe it was a transient glitch.
It is not, because this morning I have seen permission problems with other aspects of the cron.
In any case, I wouldn't expect re-installing Mailman to correct a permissions problem if check_perms didn't find anything.
That is the strange part - check_perms -f isn't fixing it.
root@lists:/etc/cron.d# /usr/local/mailman/bin/check_perms No problems found
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)

On 1/29/19 10:44 PM, Odhiambo Washington wrote:
The contrab file is in /etc/cron.d/ and is owned by root:root like all the files I see in there.
And in that file, the entries have 5 date/time fields followed by a 6th field which is the user to run the command as.
What is this user and does it have permission?
It should be the Mailman user which I think is 'list' in the Ubuntu package.
That is the strange part - check_perms -f isn't fixing it.
root@lists:/etc/cron.d# /usr/local/mailman/bin/check_perms No problems found
check_perms checks that Mailman's group (again, probably 'list') is the group of the files and directories and that the owner and group permissions are as they should be. That can be all correct and you will still have issues if commands are not being run as the Mailman user.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Odhiambo Washington