Custom Search

Thursday, March 17, 2016

How to fix ImportError No module named Mailman

$sudo python -m smtpd -c MailmanProxy -n 127.0.0.1:25

error: uncaptured python exception, closing channel __main__.SMTPChannel connected 127.0.0.1:40739 at 0x7fc0cd7f3998 (type 'exceptions.ImportError':No module named Mailman [/usr/lib/python2.7/asyncore.py|read|83] [/usr/lib/python2.7/asyncore.py|handle_read_event|449] [/usr/lib/python2.7/asynchat.py|handle_read|158] [/usr/lib/python2.7/smtpd.py|found_terminator|181] [/usr/lib/python2.7/smtpd.py|process_message|390])



Fix
=====

$sudo vim /usr/lib/python2.7/smtpd.py

Add following lines

import sys
sys.path.append("/usr/lib/mailman")



1 comment: