CC: | bug-Mail-Sender [...] rt.cpan.org |
Subject: | Mail::Sender generates non-RFC-compliant MAIL commands |
Date: | Sat, 8 Jul 2006 01:28:21 -0400 |
To: | Jan Krynicky <Jenda [...] Krynicky.cz> |
From: | Ambrose LI <acli [...] ada.dhs.org> |
Hi,
I noticed a standards compliance bug in Mail-Sender-0.8.13.
The module currently does a
$_ = send_cmd $s, "MAIL FROM: <$self->{'fromaddr'}>";
which outputs an SMTP command in the form
MAIL FROM:<foo@example.org>
This is invalid SMTP according to both the newer RFC 2821
(section 4.1.1.2) and the older RFC 821 (section 3.1);
in particular, RFC 2821 specifies that the syntax for MAIL
should be
"MAIL FROM:" ("<>" / Reverse-Path)
[SP Mail-parameters] CRLF
There should be no SP between "MAIL FROM:" and the Reverse-Path,
and neither RFC 2821 nor RFC 821 allows a space to be inserted
after the colon.
When the recipient server is strictly RFC complaint (e.g.,
ZMailer-based systems in "strict" mode), the recipient will
reject MAIL commands generated by Mail::Sender, because they
are syntactically invalid.
The above-mentioned line in the module should be corrected to
$_ = send_cmd $s, "MAIL FROM:<$self->{'fromaddr'}>";
Best regards,
--
Ambrose LI Cheuk-Wing <a.c.li@ieee.org>
http://ada.dhs.org/~acli/