[Python-Dev] 2nd thought: fully qualified host names

Thomas Wouters thomas@xs4all.net
Thu, 10 Aug 2000 17:40:26 +0200


On Thu, Aug 10, 2000 at 11:14:20AM -0500, Guido van Rossum wrote:

> > After submitting the patch to smtplib, I got a bad feeling
> > about only trying to get the FQDN for the localhost case.
> > for len(name) == 0

> > I think (but couldn't immediately find a reference) it
> > is required by some RFC. There is at least an internet
> > draft by the the ietf that says it is required
> > and a lot of references (mostly from postfix) to some
> > RFC, too.

If this is for helo() and ehlo(), screw it. No sane mailer, technician or
abuse desk employee pays any attention what so ever to the HELO message,
except possibly for debugging.

The only use I've ever had for the HELO message is with clients that setup a
WinGate or similar braindead port-forwarding service on their dail-in
machine, and then buy one of our products, batched-SMTP. They then get their
mail passed to them via SMTP when they dial in... except that these
*cough*users*cough* redirect their SMTP port to *our* smtp server, creating
a confusing mail loop. We first noticed that because their server connected
to our server using *our* HELO message ;)

> > If that is a problem I would make _get_fqdn_hostname
> > a public function (and choose a better name). helo()
> > and ehlo() could still call it for the local host case.

I don't think this is worth the trouble. Assembling a FQDN is tricky at
best, and it's not needed in that many cases. (Sometimes you can break
something by trying to FQDN a name and getting it wrong ;) Where would this
function be used ? In SMTP chats ? Not necessary. A 'best guess' is enough
-- the remote SMTP server won't listen to you, anyway, and provide the
ipaddress and it's reverse DNS entry in the mail logs. Mailers that rely on
the HELO message are (rightly!) considered insecure, spam-magnets, and are a
thankfully dying race.

Of course, if anyone else needs a FQDN, it might be worth exposing this
algorithm.... but smtplib doesn't seem like the proper place ;P

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!