james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/james/smtpserver SMTPHandler.java
Date Wed, 17 Apr 2002 03:19:33 GMT
serge       02/04/16 20:19:33

  Modified:    src/java/org/apache/james/smtpserver SMTPHandler.java
  Log:
  Patched as per Giles Chanot's bug 6678 to address some weird SMTP 250 response order issues
that appeared with some MacOS clients.
  
  Revision  Changes    Path
  1.17      +24 -8     jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java
  
  Index: SMTPHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SMTPHandler.java	4 Feb 2002 15:34:11 -0000	1.16
  +++ SMTPHandler.java	17 Apr 2002 03:19:32 -0000	1.17
  @@ -43,8 +43,8 @@
    * @author Danny Angus <danny@thought.co.uk>
    *
   
  - * This is $Revision: 1.16 $
  - * Committed on $Date: 2002/02/04 15:34:11 $ by: $Author: danny $
  + * This is $Revision: 1.17 $
  + * Committed on $Date: 2002/04/17 03:19:32 $ by: $Author: serge $
   
    */
   public class SMTPHandler
  @@ -262,11 +262,21 @@
           } else {
               state.put(CURRENT_HELO_MODE, command);
               state.put(NAME_GIVEN, argument);
  -            out.println( "250 " + state.get(SERVER_NAME) + " Hello "
  +            if (authRequired) {
  +                //This is necessary because we're going to do a multiline response
  +                out.print("250-");
  +            } else {
  +                out.print("250 ");
  +            }
  +            out.println(state.get(SERVER_NAME) + " Hello "
                           + argument + " (" + state.get(REMOTE_NAME)
                           + " [" + state.get(REMOTE_IP) + "])");
  +            if (authRequired) {
  +                out.println("250 AUTH LOGIN PLAIN");
  +            }
           }
       }
  +
       private void doEHLO(String command,String argument,String argument1) {
           if (state.containsKey(CURRENT_HELO_MODE)) {
               out.println("250 " + state.get(SERVER_NAME)
  @@ -276,15 +286,21 @@
           } else {
               state.put(CURRENT_HELO_MODE, command);
               state.put(NAME_GIVEN, argument);
  -        if (authRequired) {
  -            out.println("250-AUTH LOGIN PLAIN");
  +            if (maxmessagesize > 0) {
  +                out.println("250-SIZE " + maxmessagesize);
               }
  -        if (maxmessagesize > 0) {
  -            out.println("250-SIZE " + maxmessagesize);
  +            if (authRequired) {
  +                //This is necessary because we're going to do a multiline response
  +                out.print("250-");
  +            } else {
  +                out.print("250 ");
               }
  -            out.println( "250 " + state.get(SERVER_NAME) + " Hello "
  +            out.println(state.get(SERVER_NAME) + " Hello "
                           + argument + " (" + state.get(REMOTE_NAME)
                           + " [" + state.get(REMOTE_IP) + "])");
  +            if (authRequired) {
  +                out.println("250 AUTH LOGIN PLAIN");
  +            }
   
   
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message