Trying to send an email to a domain hosted at GoDaddy. Got the following failure message: [code] <unblock@godaddy.com>: User and password not set, continuing without authentication. 64.202.166.12 does not like recipient. Remote host said: 553 Bogus helo lh 203.194.133.231. <http://unblock.secureserver.net/?ip=203.194.133.*> Giving up on 64.202.166.12. [/code] So I duly fill in the form on http://unblock.secureserver.net/ and get this back [code] The IP address you have submitted is not currently eligible for unblocking because the mailserver has returned a 'bogus helo'. This indicates that the server the email originated from either has a virus or has not been setup correctly. RFC 1132 says that the HELO ("hello") message should contain "a valid principal host domain name for the client host". This means a name like "smtp.exampledomain.com", or "mail.exampledomain.com". An IP address is not a valid listing for the name of the server. [/code] Oh joy! So I wrote a little python script to print out what qmail-remote sends in the EHLO and HELO messages. Here it is in case anyone else wants to test: [code] #!/usr/bin/env python # waits for a connection and prints what it receives import SocketServer PORT = 25 class TheRequestHandler(SocketServer.StreamRequestHandler): def handle(self): print "connection from ", self.client_address self.wfile.write('220 smpt.example.com SMTP\r\n') print self.rfile.readline() self.wfile.write('502 Error: command not implemented\r\n') print self.rfile.readline() server = SocketServer.TCPServer(("", PORT), TheRequestHandler) try: print "listening on port ", PORT server.serve_forever() except: server.server_close() [/code] It turns out that when I send an email from a virtual domain the EHLO message is as follows: [code] EHLO example.com [/code] But strictly speaking (according to GoDaddy) it should be [code] EHLO mail.example.com [/code] This only happens with virtual domains. I'm using vpopmail. Is this a feature of the virtual-domain-outgoing-IP-address.patch patch? Anyone have any ideas on how to get the FQDN in the EHLO/HELO message for virtual hosts? I've tried setting the helohost file - but that is ignored AFAIK for virtual hosts. Thanks Simon
Created attachment 98303 [details, diff] patch to correctly use the mx record for HELO message Attached patch to qmail-remote.c fixes the HELO problem. (I think. qmail source is a tad hairy - no comments!) The issue seems to be that the virtual-domain-outgoing-IP-address.patch does not correctly get the mx record for the virtual domain. The virtual-domain-outgoing-IP-address.patch was just overwriting helohost with example.com rather than mail.example.com when the ip of the mail server is the same as the current server. With this patch we use the FQDN of the mx record - this assume btw that IX_FQDN is defined (ie TLS is defined) to get the fqdn member of the ip_mx struct.
Please use mail-mta/netqmail. We won't add more patches to mail-mta/qmail.