summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-04-12 15:42:14 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-04-12 15:42:14 +0000
commitaae7d916d860cc4ad9d379d122066f0727313465 (patch)
tree3db3294e71961cf06640c7e7c5d5fa96e6eb88ab /usr.sbin
parent57dee064b5bcd9a1f40b7e5bd39092ed1a7698b9 (diff)
When runner_check_loop() detects a mail loop, remove the envelope. This is
only half of the problem solved, we need to generate a mailer daemon too. This fixes a bug in my smtpd where it would try to schedule a message, detect that it is a loop and not schedule it, then trying again at next queue walk ...
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/runner.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c
index 92023e7a788..e01c96b34de 100644
--- a/usr.sbin/smtpd/runner.c
+++ b/usr.sbin/smtpd/runner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: runner.c,v 1.38 2009/03/29 14:18:20 jacekm Exp $ */
+/* $OpenBSD: runner.c,v 1.39 2009/04/12 15:42:13 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -528,7 +528,11 @@ runner_process_queue(struct smtpd *env)
if (! runner_message_schedule(&message, now))
continue;
- runner_check_loop(&message);
+ if (runner_check_loop(&message)) {
+ log_debug("TODO: generate mailer daemon");
+ queue_remove_envelope(&message);
+ continue;
+ }
message.flags |= F_MESSAGE_SCHEDULED;
message.flags &= ~F_MESSAGE_FORCESCHEDULE;