--- python2.2/smtplib.py.orig Sat Dec 22 00:42:14 2001 +++ python2.2/smtplib.py Fri Dec 28 22:16:28 2001 @@ -353,29 +353,29 @@ return self.getreply() # std smtp commands - def helo(self, name=''): + def helo(self, name='localhost.localdomain'): """SMTP 'helo' command. - Hostname to send for this command defaults to the FQDN of the local - host. + Hostname to send for this command defaults to localhost.localdomain. """ - if name: - self.putcmd("helo", name) - else: - self.putcmd("helo", socket.getfqdn()) + # we send a FQDN EHLO/HELO that works + # sending the actual hostname could be considered spyware + # and it doesn't work with machines without a FQDN name, + # or using NAT or a TCP tunnel to another host + self.putcmd("helo", name) (code,msg)=self.getreply() self.helo_resp=msg return (code,msg) - def ehlo(self, name=''): + def ehlo(self, name='localhost.localdomain'): """ SMTP 'ehlo' command. - Hostname to send for this command defaults to the FQDN of the local - host. + Hostname to send for this command defaults to localhost.localdomain. """ + # we send a FQDN EHLO/HELO that works + # sending the actual hostname could be considered spyware + # and it doesn't work with machines without a FQDN name, + # or using NAT or a TCP tunnel to another host self.esmtp_features = {} - if name: - self.putcmd("ehlo", name) - else: - self.putcmd("ehlo", socket.getfqdn()) + self.putcmd("ehlo", name) (code,msg)=self.getreply() # According to RFC1869 some (badly written) # MTA's will disconnect on an ehlo. Toss an exception if