[Mailman-Users] SMTPDirect issues (Name or service not known)

Meike Aulbach sonne at sunduin.net
Fri Jun 10 19:26:12 CEST 2005


Hello!

Thanks for the reply :)

On Fri, Jun 10, 2005 at 09:36:46AM -0700, Mark Sapiro wrote:
> See the post at
> http://mail.python.org/pipermail/mailman-users/2005-June/045071.html
> The similar issue there was due to /etc/hosts not being readable by
> other than root.

Should be ok, readable by everyone:

zzzz:~# ls -l /etc/hosts
-rw-r--r--  1 root root 438 Jun  9 22:28 /etc/hosts
zzzz:~# 

> Did you try doing these things as the 'mailman' user?

The mailman scripts run as 'list' user:

zzzz:~# ps uax | grep mailman
list     15160  0.0  0.5  7796 5468 ?        Ss   19:09   0:00
/usr/bin/python /usr/lib/mailman/bin/mailmanctl -s start
list     15161  0.1  0.5  7600 5300 ?        S    19:09   0:00
/usr/bin/python /var/lib/mailman/bin/qrunner --runner=ArchRunner:0:1 -s
list     15162  0.1  0.5  7520 5320 ?        S    19:09   0:00
/usr/bin/python /var/lib/mailman/bin/qrunner --runner=BounceRunner:0:1
-s
list     15163  0.0  0.5  7628 5312 ?        S    19:09   0:00
/usr/bin/python /var/lib/mailman/bin/qrunner --runner=CommandRunner:0:1
-s
list     15164  0.1  0.5  7516 5300 ?        S    19:09   0:00
/usr/bin/python /var/lib/mailman/bin/qrunner --runner=IncomingRunner:0:1
-s
list     15165  0.1  0.5  7608 5336 ?        S    19:09   0:00
/usr/bin/python /var/lib/mailman/bin/qrunner --runner=NewsRunner:0:1 -s
list     15166  0.1  0.5  7904 5604 ?        S    19:09   0:00
/usr/bin/python /var/lib/mailman/bin/qrunner --runner=OutgoingRunner:0:1
-s
list     15167  0.0  0.5  7516 5296 ?        S    19:09   0:00
/usr/bin/python /var/lib/mailman/bin/qrunner --runner=VirginRunner:0:1
-s
list     15168  0.1  0.5  7508 5292 ?        S    19:09   0:00
/usr/bin/python /var/lib/mailman/bin/qrunner --runner=RetryRunner:0:1 -s
root     15246  0.0  0.0  1556  524 pts/0    R+   19:13   0:00 grep
mailman
zzzz:~# 

> If you change a *.py module, the next time it is used, Python will see
> that it is more recent than the corresponding *.py[co] and recompile.
> 
> You probably do need to restart Mailman in case old copies are cached
> in the qrunners.

So mailman is probably really connecting to 'localhost' and 0 as I
hardcoded that in SMTPDirect.py (see my last mail).

> You shouldn't need to edit SMTPDirect.py to debug this. The Python code
> snippet above and the more elaborate one in the post at
> http://mail.python.org/pipermail/mailman-users/2005-May/044742.html do
> exactly what SMTPDirect.py does. If they don't fail it's because you
> aren't running them in the same way as the mailman OutgoingRunner is
> run, i.e. same python, same user, ...

I have only python 2.3 installed on the system (debian package). The
mailman OutgoingRunner runs as user 'list' according to the process
list.

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 ;)

With best wishes,
Meike

-- 
Meike Aulbach <sonne at sunduin.net>



More information about the Mailman-Users mailing list