james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bagnara (JIRA)" <server-...@james.apache.org>
Subject [jira] Resolved: (JAMES-445) Enforcement for HELO/EHLO commands before MAIL
Date Wed, 01 Mar 2006 10:35:41 GMT
     [ http://issues.apache.org/jira/browse/JAMES-445?page=all ]
     
Stefano Bagnara resolved JAMES-445:
-----------------------------------

    Fix Version: 2.3.0a2
     Resolution: Fixed

Updated to correctly support the state reset to allow multiple mails to be sent in the same
connection.

> Enforcement for HELO/EHLO commands before MAIL
> ----------------------------------------------
>
>          Key: JAMES-445
>          URL: http://issues.apache.org/jira/browse/JAMES-445
>      Project: James
>         Type: Improvement
>   Components: SMTPServer
>     Versions: 2.2.0, 2.3.0a1
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>     Priority: Minor
>      Fix For: 2.3.0a2

>
> From Norman Maurer:
> Hi,
> this is my first Patch so i hope its correct posted and made.. It patch
> the MailCmdHandler to check if a HELO was provided.. 
> So HELO should be provided as first command.. this is wrote down in the
> RFC. So before accept MAIL FROM the HELO must provided..
> Comments are welcome
> bye
> Norman
> -----------------------------------------------
> --- MailCmdHandlerOLD.java	2006-02-17 12:23:26.000000000 +0100
> +++ MailCmdHandler.java	2006-02-17 12:25:34.000000000 +0100
> @@ -29,6 +29,8 @@
>  public class MailCmdHandler
>      extends AbstractLogEnabled
>      implements CommandHandler {
> +    
> +    private final static String CURRENT_HELO_MODE = "CURRENT_HELO_MODE"; // HELO or
EHLO
>  
>      private final static String MAIL_OPTION_SIZE = "SIZE";
>  
> @@ -70,6 +72,9 @@
>                     || sender == null) {
>              responseString = "501 "+DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.DELIVERY_INVALID_ARG)+"
Usage: MAIL FROM:<sender>";
>              session.writeResponse(responseString);
> +        } else if (session.getState().containsKey(CURRENT_HELO_MODE) == false ) {
> +            responseString = "501 "+DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.DELIVERY_INVALID_ARG)+"
HELO needed first";
> +            session.writeResponse(responseString);
>          } else {
>              sender = sender.trim();
>              // the next gt after the first lt ... AUTH may add more <>

-- 
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message