[issue7484] smtplib: verify breaks with Postfix servers

Catalin Iacob report at bugs.python.org
Sun Jul 17 14:56:03 CEST 2011


Catalin Iacob <iacobcatalin at gmail.com> added the comment:

I looked at the Felipe's patch and hopefully made some improvements.

Unlike Felipe's patch I didn't change the reply of the SMTP server in the tests but instead use what VRFY and EXPN actually send to index the users and lists dictionaries. If <> would be sent the lookup would fail. Similarly, when VRFY return 550 it echoed the address as received and now it's tested to be equal to something without <>.

By the way, but I was wondering:
* is the try/except really needed or just a historical artifact (why would email.utils.parseaddr raise AttributeError?)
* is the test to None correct? It was added by the fix to issue1430298 but does email.utils.parseaddr ever return None for the address? (I could only get it to return '')
I kept quoteaddr as is to make it easier to review the patch but if David confirms the above points are valid I can create new issues for them and simplify/fix quoteaddr.

----------
hgrepos: +43

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7484>
_______________________________________


More information about the Python-bugs-list mailing list