HELO/EHLO must be send again after RSET. Thats wrong
----------------------------------------------------
Key: JAMES-479
URL: http://issues.apache.org/jira/browse/JAMES-479
Project: James
Type: Bug
Components: SMTPServer
Reporter: Norman Maurer
Here is the orginal mail to james-dev:
Hi,
I recently upgraded from 2.2.0 to 2.3-dev.
I've set myself up now with source from svn.
Now that I have done so I find I have a problem with multiple mail
clients connecting to the smtpserver.
Below is a debug trace from the smtp log.
The symptom shows up that I get an error 503 response from the SMTP
server indicating that a MAIL command must be proceeded by a EHLO.
This seems to result because a RSET command is sent between the EHLO and
the MAIL.
Not sure why the client wants to do this though but they do seem to call
EHLO
MAIL
RCPT
RSET
RSET
MAIL
RCPT
DATA
This same client sequence does work with James 2.2.0.
Here is the smtp log showing the above sequence and the error 503 on the
second MAIL.
15/04/06 22:43:53 INFO smtpserver: Connection from localhost (127.0.0.1)
15/04/06 22:43:53 DEBUG smtpserver: Sent: 220 pjtconsulting SMTP Server
(JAMES S
MTP Server 2.3-dev) ready Sat, 15 Apr 2006 22:43:53 +1200 (NZST)
15/04/06 22:43:53 DEBUG smtpserver: Calling start()
15/04/06 22:43:53 DEBUG smtpserver: Watchdog default Worker #9 has time
to sleep
360000
15/04/06 22:43:53 DEBUG smtpserver: Lookup command handler for command: EHLO
15/04/06 22:43:53 DEBUG smtpserver: Sent: 250-pjtconsulting Hello
pjtconsulting
(localhost [127.0.0.1])
15/04/06 22:43:53 DEBUG smtpserver: Sent: 250-PIPELINING
15/04/06 22:43:53 DEBUG smtpserver: Sent: 250-ENHANCEDSTATUSCODES
15/04/06 22:43:53 DEBUG smtpserver: Sent: 250 8BITMIME
15/04/06 22:43:53 DEBUG smtpserver: Calling reset() default Worker #9
15/04/06 22:43:53 DEBUG smtpserver: Lookup command handler for command: MAIL
15/04/06 22:43:53 DEBUG smtpserver: Sent: 250 2.1.0 Sender
<[EMAIL PROTECTED]> OK
15/04/06 22:43:53 DEBUG smtpserver: Calling reset() default Worker #9
15/04/06 22:43:53 DEBUG smtpserver: Lookup command handler for command: RCPT
15/04/06 22:43:53 DEBUG smtpserver: Sent: 250 2.1.5 Recipient
<[EMAIL PROTECTED]
z> OK
15/04/06 22:43:53 DEBUG smtpserver: Calling reset() default Worker #9
15/04/06 22:43:53 DEBUG smtpserver: Lookup command handler for command: RSET
15/04/06 22:43:53 DEBUG smtpserver: Sent: 250 2.0.0 OK
15/04/06 22:43:53 DEBUG smtpserver: Calling reset() default Worker #9
15/04/06 22:43:53 DEBUG smtpserver: Lookup command handler for command: RSET
15/04/06 22:43:53 DEBUG smtpserver: Sent: 250 2.0.0 OK
15/04/06 22:43:53 DEBUG smtpserver: Calling reset() default Worker #9
15/04/06 22:43:54 DEBUG smtpserver: Lookup command handler for command: MAIL
15/04/06 22:43:54 DEBUG smtpserver: Sent: 503 5.5.0 Need HELO or EHLO
before MAI
L
15/04/06 22:43:54 DEBUG smtpserver: Calling reset() default Worker #9
15/04/06 22:43:57 DEBUG smtpserver: Lookup command handler for command: QUIT
15/04/06 22:43:57 DEBUG smtpserver: Sent: 221 2.0.0 pjtconsulting
Service closin
g transmission channel
15/04/06 22:43:57 DEBUG smtpserver: Calling reset() default Worker #9
15/04/06 22:43:57 DEBUG smtpserver: Calling stop() default Worker #9
15/04/06 22:43:57 DEBUG smtpserver: Closing socket.
15/04/06 22:43:57 DEBUG smtpserver: Calling disposeWatchdog() default
Worker #9
15/04/06 22:43:57 DEBUG smtpserver: Watchdog default Worker #9 is
exiting run().
15/04/06 22:43:57 DEBUG smtpserver: Returning SMTPHandler to pool.
15/04/06 22:43:57 DEBUG smtpserver: Returning a
org.apache.james.smtpserver.SMTP
If I comment out the following code in the MailCmdHandler things seem
to work.
} else if (!session.getState().containsKey(SMTPSession.CURRENT_HELO_MODE)) {
responseString = "503
"+DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.DELIVERY_OTHER)+"
Need HELO or EHLO before MAIL";
session.writeResponse(responseString);
It would appear this code isnt correct. The RSET should only affect the
envelope and not affect the EHLO. Is this correct?
Rgds,
Phil
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]