diff --git a/src/misc.c b/src/misc.c index f08dd239..3eeaa7a1 100644 --- a/src/misc.c +++ b/src/misc.c @@ -666,7 +666,7 @@ int can_i_write_current_directory(){ void move_email(struct smtp_session *session){ char buf[SMALLBUFSIZE]; - snprintf(buf, sizeof(buf)-1, "%d/%s", session->ttmpfile[RND_STR_LEN-1] % session->cfg->number_of_worker_processes, session->ttmpfile); + snprintf(buf, sizeof(buf)-1, "%d/%s", session->ttmpfile[0] % session->cfg->number_of_worker_processes, session->ttmpfile); if(rename(session->ttmpfile, buf)){ syslog(LOG_PRIORITY, "ERROR: couldn't rename %s to %s", session->ttmpfile, buf); diff --git a/src/smtp.c b/src/smtp.c index 9b38965f..2770fa4e 100644 --- a/src/smtp.c +++ b/src/smtp.c @@ -89,8 +89,6 @@ void process_data(struct smtp_session *session, char *readbuf, int readlen){ pos = searchStringInBuffer(&puf[0], len, SMTP_CMD_PERIOD, 5); if(pos > 0){ - //write(session->fd, puf, pos+2); - //session->tot_len += pos+2; write(session->fd, puf, pos); session->tot_len += pos; process_command_period(session);