diff options
author | Eric Faurot <eric@faurot.net> | 2013-06-25 12:47:01 +0200 |
---|---|---|
committer | Eric Faurot <eric@faurot.net> | 2013-06-25 12:47:01 +0200 |
commit | 0c40b0a1267377a36861d88e6be12df15fe52312 (patch) | |
tree | f244c166225c3109dc318a9ceef48fa0bc892dec /smtpd/parser.c | |
parent | Do not schedule mta envelopes in batch. (diff) | |
download | OpenSMTPD-0c40b0a1267377a36861d88e6be12df15fe52312.tar.xz OpenSMTPD-0c40b0a1267377a36861d88e6be12df15fe52312.zip |
Allow individual envelopes to be suspended in the scheduler.opensmtpd-201306271528
Associated commands are:
smtpctl pause envelope <id>
smtpctl resume envelope <id>
Diffstat (limited to 'smtpd/parser.c')
-rw-r--r-- | smtpd/parser.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/smtpd/parser.c b/smtpd/parser.c index 89865636..d84b795d 100644 --- a/smtpd/parser.c +++ b/smtpd/parser.c @@ -53,6 +53,8 @@ static const struct token t_remove[]; static const struct token t_resume[]; static const struct token t_resume_route[]; static const struct token t_schedule[]; +static const struct token t_pause_evp[]; +static const struct token t_resume_evp[]; static const struct token t_show[]; static const struct token t_show_envelope[]; static const struct token t_show_message[]; @@ -114,6 +116,7 @@ static const struct token t_pause[] = { {KEYWORD, "mda", PAUSE_MDA, NULL}, {KEYWORD, "mta", PAUSE_MTA, NULL}, {KEYWORD, "smtp", PAUSE_SMTP, NULL}, + {KEYWORD, "envelope", PAUSE_EVP, t_pause_evp}, {ENDTOKEN, "", NONE, NULL} }; @@ -121,10 +124,21 @@ static const struct token t_resume[] = { {KEYWORD, "mda", RESUME_MDA, NULL}, {KEYWORD, "mta", RESUME_MTA, NULL}, {KEYWORD, "smtp", RESUME_SMTP, NULL}, + {KEYWORD, "envelope", RESUME_EVP, t_resume_evp}, {KEYWORD, "route", RESUME_ROUTE, t_resume_route}, {ENDTOKEN, "", NONE, NULL} }; +static const struct token t_pause_evp[] = { + {VARIABLE, "id", PAUSE_EVP, NULL}, + {ENDTOKEN, "", NONE, NULL} +}; + +static const struct token t_resume_evp[] = { + {VARIABLE, "id", RESUME_EVP, NULL}, + {ENDTOKEN, "", NONE, NULL} +}; + static const struct token t_resume_route[] = { {VARIABLE, "id", RESUME_ROUTE, NULL}, {ENDTOKEN, "", NONE, NULL} |