[Python-bugs-list] [Bug #110944] smtplib doesn't use FQDN

noreply@sourceforge.net noreply@sourceforge.net
Thu, 10 Aug 2000 07:10:57 -0700


Bug #110944, was updated on 2000-Aug-02 11:43
Here is a current snapshot of the bug.

Project: Python
Category: Library
Status: Closed
Resolution: None
Bug Group: None
Priority: 5
Summary: smtplib doesn't use FQDN

Details: When talking to an SMTP server smtplib says HELO "name" where name is the result of:

name = socket.gethostbyaddr(name)[0]

Unfortunately that line isn't guarenteed to return the FQDN of the machine and so some MTAs with certain configurations (in my case postfix) reject the mail as they insist on a FQDN. Those MTAs that don't insist on a FQDN arent going to complain if they get one either so changing this behaviour seems desirable.

This code appears twice...once around line 295 and again around line 312. The fix would seem to be listed at http://www.python.org/doc/current/lib/module-socket.html.

"To find the fully qualified domain name, check hostname and the items of aliaslist for an entry containing at least one period."

I don't know enough python to provide a patch...sorry.

Thanks,

Andrew

BTW I have submitted this bug against the version in mailman as well

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110944&group_id=5470