summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc-docbook/spec.xfpt17
-rw-r--r--doc/doc-txt/NewStuff3
-rw-r--r--src/src/exim.c26
3 files changed, 41 insertions, 5 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index ba32403d6..2018af992 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -3825,6 +3825,12 @@ This option is not intended for use by external callers. It is used internally
by Exim in conjunction with the &%-MC%& option. It signifies that the
remote host supports the ESMTP &_DSN_& extension.
+.vitem &%-MCG%&
+.oindex "&%-MCG%&"
+This option is not intended for use by external callers. It is used internally
+by Exim in conjunction with the &%-MC%& option. It signifies that an
+alternate queue is used, named by the following option.
+
.vitem &%-MCP%&
.oindex "&%-MCP%&"
This option is not intended for use by external callers. It is used internally
@@ -4456,8 +4462,17 @@ The &'l'& (the letter &"ell"&) flag specifies that only local deliveries are to
be done. If a message requires any remote deliveries, it remains on the queue
for later delivery.
-.vitem &%-q%&<&'qflags'&>&~<&'start&~id'&>&~<&'end&~id'&>
+.vitem &%-q[q][i][f[f]][l][G<name>]%&
+.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.
+
+.vitem &%-q%&<&'qflags'&>&~<&'start&~id'&>&~<&'end&~id'&>
When scanning the queue, Exim can be made to skip over messages whose ids are
lexically less than a given value by following the &%-q%& option with a
starting message id. For example:
diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff
index 07e6f1dba..1207c4974 100644
--- a/doc/doc-txt/NewStuff
+++ b/doc/doc-txt/NewStuff
@@ -12,6 +12,9 @@ Version 4.88
1. The new perl_tainmode option allows to run the embedded perl
interpreter in taint mode.
+ 2. Facility for named queues. A commandline argument can specify
+ the queue name for a queue-runner.
+
Version 4.87
------------
diff --git a/src/src/exim.c b/src/src/exim.c
index 4ea42fdc2..6432a4c2f 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -2716,12 +2716,22 @@ for (i = 1; i < argc; i++)
/* -MCD: set the smtp_use_dsn flag; this indicates that the host
that exim is connected to supports the esmtp extension DSN */
+
else if (Ustrcmp(argrest, "CD") == 0)
{
smtp_use_dsn = TRUE;
break;
}
+ /* -MCG: set the queue name, to a non-default value
+
+ else if (Ustrcmp(argrest, "CG") == 0)
+ {
+ if (++i < argc) queue_name = string_copy(argv[i]);
+ else badarg = TRUE;
+ break;
+ }
+
/* -MCP: set the smtp_use_pipelining flag; this is useful only when
it preceded -MC (see above) */
@@ -2737,9 +2747,9 @@ for (i = 1; i < argc; i++)
else if (Ustrcmp(argrest, "CQ") == 0)
{
- if(++i < argc) passed_qr_pid = (pid_t)(Uatol(argv[i]));
+ if (++i < argc) passed_qr_pid = (pid_t)(Uatol(argv[i]));
else badarg = TRUE;
- if(++i < argc) passed_qr_pipe = (int)(Uatol(argv[i]));
+ if (++i < argc) passed_qr_pipe = (int)(Uatol(argv[i]));
else badarg = TRUE;
break;
}
@@ -3229,8 +3239,16 @@ for (i = 1; i < argc; i++)
argrest++;
}
- /* -q[f][f][l]: Run the queue, optionally forced, optionally local only,
- optionally starting from a given message id. */
+ /* -q[f][f][l][G<name>]... Run the named queue */
+
+ if (*argrest == 'G')
+ {
+ queue_name = string_copy(argrest);
+ do ++argrest; while (*argrest);
+ }
+
+ /* -q[f][f][l][G<name>]: Run the queue, optionally forced, optionally local
+ only, optionally named, optionally starting from a given message id. */
if (*argrest == 0 &&
(i + 1 >= argc || argv[i+1][0] == '-' || mac_ismsgid(argv[i+1])))