CC: | bug-Mail-Sendmail [...] rt.cpan.org |
Subject: | [REGRESSION?] Mail::Sendmail generates non-RFC-compliant MAIL commands |
Date: | Sat, 8 Jul 2006 01:38:40 -0400 |
To: | Milivoj Ivkovic <mi [...] alma.ch> |
From: | Ambrose LI <acli [...] ada.dhs.org> |
Hi,
I noticed a regression in Mail-Sendmail-0.79. (I previously
reported the problem on 2004/03/01.)
The module currently does a
socket_write("MAIL FROM: <$fromaddr>$CRLF")
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
socket_write("MAIL FROM:<$fromaddr>$CRLF")
Best regards,
--
Ambrose LI Cheuk-Wing <a.c.li@ieee.org>
http://ada.dhs.org/~acli/
See also: [rt.cpan.org #20357]