summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mda.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-08-06 13:40:46 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-08-06 13:40:46 +0000
commit2ae4b5918b8e7e071b3421e081923a1f8d357c56 (patch)
treea9345247824966cb257b493c0a151b01bb024bfa /usr.sbin/smtpd/mda.c
parent939e6d47367841cb1f3ca05dbfb46c0f17c07331 (diff)
This commit reworks the entire mailer daemon support to actually make it
work for real. As an added bonus, it simplifies it, makes it follow the same code path as regular messages and kills quite some code from mta, mda and store. There's still some work needed but the most painful part is behind us now ;) ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd/mda.c')
-rw-r--r--usr.sbin/smtpd/mda.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.sbin/smtpd/mda.c b/usr.sbin/smtpd/mda.c
index d09a44ed93a..3c4a0492d75 100644
--- a/usr.sbin/smtpd/mda.c
+++ b/usr.sbin/smtpd/mda.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mda.c,v 1.23 2009/06/07 05:56:25 eric Exp $ */
+/* $OpenBSD: mda.c,v 1.24 2009/08/06 13:40:45 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -129,7 +129,6 @@ mda_dispatch_parent(int sig, short event, void *p)
struct session *s;
struct message *messagep;
enum message_status status;
- int (*store)(struct batch *, struct message *) = store_write_message;
IMSG_SIZE_CHECK(batchp);
@@ -154,12 +153,7 @@ mda_dispatch_parent(int sig, short event, void *p)
break;
}
- /* If batch is a daemon message, override the default store function */
- if (batchp->type & T_DAEMON_BATCH) {
- store = store_write_daemon;
- }
-
- if (store_message(batchp, messagep, store)) {
+ if (store_message(batchp, messagep)) {
if (batchp->message.recipient.rule.r_action == A_MAILDIR)
imsg_compose_event(env->sc_ievs[PROC_PARENT],
IMSG_PARENT_MAILBOX_RENAME, 0, 0, -1, batchp,