diff options
-rw-r--r-- | doc/doc-docbook/spec.xfpt | 7 | ||||
-rw-r--r-- | src/src/daemon.c | 5 | ||||
-rw-r--r-- | src/src/exim.c | 11 | ||||
-rw-r--r-- | test/log/0574 | 10 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0574 | 22 | ||||
-rw-r--r-- | test/stdout/0574 | 6 |
6 files changed, 52 insertions, 9 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index bb00fa1d2..7b1e1ecb6 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -4465,15 +4465,16 @@ be done. If a message requires any remote deliveries, it remains on the queue for later delivery. .new -.vitem &%-q[q][i][f[f]][l][G<name>]%& +.vitem &%-q[q][i][f[f]][l][G<name>[/<time>]]]%& .oindex "&%-qG%&" .cindex queue named .cindex "named queues" .cindex "queue" "delivering specific messages" If the &'G'& flag and a name is present, the queue runner operates on the queue with the given name rather than the default queue. -Because the name is the remainder of the option string, any -periodic-run interval must be given as a separate &%-q%& option. +The name should not contain a &'/'& character. +For a periodic queue run (see below) +append to the name a slash and a time value. .wen .vitem &%-q%&<&'qflags'&>&~<&'start&~id'&>&~<&'end&~id'&> diff --git a/src/src/daemon.c b/src/src/daemon.c index 635b94055..60ef33773 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -1835,7 +1835,10 @@ for (;;) if (deliver_force_thaw) *p++ = 'f'; if (queue_run_local) *p++ = 'l'; *p = 0; - extra[0] = opt; + if (queue_name) + extra[0] = string_sprintf("%sG%s", opt, queue_name); + else + extra[0] = opt; /* If -R or -S were on the original command line, ensure they get passed on. */ diff --git a/src/src/exim.c b/src/src/exim.c index e4597c287..ea0d0b790 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -3243,8 +3243,11 @@ for (i = 1; i < argc; i++) if (*argrest == 'G') { - queue_name = string_copy(argrest+1); - do ++argrest; while (*argrest); + int i; + for (argrest++, i = 0; argrest[i] && argrest[i] != '/'; ) i++; + queue_name = string_copyn(argrest, i); + argrest += i; + if (*argrest == '/') argrest++; } /* -q[f][f][l][G<name>]: Run the queue, optionally forced, optionally local @@ -3260,8 +3263,8 @@ for (i = 1; i < argc; i++) stop_queue_run_id = argv[++i]; } - /* -q[f][f][l]<n>: Run the queue at regular intervals, optionally forced, - optionally local only. */ + /* -q[f][f][l][G<name>/]<n>: Run the queue at regular intervals, optionally + forced, optionally local only, optionally named. */ else { diff --git a/test/log/0574 b/test/log/0574 index 70b22192a..6b3ed743c 100644 --- a/test/log/0574 +++ b/test/log/0574 @@ -10,3 +10,13 @@ 1999-03-02 09:44:33 10HmaY-0005vi-00 => alternate <alternate@test.ex> F=<CALLER@the.local.host.name> Q=alternate R=all T=dump 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 End 'alternate' queue run: pid=pppp +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local-smtp S=sss Q=lowpri for lowpri@test.ex + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, -q3s, not listening for SMTP +1999-03-02 09:44:33 Start 'lowpri' queue run: pid=pppp +1999-03-02 09:44:33 End 'lowpri' queue run: pid=pppp +1999-03-02 09:44:33 Start 'lowpri' queue run: pid=pppp +1999-03-02 09:44:33 10HmaZ-0005vi-00 => lowpri <lowpri@test.ex> F=<CALLER@the.local.host.name> Q=lowpri R=all T=dump +1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed +1999-03-02 09:44:33 End 'lowpri' queue run: pid=pppp diff --git a/test/scripts/0000-Basic/0574 b/test/scripts/0000-Basic/0574 index 162b51f85..3c7a06c5a 100644 --- a/test/scripts/0000-Basic/0574 +++ b/test/scripts/0000-Basic/0574 @@ -1,6 +1,8 @@ # named queues # Exim test configuration 0574 # +no_msglog_check +# exim -bs MAIL FROM:<CALLER@myhost.test.ex> RCPT TO: <normal@test.ex> @@ -29,4 +31,22 @@ exim -qGnosuchqueue exim -qGalternate **** # -no_msglog_check +# +# +exim -DSERVER=server -qGlowpri/3s +**** +sleep 1 +exim -bs +MAIL FROM:<CALLER@myhost.test.ex> +RCPT TO: <lowpri@test.ex> +DATA +Subject: test + +foo +. +QUIT +**** +# +sleep 3 +# +killdaemon diff --git a/test/stdout/0574 b/test/stdout/0574 index 47285d74a..608078ed1 100644 --- a/test/stdout/0574 +++ b/test/stdout/0574 @@ -9,3 +9,9 @@ 354 Enter message, ending with "." on a line by itself
250 OK id=10HmaY-0005vi-00
221 the.local.host.name closing connection
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaZ-0005vi-00
+221 the.local.host.name closing connection
|