[Mailman-Users] Mailman, Exim -odqr, Python's `own' SMTP, etc.

Ian Jackson ijackson at chiark.greenend.org.uk
Mon May 17 14:12:45 CEST 1999


I'd like to be able to get Mailman to deliver mail other than via
SMTP-over-TCP.  This is because I want to give the MTA (Exim) a
special delivery mode option which I've found greatly improves SMTP
connection reuse and general efficiency.  I'd also like to avoid ident
lookups etc.

I can see roughly two ways to do this:

1. Provide my own version of TrySMTPDelivery which calls
   /usr/sbin/sendmail (really Exim) with appropriate options.

2. Somehow get Python's smtplib to use sendmail -bs (and pass
   appropriate options to sendmail).

1 is easy to write; 2 looks somewhat harder without modifying both
Python's smtplib and Mailman, and even then I have to do the 822
address parsing by hand[1].  However, I want to do 1 in a way that
will get my patch accepted, so that I don't have to maintain the
variant.  I also want it to be configurable at runtime, of course.

So, what would be the canonical Python or Mailman way of doing this ?
Enclose the body of TrySMTPDelivery in a big `if' ?  Move the body
into a new function and turn TrySMTPDelivery into a layer of
indirection ?

Is such a change likely to be accepted in any case, or will I have to
maintain a local version (which means I'll try for the patch with the
lowest changed-lines-count) ?

Ian.

[1] Or read the source for Python's rfc822 module to find out whether
it does dequoting right and what the output quoting conventions are -
and even then I have to do 821 quoting myself.




More information about the Mailman-Users mailing list