Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
2.0a2
-
None
-
None
-
Operating System: All
Platform: All
-
6678
Description
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))
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).