diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-01-04 19:37:42 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-01-04 19:37:42 +0000 |
commit | 5f61b60a6b0e894f17c28cac99a3482809e5c91c (patch) | |
tree | 3e4780b60352ac89371bc06211486df130824e86 /usr.sbin/smtpd/parser.c | |
parent | 199a745fdcd9bc8c19dce443d37061a3fc8dc147 (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/parser.c')
-rw-r--r-- | usr.sbin/smtpd/parser.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/parser.c b/usr.sbin/smtpd/parser.c index 6ade78d00dd..291d2bc5272 100644 --- a/usr.sbin/smtpd/parser.c +++ b/usr.sbin/smtpd/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.3 2008/12/27 16:45:01 jacekm Exp $ */ +/* $OpenBSD: parser.c,v 1.4 2009/01/04 19:37:41 gilles Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -56,12 +56,16 @@ struct token { static const struct token t_main[]; static const struct token t_show[]; +static const struct token t_pause[]; +static const struct token t_resume[]; static const struct token t_main[] = { {KEYWORD, "show", NONE, t_show}, {KEYWORD, "monitor", MONITOR, NULL}, + {KEYWORD, "pause", NONE, t_pause}, {KEYWORD, "reload", RELOAD, NULL}, - {KEYWORD, "stop", SHUTDOWN, NULL}, + {KEYWORD, "resume", NONE, t_resume}, + {KEYWORD, "stop", SHUTDOWN, NULL}, {ENDTOKEN, "", NONE, NULL} }; @@ -71,6 +75,18 @@ static const struct token t_show[] = { {ENDTOKEN, "", NONE, NULL} }; +static const struct token t_pause[] = { + {KEYWORD, "local", PAUSE_MDA, NULL}, + {KEYWORD, "outgoing", PAUSE_MTA, NULL}, + {ENDTOKEN, "", NONE, NULL} +}; + +static const struct token t_resume[] = { + {KEYWORD, "local", RESUME_MDA, NULL}, + {KEYWORD, "outgoing", RESUME_MTA, NULL}, + {ENDTOKEN, "", NONE, NULL} +}; + static struct parse_result res; struct parse_result * |