1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00

SMTP: implement RSET (reset) command to avoid connection timeout with Evolution

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@911 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-01-14 13:54:39 +00:00
parent eaed630ea4
commit 1dbb37dbc1

View File

@ -150,8 +150,20 @@ public class SmtpConnection extends AbstractConnection {
state = State.AUTHENTICATED;
sendClient("503 Bad sequence of commands");
}
}
} else if ("RSET".equalsIgnoreCase(command)) {
recipients.clear();
if (state == State.STARTMAIL ||
state == State.RECIPIENT ||
state == State.MAILDATA) {
state = State.AUTHENTICATED;
} else {
state = State.INITIAL;
}
sendClient("250 OK Reset");
} else {
sendClient("500 Unrecognized command");
}
} else {
sendClient("500 Unrecognized command");
}