How to fix cPanel mailing list archiving functionality when link traversal protection is enabled

If link traversal protection is enabled on cPanel server, the mailman archiving feature stops working as it creates some internal symlinks in /usr/local/cpanel/3rdparty/mailman/archives/private/listname_domain.com/ .

You may notice the following error in /usr/local/cpanel/3rdparty/mailman/logs/error file:

Oct 19 23:49:21 2015 (532564) Uncaught runner exception: [Errno 2] No such file or directory
Oct 19 23:49:21 2015 (532564) Traceback (most recent call last):
File “/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/Runner.py”, line 119, in _oneloop
self._onefile(msg, msgdata)
File “/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/Runner.py”, line 190, in _onefile
keepqueued = self._dispose(mlist, msg, msgdata)
File “/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/ArchRunner.py”, line 73, in _dispose
mlist.ArchiveMail(msg)
File “/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/Archiver.py”, line 216, in ArchiveMail
h.processUnixMailbox(f)
File “/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/pipermail.py”, line 586, in processUnixMailbox
self.add_article(a)
File “/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/pipermail.py”, line 623, in add_article
self.new_archive(arch, archivedir)
File “/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/pipermail.py”, line 608, in new_archive
self.open_new_archive(archive, archivedir)
File “/usr/local/cpanel/3rdparty/mailman/Mailman/Archiver/HyperArch.py”, line 1047, in open_new_archive
os.symlink(self.DEFAULTINDEX+’.html’,index_html)
OSError: [Errno 2] No such file or directory

 

To fix the issue you should add mailman user to ‘linksafe’ group, so it could manage symlinks as needed:

 

Leave a Reply

Your email address will not be published. Required fields are marked *