[Mailman-Developers] smtplib.py

Barry A. Warsaw bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Mon, 21 Dec 1998 23:18:20 -0500 (EST)


I think I've integrated the Python 1.5.2 smtplib.py into Mailman for
1.0b7.  I'm no smtp expert so I'd like someone with CVS access to
double check what I've done.  Here's a summary.

I am removing Mailman/smtplib.py, and creating a new package directory
inside Mailman called Mailman/pythonlib.  This package will contain
newer versions of standard Python libraries, that may not exist (or be
out of date) out in the field.  E.g. this directory now contains
smtplib.py from nearly-Python-1.5.2.  If we ever have version skew
down the road, this may contain other copies of such libraries.  When
require Python 1.5.2 or better, we can remove
Mailman/pythonlib/smtplib.py

Now, I've tracked down every reference to smtplib.py and the only
useful one seems to be Mailman/Utils.py.  I've removed all other
imports of smtplib from places where they were not used.  Then I
modified TrySMTPDelivery() in Utils.py to get the correct smtplib
(standard Python one if the attribute smptlib.SMTP.ehlo exists,
otherwise, it imports the one out of the Mailman.pythonlib package).

Finally, I rewrote the code in this function to call the standard
interface, which seems very simple: essentially call
smtplib.SMTP(...).sendmail().  In my limited testing, this appears to
work just fine.

I plan to check all this stuff in in a few moments.  Please someone
double check me.  If I've messed up badly, I'll revert.

Also, I plan to move bin/update_to_10b6 to bin/update.  We'll just
keep adding new update procedures to this script as new versions are
released.  I plan to add removal of $prefix/Mailman/smtplib.py{,c}.

-Barry