Hello, It would be useful in some situations (for example Mailman and Postfix running on same host) to define custom HELO when using Mailman SMTPDirect delivery module.
I made simple patch to achieve this. But since my experience with Python is minimal I don't know if this is "the right way(tm)". diff -u -r mailman-2.1.6b3/Mailman/Defaults.py.in mailman-2.1.6b3-patched/Mailman/Defaults.py.in --- mailman-2.1.6b3/Mailman/Defaults.py.in 2005-01-22 08:55:28.000000000 +0200 +++ mailman-2.1.6b3-patched/Mailman/Defaults.py.in 2005-02-13 12:59:28.000000000 +0200 @@ -422,6 +422,11 @@ SMTPHOST = 'localhost' SMTPPORT = 0 # default from smtplib +# SMTP HELO sent by Mailman, when DELIVERY_MODULE is 'SMTPDirect'. Default +# is FQDN of localhost (as returned by socket.getfqdn()) +# SMTPHELO = 'my.own.fqdn.hostname' +SMTPHELO = None + # Command for direct command pipe delivery to sendmail compatible program, # when DELIVERY_MODULE is 'Sendmail'. SENDMAIL_CMD = '/usr/lib/sendmail' diff -u -r mailman-2.1.6b3/Mailman/Handlers/SMTPDirect.py mailman-2.1.6b3-patched/Mailman/Handlers/SMTPDirect.py --- mailman-2.1.6b3/Mailman/Handlers/SMTPDirect.py 2004-01-23 01:02:07.000000000 +0200 +++ mailman-2.1.6b3-patched/Mailman/Handlers/SMTPDirect.py 2005-02-13 12:29:59.000000000 +0200 @@ -59,7 +59,7 @@ self.__conn = None def __connect(self): - self.__conn = smtplib.SMTP() + self.__conn = smtplib.SMTP('', 0, mm_cfg.SMTPHELO) self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT) self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&fileúq01.027.htp