improved the esmtp parser

This commit is contained in:
SJ 2012-06-20 10:28:20 +02:00
parent 19784163be
commit 5a356f0148

View File

@ -391,14 +391,13 @@ AFTER_PERIOD:
state = SMTP_STATE_FINISHED; state = SMTP_STATE_FINISHED;
snprintf(buf, MAXBUFSIZE-1, SMTP_RESP_221_GOODBYE, cfg->hostid); snprintf(buf, MAXBUFSIZE-1, SMTP_RESP_221_GOODBYE, cfg->hostid);
send(new_sd, buf, strlen(buf), 0); strncat(resp, buf, MAXBUFSIZE-1);
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: sent: %s", sdata.ttmpfile, buf);
unlink(sdata.ttmpfile); unlink(sdata.ttmpfile);
unlink(sdata.tmpframe); unlink(sdata.tmpframe);
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: removed", sdata.ttmpfile); if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: removed", sdata.ttmpfile);
goto QUITTING; continue;
} }
@ -438,6 +437,10 @@ AFTER_PERIOD:
memset(resp, 0, MAXBUFSIZE); memset(resp, 0, MAXBUFSIZE);
} }
if(state == SMTP_STATE_FINISHED){
goto QUITTING;
}
} /* while */ } /* while */
/* /*