summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/queue.c')
-rw-r--r--usr.sbin/smtpd/queue.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c
index 035d552da60..53af5771912 100644
--- a/usr.sbin/smtpd/queue.c
+++ b/usr.sbin/smtpd/queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.c,v 1.70 2009/09/15 16:50:06 jacekm Exp $ */
+/* $OpenBSD: queue.c,v 1.71 2009/10/12 22:34:37 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -56,6 +56,9 @@ int queue_remove_layout_envelope(char *, struct message *);
int queue_commit_layout_message(char *, struct message *);
int queue_open_layout_messagefile(char *, struct message *);
+void queue_submit_envelope(struct smtpd *, struct message *);
+void queue_commit_envelopes(struct smtpd *, struct message*);
+
void
queue_sig_handler(int sig, short event, void *p)
{
@@ -410,8 +413,8 @@ queue_dispatch_lka(int sig, short event, void *p)
messagep->id = queue_generate_id();
ss.id = messagep->session_id;
- if (IS_MAILBOX(messagep->recipient.rule.r_action) ||
- IS_EXT(messagep->recipient.rule.r_action))
+ if (IS_MAILBOX(messagep->recipient) ||
+ IS_EXT(messagep->recipient))
messagep->type = T_MDA_MESSAGE;
else
messagep->type = T_MTA_MESSAGE;
@@ -612,3 +615,19 @@ queue_purge(char *queuepath)
qwalk_close(q);
}
+
+void
+queue_submit_envelope(struct smtpd *env, struct message *message)
+{
+ imsg_compose_event(env->sc_ievs[PROC_QUEUE],
+ IMSG_QUEUE_SUBMIT_ENVELOPE, 0, 0, -1,
+ message, sizeof(struct message));
+}
+
+void
+queue_commit_envelopes(struct smtpd *env, struct message *message)
+{
+ imsg_compose_event(env->sc_ievs[PROC_QUEUE],
+ IMSG_QUEUE_COMMIT_ENVELOPES, 0, 0, -1,
+ message, sizeof(struct message));
+}