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:
parent
eaed630ea4
commit
1dbb37dbc1
@ -150,8 +150,20 @@ public class SmtpConnection extends AbstractConnection {
|
|||||||
state = State.AUTHENTICATED;
|
state = State.AUTHENTICATED;
|
||||||
sendClient("503 Bad sequence of commands");
|
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 {
|
} else {
|
||||||
sendClient("500 Unrecognized command");
|
sendClient("500 Unrecognized command");
|
||||||
}
|
}
|
||||||
@ -164,7 +176,7 @@ public class SmtpConnection extends AbstractConnection {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
DavGatewayTray.log(e);
|
DavGatewayTray.log(e);
|
||||||
try {
|
try {
|
||||||
sendClient("500 " + ((e.getMessage()==null)?e:e.getMessage()));
|
sendClient("500 " + ((e.getMessage() == null) ? e : e.getMessage()));
|
||||||
} catch (IOException e2) {
|
} catch (IOException e2) {
|
||||||
DavGatewayTray.debug(new BundleMessage("LOG_EXCEPTION_SENDING_ERROR_TO_CLIENT"), e2);
|
DavGatewayTray.debug(new BundleMessage("LOG_EXCEPTION_SENDING_ERROR_TO_CLIENT"), e2);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user