You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Rick McGuire (JIRA)" <ji...@apache.org> on 2007/08/21 12:45:31 UTC

[jira] Created: (GERONIMO-3427) STMP login fails if server sends multiple lines of response back from initial connection.

STMP login fails if server sends multiple lines of response back from initial connection.
-----------------------------------------------------------------------------------------

                 Key: GERONIMO-3427
                 URL: https://issues.apache.org/jira/browse/GERONIMO-3427
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: mail
    Affects Versions: 1.1.x, 1.2, 2.0.x
            Reporter: Rick McGuire
            Assignee: Rick McGuire


>From the user list description:

I am trying to use the Geronimo Javamail.  I have setup the resource and
resource-ref stuff and try to send a mail from the application.  I turn off
the debug flag and see the following in the console:-

...
220-xxx.xxx.xxx ESMTP Exim x.xx #1 Mon, 20 Aug 2007 16:29:11 +0800
EHLO xxxxx
220-We do not authorize the use of this system to transport unsolicted,
HELO xxxxx
220 and/or bulk email.
...

An exception is then thrown complaining that it fails to send HELO to the
server.

When using telnet xxxx 25 to my SMTP server, I found out that once
connected, the SMTP is sending back three lines of text:-
220-xxx.xxx.xxx ESMTP Exim x.xx #1 Mon, 20 Aug 2007 16:29:11 +0800
220-We do not authorize the use of this system to transport unsolicted,
220 and/or bulk email.

I then try with a local SMTP using Apache JAMES, which successfully send the
mail.  When I try to telnet localhost 25, it is sending back only one line
of text:-

220 xxxx SMTP Server (JAMES SMTP Server 2.3.1) ready Mon, 20 Aug 2007
16:32:26 +0800 (SGT)

I am suspecting Geronimo Javamail implementation (version 1.1.1) cannot be
used on SMTP who sends back more than 1 lines of 220 service ready.  I
investigate the source code of
org.apache.geronimo.javamail.transport.smtp.SMTPTransport and study that
getReply() method is using the receiveLine() method to read response from
the server.  As receivedLine() is using end of stream (read() ==-1) or CR or
LF to indicate end of response from server, so in the above scenario each
220 are identified as a response from the server.  After receiving the first
220, the client send a EHLO but fails as the server is sending back the 2nd
220.  The client then try to send a HELO but receive the 3rd 220, which it
finally gave up and throw a fails to send HELO exception.

I have switch to Sun Javamail implementation to solve the problem.  However,
I personally prefer to use Geronimo implementation due to installation
issue.  Is there a better way, or is it in the later version (Geronimo 1.2,
2.0, I didn't try  :P), the Geronimo Javamail can handle SMTP that sends
more than 1 lines of 220 back to client (like the SMTP server that I am
facing)?

Thanks in advance for any advice.

Best Regards,
Chee Seng

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMO-3427) STMP login fails if server sends multiple lines of response back from initial connection.

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick McGuire closed GERONIMO-3427.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

Committed revision 569336.

> STMP login fails if server sends multiple lines of response back from initial connection.
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-3427
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3427
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>    Affects Versions: 1.1.x, 1.2, 2.0.x
>            Reporter: Rick McGuire
>            Assignee: Rick McGuire
>             Fix For: 2.1
>
>
> From the user list description:
> I am trying to use the Geronimo Javamail.  I have setup the resource and
> resource-ref stuff and try to send a mail from the application.  I turn off
> the debug flag and see the following in the console:-
> ...
> 220-xxx.xxx.xxx ESMTP Exim x.xx #1 Mon, 20 Aug 2007 16:29:11 +0800
> EHLO xxxxx
> 220-We do not authorize the use of this system to transport unsolicted,
> HELO xxxxx
> 220 and/or bulk email.
> ...
> An exception is then thrown complaining that it fails to send HELO to the
> server.
> When using telnet xxxx 25 to my SMTP server, I found out that once
> connected, the SMTP is sending back three lines of text:-
> 220-xxx.xxx.xxx ESMTP Exim x.xx #1 Mon, 20 Aug 2007 16:29:11 +0800
> 220-We do not authorize the use of this system to transport unsolicted,
> 220 and/or bulk email.
> I then try with a local SMTP using Apache JAMES, which successfully send the
> mail.  When I try to telnet localhost 25, it is sending back only one line
> of text:-
> 220 xxxx SMTP Server (JAMES SMTP Server 2.3.1) ready Mon, 20 Aug 2007
> 16:32:26 +0800 (SGT)
> I am suspecting Geronimo Javamail implementation (version 1.1.1) cannot be
> used on SMTP who sends back more than 1 lines of 220 service ready.  I
> investigate the source code of
> org.apache.geronimo.javamail.transport.smtp.SMTPTransport and study that
> getReply() method is using the receiveLine() method to read response from
> the server.  As receivedLine() is using end of stream (read() ==-1) or CR or
> LF to indicate end of response from server, so in the above scenario each
> 220 are identified as a response from the server.  After receiving the first
> 220, the client send a EHLO but fails as the server is sending back the 2nd
> 220.  The client then try to send a HELO but receive the 3rd 220, which it
> finally gave up and throw a fails to send HELO exception.
> I have switch to Sun Javamail implementation to solve the problem.  However,
> I personally prefer to use Geronimo implementation due to installation
> issue.  Is there a better way, or is it in the later version (Geronimo 1.2,
> 2.0, I didn't try  :P), the Geronimo Javamail can handle SMTP that sends
> more than 1 lines of 220 back to client (like the SMTP server that I am
> facing)?
> Thanks in advance for any advice.
> Best Regards,
> Chee Seng

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.