diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/runner.c | 12 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 9 |
2 files changed, 7 insertions, 14 deletions
diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c index 40446e470d5..b4c79c960a0 100644 --- a/usr.sbin/smtpd/runner.c +++ b/usr.sbin/smtpd/runner.c @@ -1,4 +1,4 @@ -/* $OpenBSD: runner.c,v 1.13 2009/01/04 19:23:06 jacekm Exp $ */ +/* $OpenBSD: runner.c,v 1.14 2009/01/04 19:25:19 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -516,13 +516,8 @@ runner_process_envelope(struct smtpd *env, char *msgid, char *evpid) tm = time(NULL); - if (! runner_message_schedule(&message, tm)) { - if (message.flags & F_MESSAGE_EXPIRED) { - log_debug("message has expired, mdaemon"); - queue_remove_envelope(&message); - } + if (! runner_message_schedule(&message, tm)) return; - } message.flags |= F_MESSAGE_SCHEDULED; queue_update_envelope(&message); @@ -726,12 +721,11 @@ runner_message_schedule(struct message *messagep, time_t tm) /* Batch has been in the queue for too long and expired */ if (tm - messagep->creation >= SMTPD_QUEUE_EXPIRY) { - messagep->flags |= F_MESSAGE_EXPIRED; + queue_remove_envelope(messagep); return 0; } if (messagep->retry == 255) { - messagep->flags |= F_MESSAGE_EXPIRED; return 0; } diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index c70ed7e8dd8..5d6136e89f9 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.41 2009/01/04 17:45:58 gilles Exp $ */ +/* $OpenBSD: smtpd.h,v 1.42 2009/01/04 19:25:19 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -390,10 +390,9 @@ enum message_status { enum message_flags { F_MESSAGE_RESOLVED = 0x1, - F_MESSAGE_EXPIRED = 0x2, - F_MESSAGE_SCHEDULED = 0x4, - F_MESSAGE_PROCESSING = 0x8, - F_MESSAGE_AUTHENTICATED = 0x10 + F_MESSAGE_SCHEDULED = 0x2, + F_MESSAGE_PROCESSING = 0x4, + F_MESSAGE_AUTHENTICATED = 0x8 }; struct message { |