summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-01-13 14:01:59 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-01-13 14:01:59 +0000
commit455ed08623a520380394beebd1db9431a107c733 (patch)
tree454cf0ea6e99369619d4460a67040d067c3acac4 /usr.sbin/smtpd/smtpd.c
parent03f8509651d44f20f3bdec67d3f229743a48c988 (diff)
Stop using envelope->status to report delivery outcome to the
runner/queue. Instead, replace IMSG_QUEUE_MESSAGE_UPDATE with three messages: - IMSG_QUEUE_DELIVERY_OK - IMSG_QUEUE_DELIVERY_TEMPFAIL - IMSG_QUEUE_DELIVERY_PERMFAIL 1) it's less confusing as status is also used by smtp 2) it's easier to see what happens just looking at imsg traces 3) it makes the code path generally easier to follow 4) it's safer because it enforces clear semantics and intent, whereas the status field is loosely defined and could carry bogus values. ok gilles@ chl@
Diffstat (limited to 'usr.sbin/smtpd/smtpd.c')
-rw-r--r--usr.sbin/smtpd/smtpd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 3197f8ac759..4a97c923f04 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.146 2012/01/12 18:06:18 eric Exp $ */
+/* $OpenBSD: smtpd.c,v 1.147 2012/01/13 14:01:58 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -1199,7 +1199,10 @@ imsg_to_str(int type)
CASE(IMSG_QUEUE_RESUME_MDA);
CASE(IMSG_QUEUE_RESUME_MTA);
- CASE(IMSG_QUEUE_MESSAGE_UPDATE);
+ CASE(IMSG_QUEUE_DELIVERY_OK);
+ CASE(IMSG_QUEUE_DELIVERY_TEMPFAIL);
+ CASE(IMSG_QUEUE_DELIVERY_PERMFAIL);
+
CASE(IMSG_QUEUE_MESSAGE_FD);
CASE(IMSG_QUEUE_MESSAGE_FILE);
CASE(IMSG_QUEUE_SCHEDULE);