summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/queue.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2013-10-27 17:47:54 +0000
committerEric Faurot <eric@cvs.openbsd.org>2013-10-27 17:47:54 +0000
commit2299126780a32cd17905cda2365073d145ee0442 (patch)
tree170c5c07573663d85e4b9463d686a31e004d83b6 /usr.sbin/smtpd/queue.c
parente8227a9080380ea759f6cd0c08263e560feaa0e2 (diff)
Implement a feedback mechanism which allows the mta to "hold" envelopes
in the scheduler when it has too many tasks for a given relay. The envelopes are put on a wait queue, and are not scheduled again until the mta "releases" some envelopes from that queue. It prevents from having too many inflight envelopes, which are out of reach for the admin.
Diffstat (limited to 'usr.sbin/smtpd/queue.c')
-rw-r--r--usr.sbin/smtpd/queue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c
index d8e5e3679d8..bba07281584 100644
--- a/usr.sbin/smtpd/queue.c
+++ b/usr.sbin/smtpd/queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.c,v 1.154 2013/10/27 07:56:25 eric Exp $ */
+/* $OpenBSD: queue.c,v 1.155 2013/10/27 17:47:53 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -414,6 +414,8 @@ queue_imsg(struct mproc *p, struct imsg *imsg)
m_close(p_scheduler);
return;
+ case IMSG_DELIVERY_HOLD:
+ case IMSG_DELIVERY_RELEASE:
case IMSG_MTA_SCHEDULE:
m_forward(p_scheduler, imsg);
return;