[Mailman-Users] SMTPDirect

Richard Barrett r.barrett at ftel.co.uk
Thu Apr 8 14:34:44 CEST 2004

On 8 Apr 2004, at 11:56, John Poltorak wrote:

> Is there any documentation of how SMTPDirect is supposed to work?

I am not being sarcastic when I suggest reading the code in 

SMTPDirect depends on the standard Python module smtplib and, bearing 
in mind your earlier post about an SMTP problem (Subject: Outbound mail 
getting stuck), you could take a look at the Python documentation of 
it, particularly the worked example of smtplib use that is here:


Regarding that earlier post, I would suggest that given the SMTP server 
refused the connection, you should look at that server end. Such a 
refusal is probably due to there being no SMTP server listening on 
interface/port that you have specified using the SMTPHOST/SMTPPORT MM 
config variables: see $prefix/Defaults.py for comments on these. Such 
failure is usually due to the way the SMTP server (MTA) has been 
configured and are not a Mailman problem per se. The 'connection 
refused' error text reflects what the underlying Pyython socket module 
has returned to smtplib when it was unable to open a TCP connection to 
the SMTP server on behalf of the smtplib code.

Your problem may be just that your local SMTP server is not configured 
to accept incoming connections on the default of 'localhost' port 25

You could explore connecting to that SMTP server using the smtplib 
example while running Python from the command line and see if that 
generates a refusal. If that works OK then SMTPDirect is usually good 
to go.

> And can anyone suggest how I trace what is happening when it is 
> invoked?

Personally, I tend to hack in a few calls to syslog to the code that 
output information that may enlighten me as to what is going on, e.g.

	syslog('error', 'my diagnosic info, value was: %s', 

Making sure that his import has been done somewhere above in the source:

	from Mailman.Logging.Syslog import syslog

> -- 
> John

More information about the Mailman-Users mailing list