Jari Aalto <jari.aalto@xxxxxxxxx> writes: > Add new function maildomain() which returns FQDN for use in > send_message(). The value is passed to Net::SMTP HELO/EHLO handshake. > > The default value in Net::SMTP may not get through: > > Net::SMTP=GLOB(0x267ec28)>>> EHLO localhost.localdomain > Net::SMTP=GLOB(0x267ec28)<<< 550 EHLO argument does not match calling host > > whereas using the FQDN, the result is: > > Net::SMTP=GLOB(0x15b8e80)>>> EHLO host.example.com > Net::SMTP=GLOB(0x15b8e80)<<< 250-host.example.com Hello host.example.com [192.168.1.7] I think you identified a good issue to tackle. But is it really the optimal solution? - Is it the best we can do to always make an empty connection only to check if the we have hosts locally known as mailhost or localhost listens to SMTP port? And calling this function again and again, even after sending one message to the same $smtp_server successfully ($smtp in the global scope is already set in that case)? - You are trying to improve the chance that $smtp_server likes the name your side identifies as; what does it have to do with your local "mailhost" or "localhost" listening to the SMTP port? These local MTA may be configured for local-only delivery after all. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html