smtplib problem

Ulf Engstrøm ulf.engstrom at b2b-link.com
Fri Feb 16 06:59:03 EST 2001


Hello :)
As in RFC2554(http://www.landfield.com/rfcs/rfc2554.html)

(1) the name of the SMTP service extension is "Authentication"
(2) the EHLO keyword value associated with this extension is "AUTH"
(3) The AUTH EHLO keyword contains as a parameter a space separated
       list of the names of supported SASL mechanisms.
(4) a new SMTP verb "AUTH" is defined
(5) an optional parameter using the keyword "AUTH" is added to the
       MAIL FROM command, and extends the maximum line length of the
       MAIL FROM command by 500 characters.

This is not included in smtplib, but can be used with .ehlo(). One problem
arises; the MAILFROM command has to be accompanied with an AUTH as well on
most servers supporting RFC2554. I made a patch for this a long time ago,
but I've lost it since, don't know it it's possible to obtain it from the
patch-manager on sourceforge in some way.
The number of mailservers supporting this is not in majority, but it's
growing, especially in Europe. If it's interesting for more people I could
probably make a new patch to smtplib, or just create an authsmtplib. Or has
someone done this already?
Ulf Engström

Sheila King <sheila at spamcop.net> wrote:
>
>Nice. And how does one do SMTP authorization? (There must be a way. I see
that
>the NNTP module includes authorization commands, but the smtplib doesn't!)

Tim Roberts:
> There is no such thing.  The SMTP protocol does not include authorization.
>
> Some providers have gone to a scheme whereby you have to check for POP
mail
> before you can use SMTP.  You have to send a password for POP, after which
> they open a short window wherein you can send mail.  That doesn't take any
> changes to smtplib.






More information about the Python-list mailing list