diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-09-04 13:33:01 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-09-04 13:33:01 +0000 |
commit | b92cc5cf33a4b2f0b7cbfc2f9296122e0a715ea2 (patch) | |
tree | 3d7206b3e18cc96de7f2c5956fae7471514650a2 | |
parent | 2498fede76f2da713b399a4afb44a74d9b284747 (diff) |
Fix scheduling of bounce messages.
From gilles@
-rw-r--r-- | usr.sbin/smtpd/queue_shared.c | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/runner.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/smtpd/queue_shared.c b/usr.sbin/smtpd/queue_shared.c index dc02b120d60..3d184e62361 100644 --- a/usr.sbin/smtpd/queue_shared.c +++ b/usr.sbin/smtpd/queue_shared.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue_shared.c,v 1.23 2009/09/04 11:44:23 jacekm Exp $ */ +/* $OpenBSD: queue_shared.c,v 1.24 2009/09/04 13:33:00 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -299,6 +299,8 @@ bounce_delete_message(char *msgid) int bounce_record_envelope(struct message *message) { + message->lasttry = 0; + message->retry = 0; return queue_record_layout_envelope(PATH_BOUNCE, message); } diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c index 59fd7345022..8d1b9c1b1c9 100644 --- a/usr.sbin/smtpd/runner.c +++ b/usr.sbin/smtpd/runner.c @@ -1,4 +1,4 @@ -/* $OpenBSD: runner.c,v 1.65 2009/09/04 11:44:23 jacekm Exp $ */ +/* $OpenBSD: runner.c,v 1.66 2009/09/04 13:33:00 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -775,9 +775,6 @@ runner_message_schedule(struct message *messagep, time_t tm) { time_t delay; - if (messagep->type == T_BOUNCE_MESSAGE) - return 1; - if (messagep->flags & (F_MESSAGE_SCHEDULED|F_MESSAGE_PROCESSING)) return 0; @@ -798,7 +795,8 @@ runner_message_schedule(struct message *messagep, time_t tm) delay = SMTPD_QUEUE_MAXINTERVAL; - if (messagep->type & T_MDA_MESSAGE) { + if (messagep->type == T_MDA_MESSAGE || + messagep->type == T_BOUNCE_MESSAGE) { if (messagep->status & S_MESSAGE_LOCKFAILURE) { if (messagep->retry < 128) return 1; @@ -813,7 +811,7 @@ runner_message_schedule(struct message *messagep, time_t tm) } } - if (messagep->type & T_MTA_MESSAGE) { + if (messagep->type == T_MTA_MESSAGE) { if (messagep->retry < 3) delay = SMTPD_QUEUE_INTERVAL; else if (messagep->retry <= 7) { |