Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mail-Sender CPAN distribution.

Report information
The Basics
Id: 4734
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Mail-Sender

People
Owner: Nobody in particular
Requestors: jon [...] phuq.co.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.8.10
Fixed in: (no value)



Subject: $ENV{HTTP_HOST} on non-standard port causes syntactically invalid EHLO
If Mail::Sender is called from code running within a web server (e.g. mod_perl or CGI code), it may use $ENV{HTTP_HOST} to initialise various things. If the webserver is running on a non-standard port this variable is set to a string containing a colon (e.g. "localhost:10001"), and is so not a syntactically valid hostname. This string is used to construct the EHLO request in the SMTP session, causing some SMTP servers to barf. Verified in CGI code running under Apache/2.0.40 (Red Hat Linux), with Perl v5.8.0, Mail::Sender 0.8.10, talking to Exim 4.24. Workaround: Set $ENV{HOSTNAME} properly in your code, and $ENV{HTTP_HOST} will not be used.
I've added code to remove the port from the host name. It will be in the upcoming version of the module. Thanks for letting me know about the problem. Jenda