mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-01-12 19:20:12 +01:00
fixed an smtp chat bug related to multiple transactions
This commit is contained in:
parent
0e30f9bd57
commit
22d9828e8f
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#define VERSION "0.1.22"
|
#define VERSION "0.1.22"
|
||||||
|
|
||||||
#define BUILD 732
|
#define BUILD 734
|
||||||
|
|
||||||
#define HOSTID "mailarchiver"
|
#define HOSTID "mailarchiver"
|
||||||
|
|
||||||
|
@ -357,10 +357,20 @@ AFTER_PERIOD:
|
|||||||
|
|
||||||
if(strncasecmp(buf, SMTP_CMD_MAIL_FROM, strlen(SMTP_CMD_MAIL_FROM)) == 0){
|
if(strncasecmp(buf, SMTP_CMD_MAIL_FROM, strlen(SMTP_CMD_MAIL_FROM)) == 0){
|
||||||
|
|
||||||
if(state != SMTP_STATE_HELO){
|
if(state != SMTP_STATE_HELO && state != SMTP_STATE_PERIOD){
|
||||||
strncat(resp, SMTP_RESP_503_ERR, MAXBUFSIZE-1);
|
strncat(resp, SMTP_RESP_503_ERR, MAXBUFSIZE-1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
if(state == SMTP_STATE_PERIOD){
|
||||||
|
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: initiated new transaction", sdata.ttmpfile);
|
||||||
|
|
||||||
|
unlink(sdata.ttmpfile);
|
||||||
|
unlink(sdata.tmpframe);
|
||||||
|
|
||||||
|
init_session_data(&sdata);
|
||||||
|
}
|
||||||
|
|
||||||
state = SMTP_STATE_MAIL_FROM;
|
state = SMTP_STATE_MAIL_FROM;
|
||||||
|
|
||||||
snprintf(sdata.mailfrom, SMALLBUFSIZE-1, "%s\r\n", buf);
|
snprintf(sdata.mailfrom, SMALLBUFSIZE-1, "%s\r\n", buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user