[Mailman-Users] SMTPDirect issues (Name or service not known)
Mark Sapiro
msapiro at value.net
Fri Jun 10 20:35:39 CEST 2005
Meike Aulbach wrote:
>
>So mailman is probably really connecting to 'localhost' and 0 as I
>hardcoded that in SMTPDirect.py (see my last mail).
Yes.
>When I do a manual connect as user 'list' it still works. I went through
>the complete procedure:
>
>zzzz:~# su - list
>No directory, logging in with HOME=/
>list at zzzz:/$ python
>Python 2.3.5 (#2, Feb 9 2005, 00:38:15)
>[GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2
>Type "help", "copyright", "credits" or "license" for more information.
>>>> import smtplib
>>>> SMTPHOST = 'localhost'
>>>> SMTPPORT = 0
>>>> msg = """Subject: Test
>... Message-ID: 12345 at zzzz.net
>... From: sonne at zzzz.net
>... To: sonne at zzzz.net
>...
>... The body
>... """
>>>> rcpts = ['sonne at xyz.net','mae at xyz.de']
>>>> env = 'list-bounce at zzzz.net'
>>>> x = smtplib.SMTP()
>>>> x.connect(SMTPHOST,SMTPPORT)
>(220, 'mx.zzzz.net ESMTP Exim 4.50 Fri, 10 Jun 2005 19:21:13 +0200')
>>>> x.sendmail(env,rcpts,msg)
>{}
>>>> x.quit()
>>>>
>list at zzzz:/$
>
>So it unfortunately doesn't fail. Never imagined that I ever might be
>wishing something finally fails ;)
Well, I'm out of ideas at this point. It looks like you may have to
modify SMTPDirect.py and add some debugging. You could try sprinkling
calls of the form
syslog('smtp-failure', 'some format string %s and %s', var1, var2)
in various places to try to get more information. For example, change
def __connect(self):
self.__conn = smtplib.SMTP()
self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT)
self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION
to
def __connect(self):
self.__conn = smtplib.SMTP()
syslog('smtp-failure', 'host = %s, port = %s',
mm_cfg.SMTPHOST, mm_cfg.SMTPPORT)
x = self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT)
syslog('smtp-failure', 'connect returns: %s', x)
self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION
--
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list