summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpctl.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-01-04 19:37:42 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-01-04 19:37:42 +0000
commit5f61b60a6b0e894f17c28cac99a3482809e5c91c (patch)
tree3e4780b60352ac89371bc06211486df130824e86 /usr.sbin/smtpd/smtpctl.c
parent199a745fdcd9bc8c19dce443d37061a3fc8dc147 (diff)
- runner is now capable of pausing/resuming the scheduling of deliveries
for both mda and mta batches. - smtpctl can be used to disable/enable deliveries at runtime using the pause/resume commands. ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd/smtpctl.c')
-rw-r--r--usr.sbin/smtpd/smtpctl.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index 92dd314eb71..51a3c2c586e 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.3 2008/12/27 16:45:01 jacekm Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.4 2009/01/04 19:37:41 gilles Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -138,6 +138,18 @@ connected:
case RELOAD:
imsg_compose(ibuf, IMSG_CONF_RELOAD, 0, 0, -1, NULL, 0);
break;
+ case PAUSE_MDA:
+ imsg_compose(ibuf, IMSG_RUNNER_PAUSE_MDA, 0, 0, -1, NULL, 0);
+ break;
+ case PAUSE_MTA:
+ imsg_compose(ibuf, IMSG_RUNNER_PAUSE_MTA, 0, 0, -1, NULL, 0);
+ break;
+ case RESUME_MDA:
+ imsg_compose(ibuf, IMSG_RUNNER_RESUME_MDA, 0, 0, -1, NULL, 0);
+ break;
+ case RESUME_MTA:
+ imsg_compose(ibuf, IMSG_RUNNER_RESUME_MTA, 0, 0, -1, NULL, 0);
+ break;
case MONITOR:
/* XXX */
break;
@@ -163,6 +175,10 @@ connected:
switch(res->action) {
case RELOAD:
case SHUTDOWN:
+ case PAUSE_MDA:
+ case PAUSE_MTA:
+ case RESUME_MDA:
+ case RESUME_MTA:
done = show_command_output(&imsg);
break;
case NONE: