Subject: | Possible TLS bug |
Date: | Mon, 23 May 2011 22:51:42 +0100 |
To: | <bug-Net-SMTP-TLS-ButMaintained [...] rt.cpan.org> |
From: | "Chris Baker" <cbaker [...] coexpansive.com> |
Hi,
I am contacting an SMTP mail server which works with my normal mail clients
via TLS but fails with:
Email::Sender::Transport::SMTP::TLS calling Net::SMTP::TLS::ButMaintained v
0.16
After a little debugging I believe the problem is as follows:
When contacted initially via the ->new call the $me->_response() gets the
rsp = 220 it needs to continue.
However, this particular SMTP server is sending 3 lines in response
informing the world it will not accept spam, each with a 220 code and
continuation separator.
->new is only processing the first of these three, leaving 2 of the 220
responses on the socket.
When we get to the EHLO, you issue the command and then check for a 250 to
confirm a response but grab the second 220 from socket and the routine
croaks.
I have patched my version in ->new with a one line while loop to discard 220
continuation messages, similar to your code in the hello response.
I hope this makes sense and I have read the sequence correctly. It may also
be the multi-line introduction from the server is not RFC compliant for all
I know.
Either way, I am appreciative for the perl support community, for cpan, and
to you for providing this routine in the first place so I thought I'd try
and contribute my tuppence by reporting this.
Kind regards
Chris Baker