james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6678] New: - fix for SMTP AUTH for Mac clients
Date Tue, 26 Feb 2002 11:31:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6678>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6678

fix for SMTP AUTH for Mac clients

           Summary: fix for SMTP AUTH for Mac clients
           Product: James
           Version: 2.0a2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: SMTPServer
        AssignedTo: james-dev@jakarta.apache.org
        ReportedBy: giles@leafinternet.com


SMTP AUTH on Mac clients (Outlook Express 5.0.2/5.0.3 and Mac OS X mail client) 
doesn't currently work with James 2.0a2.

The following changes to SMTPHandler.java seem to fix the issue:

    private void doHELO(String command,String argument,String argument1) {
        if (state.containsKey(CURRENT_HELO_MODE)) {
            out.println("250 " + state.get(SERVER_NAME)
            + " Duplicate HELO");
        } else if (argument == null) {
            out.println("501 domain address required: " + command);
        } else {
            state.put(CURRENT_HELO_MODE, command);
            state.put(NAME_GIVEN, argument);
            out.println( "250-" + 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)
            + " Duplicate EHLO");
        } else if (argument == null) {
            out.println("501 domain address required: " + command);
        } else {
            state.put(CURRENT_HELO_MODE, command);
            state.put(NAME_GIVEN, argument);
            
            if (maxmessagesize > 0) {
                out.println("250-SIZE " + maxmessagesize);
            }
            
            out.println( "250-" + state.get(SERVER_NAME) + " Hello "
            + argument + " (" + state.get(REMOTE_NAME)
            + " [" + state.get(REMOTE_IP) + "])");
            
            if (authRequired) {
                out.println("250 AUTH LOGIN PLAIN");
            }   
        }        
    }

Basically, the Hello response from the server was coming after the 250 AUTH 
message, and doHELO() wasn't doing the 250 AUTH message at all.

See also the challenge string fix I posted to a previous bug (necessary for 
other clients).

--
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