summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-06-03 15:50:00 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-06-03 15:50:47 +0100
commite498ab40197936833f696439e78c5cb08e5180cb (patch)
tree054f9a49fe8e8e255d1417cf56dccb7f12e38eae
parentab7ecc495b4909b8ee9c7ae8747436aa1881b9e7 (diff)
parent9befa1ca9a2acc3cb372b53504ace48cc2ac2a2f (diff)
downloadexim4-e498ab40197936833f696439e78c5cb08e5180cb.tar.gz
Merge branch 'multiqueue_336': Named queues
-rw-r--r--doc/doc-docbook/spec.xfpt67
-rw-r--r--doc/doc-txt/NewStuff5
-rw-r--r--src/OS/Makefile-Base12
-rw-r--r--src/exim_monitor/em_globals.c2
-rw-r--r--src/exim_monitor/em_menu.c37
-rw-r--r--src/exim_monitor/em_queue.c15
-rw-r--r--src/src/acl.c22
-rw-r--r--src/src/child.c9
-rw-r--r--src/src/daemon.c86
-rw-r--r--src/src/dcc.c12
-rw-r--r--src/src/deliver.c243
-rw-r--r--src/src/exim.c106
-rw-r--r--src/src/expand.c1
-rw-r--r--src/src/functions.h2
-rw-r--r--src/src/globals.c3
-rw-r--r--src/src/globals.h3
-rw-r--r--src/src/queue.c199
-rw-r--r--src/src/readconf.c2
-rw-r--r--src/src/receive.c81
-rw-r--r--src/src/smtp_in.c6
-rw-r--r--src/src/spool_in.c32
-rw-r--r--src/src/spool_mbox.c10
-rw-r--r--src/src/spool_out.c74
-rw-r--r--src/src/transport.c23
-rw-r--r--test/confs/00012
-rw-r--r--test/confs/057646
-rw-r--r--test/log/057625
-rwxr-xr-xtest/runtest3
-rw-r--r--test/scripts/0000-Basic/00021
-rw-r--r--test/scripts/0000-Basic/057652
-rw-r--r--test/stderr/00223
-rw-r--r--test/stderr/02184
-rw-r--r--test/stderr/02755
-rw-r--r--test/stderr/02785
-rw-r--r--test/stderr/02948
-rw-r--r--test/stderr/03032
-rw-r--r--test/stderr/03178
-rw-r--r--test/stderr/03615
-rw-r--r--test/stderr/03711
-rw-r--r--test/stderr/038610
-rw-r--r--test/stderr/03887
-rw-r--r--test/stderr/04025
-rw-r--r--test/stderr/04035
-rw-r--r--test/stderr/040410
-rw-r--r--test/stderr/04085
-rw-r--r--test/stderr/04655
-rw-r--r--test/stderr/04714
-rw-r--r--test/stderr/04875
-rw-r--r--test/stderr/048932
-rw-r--r--test/stderr/05141
-rw-r--r--test/stderr/05751
-rw-r--r--test/stderr/26005
-rw-r--r--test/stderr/50045
-rw-r--r--test/stderr/500526
-rw-r--r--test/stderr/50065
-rw-r--r--test/stdout/00021
-rw-r--r--test/stdout/05743
-rw-r--r--test/stdout/057617
58 files changed, 905 insertions, 469 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index f165c368a..9a10d8d21 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -3825,6 +3825,14 @@ 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.
+.new
+.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.
+.wen
+
.vitem &%-MCP%&
.oindex "&%-MCP%&"
This option is not intended for use by external callers. It is used internally
@@ -4371,7 +4379,10 @@ relax this restriction (and also the same requirement for the &%-M%&, &%-R%&,
and &%-S%& options).
.cindex "queue runner" "description of operation"
-The &%-q%& option starts one queue runner process. This scans the queue of
+.new
+If other commandline options do not specify an action,
+.wen
+the &%-q%& option starts one queue runner process. This scans the queue of
waiting messages, and runs a delivery process for each one in turn. It waits
for each delivery process to finish before starting the next one. A delivery
process may not actually do any deliveries if the retry times for the addresses
@@ -4456,8 +4467,29 @@ 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'&>
+.new
+.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.
+The name should not contain a &'/'& character.
+For a periodic queue run (see below)
+append to the name a slash and a time value.
+
+If other commandline options speicify an action, a &'-qG<name>'& option
+will specify a queue to operate on.
+For example:
+.code
+exim -bp -qGquarantine
+mailq -qGquarantime
+exim -qGoffpeak -Rf @special.domain.example
+.endd
+.wen
+
+.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:
@@ -12210,6 +12242,14 @@ The value set for the &%qualify_domain%& option in the configuration file.
The value set for the &%qualify_recipient%& option in the configuration file,
or if not set, the value of &$qualify_domain$&.
+.new
+.vitem &$queue_name$&
+.vindex &$queue_name$&
+.cindex "named queues"
+.cindex queues named
+The name of the spool queue in use; empty for the default queue.
+.wen
+
.vitem &$rcpt_count$&
.vindex "&$rcpt_count$&"
When a message is being received by SMTP, this variable contains the number of
@@ -15920,7 +15960,7 @@ large list. In most situations, &%queue_run_in_order%& should not be set.
-.option queue_run_max main integer 5
+.option queue_run_max main integer&!! 5
.cindex "queue runner" "maximum number of"
This controls the maximum number of queue runner processes that an Exim daemon
can run simultaneously. This does not mean that it starts them all at once,
@@ -15935,6 +15975,13 @@ the limit, allowing any number of simultaneous queue runner processes to be
run. If you do not want queue runs to occur, omit the &%-q%&&'xx'& setting on
the daemon's command line.
+.new
+.cindex queues named
+.condex "named queues"
+To set limits for different named queues use
+an expansion depending on the &$queue_name$& variable.
+.wen
+
.option queue_smtp_domains main "domain list&!!" unset
.cindex "queueing incoming messages"
.cindex "message" "queueing remote deliveries"
@@ -28590,6 +28637,19 @@ all the conditions are true, wherever it appears in an ACL command, whereas
effect.
+.new
+.vitem &*queue*&&~=&~<&'text'&>
+This modifier specifies the use of a named queue for spool files
+for the message.
+It can only be used before the message is received (i.e. not in
+the DATA ACL).
+This could be used, for example, for known high-volume burst sources
+of traffic, or for quarantine of messages.
+Separate queue-runner processes will be needed for named queues.
+If the text after expansion is empty, the default queue is used.
+.wen
+
+
.vitem &*remove_header*&&~=&~<&'text'&>
This modifier specifies one or more header names in a colon-separated list
that are to be removed from an incoming message, assuming, of course, that
@@ -35564,6 +35624,7 @@ the following table:
&`P `& on &`<=`& lines: protocol used
&` `& on &`=>`& and &`**`& lines: return path
&`PRX `& on &'<='& and&`=>`& lines: proxy address
+&`Q `& alternate queue name
&`QT `& on &`=>`& lines: time spent on queue so far
&` `& on &"Completed"& lines: time spent on queue
&`R `& on &`<=`& lines: reference for local bounce
diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff
index 90aefc4fe..2a776b730 100644
--- a/doc/doc-txt/NewStuff
+++ b/doc/doc-txt/NewStuff
@@ -21,6 +21,11 @@ Version 4.88
N can be 224, 256 (default), 384, 512.
With GnuTLS 3.5.0 or later, only.
+ 5. Facility for named queues: A commandline argument can specify
+ the queue name for a queue operation, and an ACL modifier can set
+ the queue to be used for a message. A $queue_name variable gives
+ visibility.
+
Version 4.87
------------
diff --git a/src/OS/Makefile-Base b/src/OS/Makefile-Base
index 3995444cf..b9eaabaa6 100644
--- a/src/OS/Makefile-Base
+++ b/src/OS/Makefile-Base
@@ -448,7 +448,13 @@ MONBIN = em_StripChart.o $(EXIMON_TEXTPOP) em_globals.o em_init.o \
# The complete modules list also includes some specially compiled versions of
# code from the main Exim source tree.
-OBJ_MONBIN = util-spool_in.o util-store.o util-string.o tod.o tree.o $(MONBIN)
+OBJ_MONBIN = util-spool_in.o \
+ util-store.o \
+ util-string.o \
+ util-queue.o \
+ tod.o \
+ tree.o \
+ $(MONBIN)
eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) \
../exim_monitor/em_version.c
@@ -568,6 +574,10 @@ util-string.o: $(HDRS) string.c
@echo "$(CC) -DCOMPILE_UTILITY string.c"
$(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-string.o string.c
+util-queue.o: $(HDRS) queue.c
+ @echo "$(CC) -DCOMPILE_UTILITY queue.c"
+ $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-queue.o queue.c
+
util-os.o: $(HDRS) os.c
@echo "$(CC) -DCOMPILE_UTILITY os.c"
$(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \
diff --git a/src/exim_monitor/em_globals.c b/src/exim_monitor/em_globals.c
index 6415e4238..9221ae2da 100644
--- a/src/exim_monitor/em_globals.c
+++ b/src/exim_monitor/em_globals.c
@@ -187,6 +187,8 @@ uid_t originator_uid;
uschar *primary_hostname = NULL;
+uschar *queue_name = US"";
+
int received_count = 0;
uschar *received_protocol = NULL;
int received_time = 0;
diff --git a/src/exim_monitor/em_menu.c b/src/exim_monitor/em_menu.c
index 51a952e99..dc24e3dfa 100644
--- a/src/exim_monitor/em_menu.c
+++ b/src/exim_monitor/em_menu.c
@@ -133,11 +133,12 @@ menu_is_up = FALSE;
* Display the message log *
*************************************************/
-static void msglogAction(Widget w, XtPointer client_data, XtPointer call_data)
+static void
+msglogAction(Widget w, XtPointer client_data, XtPointer call_data)
{
int i;
-uschar buffer[256];
Widget text = text_create((uschar *)client_data, text_depth);
+uschar * fname;
FILE *f = NULL;
w = w; /* Keep picky compilers happy */
@@ -147,18 +148,18 @@ call_data = call_data;
for (i = 0; i < (spool_is_split? 2:1); i++)
{
- message_subdir[0] = (i != 0)? ((uschar *)client_data)[5] : 0;
- sprintf(CS buffer, "%s/msglog/%s/%s", spool_directory, message_subdir,
- (uschar *)client_data);
- f = fopen(CS buffer, "r");
- if (f != NULL) break;
+ message_subdir[0] = i != 0 ? ((uschar *)client_data)[5] : 0;
+ fname = spool_fname(US"msglog", message_subdir, US client_data, US"");
+ if ((f = fopen(CS fname, "r")))
+ break;
}
if (f == NULL)
- text_showf(text, "%s: %s\n", buffer, strerror(errno));
+ text_showf(text, "%s: %s\n", fname, strerror(errno));
else
{
- while (Ufgets(buffer, 256, f) != NULL) text_show(text, buffer);
+ uschar buffer[256];
+ while (Ufgets(buffer, sizeof(buffer), f) != NULL) text_show(text, buffer);
fclose(f);
}
}
@@ -169,10 +170,10 @@ else
* Display the message body *
*************************************************/
-static void bodyAction(Widget w, XtPointer client_data, XtPointer call_data)
+static void
+bodyAction(Widget w, XtPointer client_data, XtPointer call_data)
{
int i;
-uschar buffer[256];
Widget text = text_create((uschar *)client_data, text_depth);
FILE *f = NULL;
@@ -181,19 +182,21 @@ call_data = call_data;
for (i = 0; i < (spool_is_split? 2:1); i++)
{
- message_subdir[0] = (i != 0)? ((uschar *)client_data)[5] : 0;
- sprintf(CS buffer, "%s/input/%s/%s-D", spool_directory, message_subdir,
- (uschar *)client_data);
- f = fopen(CS buffer, "r");
- if (f != NULL) break;
+ uschar * fname;
+ message_subdir[0] = i != 0 ? ((uschar *)client_data)[5] : 0;
+ fname = spool_fname(US"input", message_subdir, US client_data, US"-D");
+ if ((f = fopen(CS fname, "r")))
+ break;
}
if (f == NULL)
text_showf(text, "Failed to open file: %s\n", strerror(errno));
else
{
+ uschar buffer[256];
int count = 0;
- while (Ufgets(buffer, 256, f) != NULL)
+
+ while (Ufgets(buffer, sizeof(buffer), f) != NULL)
{
text_show(text, buffer);
count += Ustrlen(buffer);
diff --git a/src/exim_monitor/em_queue.c b/src/exim_monitor/em_queue.c
index c01a80fe0..893e43898 100644
--- a/src/exim_monitor/em_queue.c
+++ b/src/exim_monitor/em_queue.c
@@ -263,7 +263,8 @@ else
sender_address = NULL;
-sprintf(CS buffer, "%s/input/%s/%s-D", spool_directory, message_subdir, name);
+snprintf(CS buffer, sizeof(buffer), "%s/input/%s/%s/%s-D",
+ spool_directory, queue_name, message_subdir, name);
if (Ustat(buffer, &statdata) == 0)
q->size = message_size + statdata.st_size - SPOOL_DATA_START_OFFSET + 1;
@@ -271,7 +272,6 @@ if (Ustat(buffer, &statdata) == 0)
been delivered, and removing visible names. */
if (recipients_list != NULL)
- {
for (i = 0; i < recipients_count; i++)
{
uschar *r = recipients_list[i].address;
@@ -282,7 +282,6 @@ if (recipients_list != NULL)
(void)find_dest(q, r, dest_add, FALSE);
}
}
- }
/* Recover the dynamic store used by spool_read_header(). */
@@ -617,11 +616,13 @@ uschar buffer[1024];
message_subdir[0] = p->dir_char;
-sprintf(CS buffer, "%s/input/%s/%s-J", spool_directory, message_subdir, p->name);
-jread = fopen(CS buffer, "r");
-if (jread == NULL)
+snprintf(CS buffer, sizeof(buffer), "%s/input/%s/%s/%s-J",
+ spool_directory, queue_name, message_subdir, p->name);
+
+if (!(jread = fopen(CS buffer, "r")))
{
- sprintf(CS buffer, "%s/input/%s/%s-H", spool_directory, message_subdir, p->name);
+ snprintf(CS buffer, sizeof(buffer), "%s/input/%s/%s/%s-H",
+ spool_directory, queue_name, message_subdir, p->name);
if (Ustat(buffer, &statdata) < 0 || p->update_time == statdata.st_mtime)
return;
}
diff --git a/src/src/acl.c b/src/src/acl.c
index dd59b4952..381fdccf4 100644
--- a/src/src/acl.c
+++ b/src/src/acl.c
@@ -88,6 +88,7 @@ enum { ACLC_ACL,
#ifdef WITH_CONTENT_SCAN
ACLC_MIME_REGEX,
#endif
+ ACLC_QUEUE,
ACLC_RATELIMIT,
ACLC_RECIPIENTS,
#ifdef WITH_CONTENT_SCAN
@@ -108,7 +109,7 @@ enum { ACLC_ACL,
ACLC_VERIFY };
/* ACL conditions/modifiers: "delay", "control", "continue", "endpass",
-"message", "log_message", "log_reject_target", "logwrite", and "set" are
+"message", "log_message", "log_reject_target", "logwrite", "queue" and "set" are
modifiers that look like conditions but always return TRUE. They are used for
their side effects. */
@@ -152,13 +153,16 @@ static uschar *conditions[] = {
#ifdef WITH_CONTENT_SCAN
US"mime_regex",
#endif
+ US"queue",
US"ratelimit",
US"recipients",
#ifdef WITH_CONTENT_SCAN
US"regex",
#endif
US"remove_header",
- US"sender_domains", US"senders", US"set",
+ US"sender_domains",
+ US"senders",
+ US"set",
#ifdef WITH_CONTENT_SCAN
US"spam",
#endif
@@ -298,6 +302,7 @@ static uschar cond_expand_at_top[] = {
#ifdef WITH_CONTENT_SCAN
TRUE, /* mime_regex */
#endif
+ TRUE, /* queue */
TRUE, /* ratelimit */
FALSE, /* recipients */
#ifdef WITH_CONTENT_SCAN
@@ -360,6 +365,7 @@ static uschar cond_modifiers[] = {
#ifdef WITH_CONTENT_SCAN
FALSE, /* mime_regex */
#endif
+ TRUE, /* queue */
FALSE, /* ratelimit */
FALSE, /* recipients */
#ifdef WITH_CONTENT_SCAN
@@ -507,6 +513,12 @@ static unsigned int cond_forbids[] = {
~(1<<ACL_WHERE_MIME), /* mime_regex */
#endif
+ (1<<ACL_WHERE_NOTSMTP)| /* queue */
+ #ifndef DISABLE_PRDR
+ (1<<ACL_WHERE_PRDR)|
+ #endif
+ (1<<ACL_WHERE_DATA),
+
0, /* ratelimit */
(unsigned int)
@@ -3531,7 +3543,7 @@ for (; cb != NULL; cb = cb->next)
rc = match_isinlist(dkim_cur_signer,
&arg,0,NULL,NULL,MCL_STRING,TRUE,NULL);
else
- rc = FAIL;
+ rc = FAIL;
break;
case ACLC_DKIM_STATUS:
@@ -3690,6 +3702,10 @@ for (; cb != NULL; cb = cb->next)
break;
#endif
+ case ACLC_QUEUE:
+ queue_name = string_copy_malloc(arg);
+ break;
+
case ACLC_RATELIMIT:
rc = acl_ratelimit(arg, where, log_msgptr);
break;
diff --git a/src/src/child.c b/src/src/child.c
index 36d192e9a..7f5b90929 100644
--- a/src/src/child.c
+++ b/src/src/child.c
@@ -72,9 +72,9 @@ child_exec_exim(int exec_type, BOOL kill_v, int *pcount, BOOL minimal,
{
int first_special = -1;
int n = 0;
-int extra = (pcount != NULL)? *pcount : 0;
+int extra = pcount ? *pcount : 0;
uschar **argv =
- store_get((extra + acount + MAX_CLMACROS + 16) * sizeof(char *));
+ store_get((extra + acount + MAX_CLMACROS + 18) * sizeof(char *));
/* In all case, the list starts out with the path, any macros, and a changed
config file. */
@@ -113,6 +113,11 @@ if (!minimal)
if (synchronous_delivery) argv[n++] = US"-odi";
if (connection_max_messages >= 0)
argv[n++] = string_sprintf("-oB%d", connection_max_messages);
+ if (*queue_name)
+ {
+ argv[n++] = US"-MCG";
+ argv[n++] = queue_name;
+ }
}
/* Now add in any others that are in the call. Remember which they were,
diff --git a/src/src/daemon.c b/src/src/daemon.c
index 635b94055..779518f9f 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -651,8 +651,8 @@ if (pid == 0)
if (geteuid() != root_uid && !deliver_drop_privilege)
{
signal(SIGALRM, SIG_DFL);
- (void)child_exec_exim(CEE_EXEC_PANIC, FALSE, NULL, FALSE, 2, US"-Mc",
- message_id);
+ (void)child_exec_exim(CEE_EXEC_PANIC, FALSE, NULL, FALSE,
+ 2, US"-Mc", message_id);
/* Control does not return here. */
}
@@ -866,10 +866,10 @@ while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
/* If it wasn't an accepting process, see if it was a queue-runner
process that we are tracking. */
- if (queue_pid_slots != NULL)
+ if (queue_pid_slots)
{
- for (i = 0; i < queue_run_max; i++)
- {
+ int max = atoi(expand_string(queue_run_max));
+ for (i = 0; i < max; i++)
if (queue_pid_slots[i] == pid)
{
queue_pid_slots[i] = 0;
@@ -878,7 +878,6 @@ while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
queue_run_count, (queue_run_count == 1)? "" : "es");
break;
}
- }
}
}
}
@@ -916,6 +915,7 @@ int *listen_sockets = NULL;
int listen_socket_count = 0;
ip_address_item *addresses = NULL;
time_t last_connection_time = (time_t)0;
+int local_queue_run_max = atoi(expand_string(queue_run_max));
/* If any debugging options are set, turn on the D_pid bit so that all
debugging lines get the pid added. */
@@ -1572,11 +1572,11 @@ originator_login = ((pw = getpwuid(exim_uid)) != NULL)?
/* Get somewhere to keep the list of queue-runner pids if we are keeping track
of them (and also if we are doing queue runs). */
-if (queue_interval > 0 && queue_run_max > 0)
+if (queue_interval > 0 && local_queue_run_max > 0)
{
int i;
- queue_pid_slots = store_get(queue_run_max * sizeof(pid_t));
- for (i = 0; i < queue_run_max; i++) queue_pid_slots[i] = 0;
+ queue_pid_slots = store_get(local_queue_run_max * sizeof(pid_t));
+ for (i = 0; i < local_queue_run_max; i++) queue_pid_slots[i] = 0;
}
/* Set up the handler for termination of child processes. */
@@ -1615,12 +1615,11 @@ else if (daemon_listen)
int i, j;
int smtp_ports = 0;
int smtps_ports = 0;
- ip_address_item *ipa;
- uschar *p = big_buffer;
- uschar *qinfo = (queue_interval > 0)?
- string_sprintf("-q%s", readconf_printtime(queue_interval))
- :
- US"no queue runs";
+ ip_address_item * ipa;
+ uschar * p = big_buffer;
+ uschar * qinfo = queue_interval > 0
+ ? string_sprintf("-q%s", readconf_printtime(queue_interval))
+ : US"no queue runs";
/* Build a list of listening addresses in big_buffer, but limit it to 10
items. The style is for backwards compatibility.
@@ -1631,30 +1630,30 @@ else if (daemon_listen)
for (j = 0; j < 2; j++)
{
- for (i = 0, ipa = addresses; i < 10 && ipa != NULL; i++, ipa = ipa->next)
+ for (i = 0, ipa = addresses; i < 10 && ipa; i++, ipa = ipa->next)
{
/* First time round, look for SMTP ports; second time round, look for
SMTPS ports. For the first one of each, insert leading text. */
if (host_is_tls_on_connect_port(ipa->port) == (j > 0))
{
- if (j == 0)
- {
- if (smtp_ports++ == 0)
+ if (j == 0)
+ {
+ if (smtp_ports++ == 0)
{
memcpy(p, "SMTP on", 8);
p += 7;
}
- }
- else
- {
- if (smtps_ports++ == 0)
+ }
+ else
+ {
+ if (smtps_ports++ == 0)
{
(void)sprintf(CS p, "%sSMTPS on",
- (smtp_ports == 0)? "":" and for ");
- while (*p != 0) p++;
+ smtp_ports == 0 ? "" : " and for ");
+ while (*p) p++;
}
- }
+ }
/* Now the information about the port (and sometimes interface) */
@@ -1679,7 +1678,7 @@ else if (daemon_listen)
}
}
- if (ipa != NULL)
+ if (ipa)
{
memcpy(p, " ...", 5);
p += 4;
@@ -1689,17 +1688,19 @@ else if (daemon_listen)
log_write(0, LOG_MAIN,
"exim %s daemon started: pid=%d, %s, listening for %s",
version_string, getpid(), qinfo, big_buffer);
- set_process_info("daemon(%s): %s, listening for %s", version_string, qinfo, big_buffer);
+ set_process_info("daemon(%s): %s, listening for %s",
+ version_string, qinfo, big_buffer);
}
else
{
+ uschar * s = *queue_name
+ ? string_sprintf("-qG%s/%s", queue_name, readconf_printtime(queue_interval))
+ : string_sprintf("-q%s", readconf_printtime(queue_interval));
log_write(0, LOG_MAIN,
- "exim %s daemon started: pid=%d, -q%s, not listening for SMTP",
- version_string, getpid(), readconf_printtime(queue_interval));
- set_process_info("daemon(%s): -q%s, not listening",
- version_string,
- readconf_printtime(queue_interval));
+ "exim %s daemon started: pid=%d, %s, not listening for SMTP",
+ version_string, getpid(), s);
+ set_process_info("daemon(%s): %s, not listening", version_string, s);
}
/* Do any work it might be useful to amortize over our children
@@ -1791,7 +1792,7 @@ for (;;)
re-exec is required. */
if (queue_interval > 0 &&
- (queue_run_max <= 0 || queue_run_count < queue_run_max))
+ (local_queue_run_max <= 0 || queue_run_count < local_queue_run_max))
{
if ((pid = fork()) == 0)
{
@@ -1835,21 +1836,22 @@ for (;;)
if (deliver_force_thaw) *p++ = 'f';
if (queue_run_local) *p++ = 'l';
*p = 0;
- extra[0] = opt;
+ extra[0] = queue_name
+ ? string_sprintf("%sG%s", opt, queue_name) : opt;
/* If -R or -S were on the original command line, ensure they get
passed on. */
- if (deliver_selectstring != NULL)
+ if (deliver_selectstring)
{
- extra[extracount++] = deliver_selectstring_regex? US"-Rr" : US"-R";
+ extra[extracount++] = deliver_selectstring_regex ? US"-Rr" : US"-R";
extra[extracount++] = deliver_selectstring;
}
- if (deliver_selectstring_sender != NULL)
+ if (deliver_selectstring_sender)
{
- extra[extracount++] = deliver_selectstring_sender_regex?
- US"-Sr" : US"-S";
+ extra[extracount++] = deliver_selectstring_sender_regex
+ ? US"-Sr" : US"-S";
extra[extracount++] = deliver_selectstring_sender;
}
@@ -1876,15 +1878,13 @@ for (;;)
else
{
int i;
- for (i = 0; i < queue_run_max; ++i)
- {
+ for (i = 0; i < local_queue_run_max; ++i)
if (queue_pid_slots[i] <= 0)
{
queue_pid_slots[i] = pid;
queue_run_count++;
break;
}
- }
DEBUG(D_any) debug_printf("%d queue-runner process%s running\n",
queue_run_count, (queue_run_count == 1)? "" : "es");
}
diff --git a/src/src/dcc.c b/src/src/dcc.c
index c9d0db236..1841e733d 100644
--- a/src/src/dcc.c
+++ b/src/src/dcc.c
@@ -72,7 +72,6 @@ dcc_process(uschar **listptr)
uschar sendbuf[4096];
uschar recvbuf[4096];
uschar dcc_return_text[1024];
- uschar mbox_path[1024];
uschar message_subdir[2];
struct header_line *dcchdr;
uschar *dcc_acl_options;
@@ -102,14 +101,15 @@ dcc_process(uschar **listptr)
message_subdir[1] = '\0';
for (i = 0; i < 2; i++)
{
- message_subdir[0] = (split_spool_directory == (i == 0))? message_id[5] : 0;
- sprintf(CS mbox_path, "%s/input/%s/%s-D", spool_directory, message_subdir, message_id);
- data_file = Ufopen(mbox_path,"rb");
- if (data_file != NULL)
+ message_subdir[0] = split_spool_directory == (i == 0) ? message_id[5] : 0;
+
+ if ((data_file = Ufopen(
+ spool_fname(US"input", message_subdir, message_id, US"-D"),
+ "rb")))
break;
}
- if (data_file == NULL)
+ if (!data_file)
{
/* error while spooling */
log_write(0, LOG_MAIN|LOG_PANIC,
diff --git a/src/src/deliver.c b/src/src/deliver.c
index 1421852aa..b389c3731 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -76,8 +76,6 @@ static int return_count;
static uschar *frozen_info = US"";
static uschar *used_return_path = NULL;
-static uschar spoolname[PATH_MAX];
-
/*************************************************
@@ -285,10 +283,9 @@ int fd = Uopen(filename, O_WRONLY|O_APPEND|O_CREAT, mode);
if (fd < 0 && errno == ENOENT)
{
- uschar temp[16];
- sprintf(CS temp, "msglog/%s", message_subdir);
- if (message_subdir[0] == 0) temp[6] = 0;
- (void)directory_make(spool_directory, temp, MSGLOG_DIRECTORY_MODE, TRUE);
+ (void)directory_make(spool_directory,
+ spool_sname(US"msglog", message_subdir),
+ MSGLOG_DIRECTORY_MODE, TRUE);
fd = Uopen(filename, O_WRONLY|O_APPEND|O_CREAT, mode);
}
@@ -886,6 +883,9 @@ if (LOGGING(sender_on_delivery) || msg)
sender_address,
US">");
+if (*queue_name)
+ s = string_append(s, &size, &ptr, 2, US" Q=", queue_name);
+
#ifdef EXPERIMENTAL_SRS
if(addr->prop.srs_sender)
s = string_append(s, &size, &ptr, 3, US" SRS=<", addr->prop.srs_sender, US">");
@@ -1273,6 +1273,9 @@ else if (result == DEFER || result == PANIC)
s = string_cat(s, &size, &ptr, log_address);
+ if (*queue_name)
+ s = string_append(s, &size, &ptr, 2, US" Q=", queue_name);
+
/* Either driver_name contains something and driver_kind contains
" router" or " transport" (note the leading space), or driver_name is
a null string and driver_kind contains "routing" without the leading
@@ -1394,6 +1397,9 @@ else
if (LOGGING(sender_on_delivery))
s = string_append(s, &size, &ptr, 3, US" F=<", sender_address, US">");
+ if (*queue_name)
+ s = string_append(s, &size, &ptr, 2, US" Q=", queue_name);
+
/* Return path may not be set if no delivery actually happened */
if (used_return_path && LOGGING(return_path_on_delivery))
@@ -1950,12 +1956,13 @@ if ( !shadowing
|| tp->log_output || tp->log_fail_output || tp->log_defer_output
) )
{
- uschar *error;
+ uschar * error;
+
addr->return_filename =
- string_sprintf("%s/msglog/%s/%s-%d-%d", spool_directory, message_subdir,
- message_id, getpid(), return_count++);
- addr->return_file = open_msglog_file(addr->return_filename, 0400, &error);
- if (addr->return_file < 0)
+ spool_fname(US"msglog", message_subdir, message_id,
+ string_sprintf("-%d-%d", getpid(), return_count++));
+
+ if ((addr->return_file = open_msglog_file(addr->return_filename, 0400, &error)) < 0)
{
common_error(TRUE, addr, errno, US"Unable to %s file for %s transport "
"to return message: %s", error, tp->name, strerror(errno));
@@ -4378,13 +4385,13 @@ for (delivery_count = 0; addr_remote; delivery_count++)
a dup-with-new-file-pointer. */
(void)close(deliver_datafile);
- sprintf(CS spoolname, "%s/input/%s/%s-D", spool_directory, message_subdir,
- message_id);
- deliver_datafile = Uopen(spoolname, O_RDWR | O_APPEND, 0);
+ {
+ uschar * fname = spool_fname(US"input", message_subdir, message_id, US"-D");
- if (deliver_datafile < 0)
+ if ((deliver_datafile = Uopen(fname, O_RDWR | O_APPEND, 0)) < 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Failed to reopen %s for remote "
- "parallel delivery: %s", spoolname, strerror(errno));
+ "parallel delivery: %s", fname, strerror(errno));
+ }
/* Set the close-on-exec flag */
@@ -5231,53 +5238,51 @@ store, and also the list of recipients and the tree of non-recipients and
assorted flags. It updates message_size. If there is a reading or format error,
give up; if the message has been around for sufficiently long, remove it. */
-sprintf(CS spoolname, "%s-H", id);
-if ((rc = spool_read_header(spoolname, TRUE, TRUE)) != spool_read_OK)
{
- if (errno == ERRNO_SPOOLFORMAT)
+ uschar * spoolname = string_sprintf("%s-H", id);
+ if ((rc = spool_read_header(spoolname, TRUE, TRUE)) != spool_read_OK)
{
- struct stat statbuf;
- sprintf(CS big_buffer, "%s/input/%s/%s", spool_directory, message_subdir,
- spoolname);
- if (Ustat(big_buffer, &statbuf) == 0)
- log_write(0, LOG_MAIN, "Format error in spool file %s: "
- "size=" OFF_T_FMT, spoolname, statbuf.st_size);
- else log_write(0, LOG_MAIN, "Format error in spool file %s", spoolname);
- }
- else
- log_write(0, LOG_MAIN, "Error reading spool file %s: %s", spoolname,
- strerror(errno));
+ if (errno == ERRNO_SPOOLFORMAT)
+ {
+ struct stat statbuf;
+ if (Ustat(spool_fname(US"input", message_subdir, spoolname, US""),
+ &statbuf) == 0)
+ log_write(0, LOG_MAIN, "Format error in spool file %s: "
+ "size=" OFF_T_FMT, spoolname, statbuf.st_size);
+ else
+ log_write(0, LOG_MAIN, "Format error in spool file %s", spoolname);
+ }
+ else
+ log_write(0, LOG_MAIN, "Error reading spool file %s: %s", spoolname,
+ strerror(errno));
- /* If we managed to read the envelope data, received_time contains the
- time the message was received. Otherwise, we can calculate it from the
- message id. */
+ /* If we managed to read the envelope data, received_time contains the
+ time the message was received. Otherwise, we can calculate it from the
+ message id. */
- if (rc != spool_read_hdrerror)
- {
- received_time = 0;
- for (i = 0; i < 6; i++)
- received_time = received_time * BASE_62 + tab62[id[i] - '0'];
- }
+ if (rc != spool_read_hdrerror)
+ {
+ received_time = 0;
+ for (i = 0; i < 6; i++)
+ received_time = received_time * BASE_62 + tab62[id[i] - '0'];
+ }
- /* If we've had this malformed message too long, sling it. */
+ /* If we've had this malformed message too long, sling it. */
- if (now - received_time > keep_malformed)
- {
- sprintf(CS spoolname, "%s/msglog/%s/%s", spool_directory, message_subdir, id);
- Uunlink(spoolname);
- sprintf(CS spoolname, "%s/input/%s/%s-D", spool_directory, message_subdir, id);
- Uunlink(spoolname);
- sprintf(CS spoolname, "%s/input/%s/%s-H", spool_directory, message_subdir, id);
- Uunlink(spoolname);
- sprintf(CS spoolname, "%s/input/%s/%s-J", spool_directory, message_subdir, id);
- Uunlink(spoolname);
- log_write(0, LOG_MAIN, "Message removed because older than %s",
- readconf_printtime(keep_malformed));
- }
+ if (now - received_time > keep_malformed)
+ {
+ Uunlink(spool_fname(US"msglog", message_subdir, id, US""));
+ Uunlink(spool_fname(US"input", message_subdir, id, US"-D"));
+ Uunlink(spool_fname(US"input", message_subdir, id, US"-H"));
+ Uunlink(spool_fname(US"input", message_subdir, id, US"-J"));
+ log_write(0, LOG_MAIN, "Message removed because older than %s",
+ readconf_printtime(keep_malformed));
+ }
- (void)close(deliver_datafile);
- deliver_datafile = -1;
- return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
+ (void)close(deliver_datafile);
+ deliver_datafile = -1;
+ return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
+ }
}
/* The spool header file has been read. Look to see if there is an existing
@@ -5289,37 +5294,39 @@ existence, as it will get further successful deliveries added to it in this
run, and it will be deleted if this function gets to its end successfully.
Otherwise it might be needed again. */
-sprintf(CS spoolname, "%s/input/%s/%s-J", spool_directory, message_subdir, id);
-jread = Ufopen(spoolname, "rb");
-if (jread)
{
- while (Ufgets(big_buffer, big_buffer_size, jread))
+ uschar * fname = spool_fname(US"input", message_subdir, id, US"-J");
+
+ if ((jread = Ufopen(fname, "rb")))
{
- int n = Ustrlen(big_buffer);
- big_buffer[n-1] = 0;
- tree_add_nonrecipient(big_buffer);
- DEBUG(D_deliver) debug_printf("Previously delivered address %s taken from "
- "journal file\n", big_buffer);
+ while (Ufgets(big_buffer, big_buffer_size, jread))
+ {
+ int n = Ustrlen(big_buffer);
+ big_buffer[n-1] = 0;
+ tree_add_nonrecipient(big_buffer);
+ DEBUG(D_deliver) debug_printf("Previously delivered address %s taken from "
+ "journal file\n", big_buffer);
+ }
+ (void)fclose(jread);
+ /* Panic-dies on error */
+ (void)spool_write_header(message_id, SW_DELIVERING, NULL);
+ }
+ else if (errno != ENOENT)
+ {
+ log_write(0, LOG_MAIN|LOG_PANIC, "attempt to open journal for reading gave: "
+ "%s", strerror(errno));
+ return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
}
- (void)fclose(jread);
- /* Panic-dies on error */
- (void)spool_write_header(message_id, SW_DELIVERING, NULL);
- }
-else if (errno != ENOENT)
- {
- log_write(0, LOG_MAIN|LOG_PANIC, "attempt to open journal for reading gave: "
- "%s", strerror(errno));
- return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
- }
-/* A null recipients list indicates some kind of disaster. */
+ /* A null recipients list indicates some kind of disaster. */
-if (!recipients_list)
- {
- (void)close(deliver_datafile);
- deliver_datafile = -1;
- log_write(0, LOG_MAIN, "Spool error: no recipients for %s", spoolname);
- return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
+ if (!recipients_list)
+ {
+ (void)close(deliver_datafile);
+ deliver_datafile = -1;
+ log_write(0, LOG_MAIN, "Spool error: no recipients for %s", fname);
+ return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
+ }
}
@@ -5407,16 +5414,14 @@ done by rewriting the header spool file. */
if (message_logs)
{
- uschar *error;
+ uschar * fname = spool_fname(US"msglog", message_subdir, id, US"");
+ uschar * error;
int fd;
- sprintf(CS spoolname, "%s/msglog/%s/%s", spool_directory, message_subdir, id);
- fd = open_msglog_file(spoolname, SPOOL_MODE, &error);
-
- if (fd < 0)
+ if ((fd = open_msglog_file(fname, SPOOL_MODE, &error)) < 0)
{
log_write(0, LOG_MAIN|LOG_PANIC, "Couldn't %s message log %s: %s", error,
- spoolname, strerror(errno));
+ fname, strerror(errno));
return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
}
@@ -5425,7 +5430,7 @@ if (message_logs)
if (!(message_log = fdopen(fd, "a")))
{
log_write(0, LOG_MAIN|LOG_PANIC, "Couldn't fdopen message log %s: %s",
- spoolname, strerror(errno));
+ fname, strerror(errno));
return continue_closedown(); /* yields DELIVER_NOT_ATTEMPTED */
}
}
@@ -6644,13 +6649,12 @@ therein are added to the non-recipients. */
if (addr_local || addr_remote)
{
- sprintf(CS spoolname, "%s/input/%s/%s-J", spool_directory, message_subdir, id);
- journal_fd = Uopen(spoolname, O_WRONLY|O_APPEND|O_CREAT, SPOOL_MODE);
-
- if (journal_fd < 0)
+ uschar * fname = spool_fname(US"input", message_subdir, id, US"-J");
+
+ if ((journal_fd = Uopen(fname, O_WRONLY|O_APPEND|O_CREAT, SPOOL_MODE)) <0)
{
log_write(0, LOG_MAIN|LOG_PANIC, "Couldn't open journal file %s: %s",
- spoolname, strerror(errno));
+ fname, strerror(errno));
return DELIVER_NOT_ATTEMPTED;
}
@@ -6663,12 +6667,12 @@ if (addr_local || addr_remote)
|| fchmod(journal_fd, SPOOL_MODE)
)
{
- int ret = Uunlink(spoolname);
+ int ret = Uunlink(fname);
log_write(0, LOG_MAIN|LOG_PANIC, "Couldn't set perms on journal file %s: %s",
- spoolname, strerror(errno));
+ fname, strerror(errno));
if(ret && errno != ENOENT)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s",
- spoolname, strerror(errno));
+ fname, strerror(errno));
return DELIVER_NOT_ATTEMPTED;
}
}
@@ -7509,40 +7513,43 @@ Then delete the message itself. */
if (!addr_defer)
{
+ uschar * fname;
+
if (message_logs)
{
- sprintf(CS spoolname, "%s/msglog/%s/%s", spool_directory, message_subdir,
- id);
+ fname = spool_fname(US"msglog", message_subdir, id, US"");
if (preserve_message_logs)
{
int rc;
- sprintf(CS big_buffer, "%s/msglog.OLD/%s", spool_directory, id);
- if ((rc = Urename(spoolname, big_buffer)) < 0)
+ uschar * moname = spool_fname(US"msglog.OLD", US"", id, US"");
+
+ if ((rc = Urename(fname, moname)) < 0)
{
- (void)directory_make(spool_directory, US"msglog.OLD",
- MSGLOG_DIRECTORY_MODE, TRUE);
- rc = Urename(spoolname, big_buffer);
+ (void)directory_make(spool_directory,
+ spool_sname(US"msglog.OLD", US""),
+ MSGLOG_DIRECTORY_MODE, TRUE);
+ rc = Urename(fname, moname);
}
if (rc < 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to move %s to the "
- "msglog.OLD directory", spoolname);
+ "msglog.OLD directory", fname);
}
else
- if (Uunlink(spoolname) < 0)
+ if (Uunlink(fname) < 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s",
- spoolname, strerror(errno));
+ fname, strerror(errno));
}
/* Remove the two message files. */
- sprintf(CS spoolname, "%s/input/%s/%s-D", spool_directory, message_subdir, id);
- if (Uunlink(spoolname) < 0)
+ fname = spool_fname(US"input", message_subdir, id, US"-D");
+ if (Uunlink(fname) < 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s",
- spoolname, strerror(errno));
- sprintf(CS spoolname, "%s/input/%s/%s-H", spool_directory, message_subdir, id);
- if (Uunlink(spoolname) < 0)
+ fname, strerror(errno));
+ fname = spool_fname(US"input", message_subdir, id, US"-H");
+ if (Uunlink(fname) < 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s",
- spoolname, strerror(errno));
+ fname, strerror(errno));
/* Log the end of this message, with queue time if requested. */
@@ -8009,9 +8016,10 @@ if (journal_fd >= 0) (void)close(journal_fd);
if (remove_journal)
{
- sprintf(CS spoolname, "%s/input/%s/%s-J", spool_directory, message_subdir, id);
- if (Uunlink(spoolname) < 0 && errno != ENOENT)
- log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s", spoolname,
+ uschar * fname = spool_fname(US"input", message_subdir, id, US"-J");
+
+ if (Uunlink(fname) < 0 && errno != ENOENT)
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s", fname,
strerror(errno));
/* Move the message off the spool if reqested */
@@ -8086,6 +8094,7 @@ int rc;
uschar * new_sender_address,
* save_sender_address;
BOOL save_qr = queue_running;
+uschar * spoolname;
/* make spool_open_datafile non-noisy on fail */
@@ -8104,7 +8113,7 @@ spool_read_header() may change all of them. But OTOH, when this
deliver_get_sender_address() gets called, the current message is done
already and nobody needs the globals anymore. (HS12, 2015-08-21) */
-sprintf(CS spoolname, "%s-H", id);
+spoolname = string_sprintf("%s-H", id);
save_sender_address = sender_address;
rc = spool_read_header(spoolname, TRUE, TRUE);
diff --git a/src/src/exim.c b/src/src/exim.c
index 474851c21..08ceab7e1 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -2729,12 +2729,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) */
@@ -2750,9 +2760,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;
}
@@ -3227,7 +3237,7 @@ for (i = 1; i < argc; i++)
if (*argrest == 'f')
{
queue_run_force = TRUE;
- if (*(++argrest) == 'f')
+ if (*++argrest == 'f')
{
deliver_force_thaw = TRUE;
argrest++;
@@ -3242,8 +3252,19 @@ 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>]... Work on the named queue */
+
+ if (*argrest == 'G')
+ {
+ 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
+ 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])))
@@ -3255,20 +3276,14 @@ 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
+ else if ((queue_interval = readconf_readtime(*argrest ? argrest : argv[++i],
+ 0, FALSE)) <= 0)
{
- if (*argrest != 0)
- queue_interval = readconf_readtime(argrest, 0, FALSE);
- else
- queue_interval = readconf_readtime(argv[++i], 0, FALSE);
- if (queue_interval <= 0)
- {
- fprintf(stderr, "exim: bad time value %s: abandoned\n", argv[i]);
- exit(EXIT_FAILURE);
- }
+ fprintf(stderr, "exim: bad time value %s: abandoned\n", argv[i]);
+ exit(EXIT_FAILURE);
}
break;
@@ -3288,8 +3303,7 @@ for (i = 1; i < argc; i++)
if (*argrest != 0)
{
int i;
- for (i = 0; i < sizeof(rsopts)/sizeof(uschar *); i++)
- {
+ for (i = 0; i < nelem(rsopts); i++)
if (Ustrcmp(argrest, rsopts[i]) == 0)
{
if (i != 2) queue_run_force = TRUE;
@@ -3297,21 +3311,20 @@ for (i = 1; i < argc; i++)
if (i == 1 || i == 4) deliver_force_thaw = TRUE;
argrest += Ustrlen(rsopts[i]);
}
- }
}
/* -R: Set string to match in addresses for forced queue run to
pick out particular messages. */
- if (*argrest == 0)
+ if (*argrest)
+ deliver_selectstring = argrest;
+ else if (i+1 < argc)
+ deliver_selectstring = argv[++i];
+ else
{
- if (i+1 < argc) deliver_selectstring = argv[++i]; else
- {
- fprintf(stderr, "exim: string expected after -R\n");
- exit(EXIT_FAILURE);
- }
+ fprintf(stderr, "exim: string expected after -R\n");
+ exit(EXIT_FAILURE);
}
- else deliver_selectstring = argrest;
break;
@@ -3332,11 +3345,10 @@ for (i = 1; i < argc; i++)
in all cases provided there are no further characters in this
argument. */
- if (*argrest != 0)
+ if (*argrest)
{
int i;
- for (i = 0; i < sizeof(rsopts)/sizeof(uschar *); i++)
- {
+ for (i = 0; i < nelem(rsopts); i++)
if (Ustrcmp(argrest, rsopts[i]) == 0)
{
if (i != 2) queue_run_force = TRUE;
@@ -3344,21 +3356,20 @@ for (i = 1; i < argc; i++)
if (i == 1 || i == 4) deliver_force_thaw = TRUE;
argrest += Ustrlen(rsopts[i]);
}
- }
}
/* -S: Set string to match in addresses for forced queue run to
pick out particular messages. */
- if (*argrest == 0)
+ if (*argrest)
+ deliver_selectstring_sender = argrest;
+ else if (i+1 < argc)
+ deliver_selectstring_sender = argv[++i];
+ else
{
- if (i+1 < argc) deliver_selectstring_sender = argv[++i]; else
- {
- fprintf(stderr, "exim: string expected after -S\n");
- exit(EXIT_FAILURE);
- }
+ fprintf(stderr, "exim: string expected after -S\n");
+ exit(EXIT_FAILURE);
}
- else deliver_selectstring_sender = argrest;
break;
/* -Tqt is an option that is exclusively for use by the testing suite.
@@ -3472,8 +3483,9 @@ for (i = 1; i < argc; i++)
/* If -R or -S have been specified without -q, assume a single queue run. */
-if ((deliver_selectstring != NULL || deliver_selectstring_sender != NULL) &&
- queue_interval < 0) queue_interval = 0;
+if ( (deliver_selectstring || deliver_selectstring_sender)
+ && queue_interval < 0)
+ queue_interval = 0;
END_ARG:
@@ -3489,12 +3501,12 @@ if ((
) ||
(
msg_action_arg > 0 &&
- (daemon_listen || queue_interval >= 0 || list_options ||
+ (daemon_listen || queue_interval > 0 || list_options ||
(checking && msg_action != MSG_LOAD) ||
bi_option || test_retry_arg >= 0 || test_rewrite_arg >= 0)
) ||
(
- (daemon_listen || queue_interval >= 0) &&
+ (daemon_listen || queue_interval > 0) &&
(sender_address != NULL || list_options || list_queue || checking ||
bi_option)
) ||
@@ -4670,7 +4682,11 @@ if (queue_interval == 0 && !daemon_listen)
(start_queue_run_id == NULL)? US"" : start_queue_run_id,
(stop_queue_run_id == NULL)? US"" : US" stopping at ",
(stop_queue_run_id == NULL)? US"" : stop_queue_run_id);
- set_process_info("running the queue (single queue run)");
+ if (*queue_name)
+ set_process_info(CS string_sprintf(
+ "running the '%s' queue (single queue run)", queue_name));
+ else
+ set_process_info("running the queue (single queue run)");
queue_run(start_queue_run_id, stop_queue_run_id, FALSE);
exim_exit(EXIT_SUCCESS);
}
@@ -5714,8 +5730,8 @@ while (more)
if (geteuid() != root_uid && !deliver_drop_privilege && !unprivileged)
{
- (void)child_exec_exim(CEE_EXEC_EXIT, FALSE, NULL, FALSE, 2, US"-Mc",
- message_id);
+ (void)child_exec_exim(CEE_EXEC_EXIT, FALSE, NULL, FALSE,
+ 2, US"-Mc", message_id);
/* Control does not return here. */
}
diff --git a/src/src/expand.c b/src/src/expand.c
index 1484a3027..a0b36f7e2 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -627,6 +627,7 @@ static var_entry var_table[] = {
{ "prvscheck_result", vtype_stringptr, &prvscheck_result },
{ "qualify_domain", vtype_stringptr, &qualify_domain_sender },
{ "qualify_recipient", vtype_stringptr, &qualify_domain_recipient },
+ { "queue_name", vtype_stringptr, &queue_name },
{ "rcpt_count", vtype_int, &rcpt_count },
{ "rcpt_defer_count", vtype_int, &rcpt_defer_count },
{ "rcpt_fail_count", vtype_int, &rcpt_fail_count },
diff --git a/src/src/functions.h b/src/src/functions.h
index cc4cb7ea6..ebbdc55e2 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -407,6 +407,8 @@ extern int spam(const uschar **);
extern FILE *spool_mbox(unsigned long *, const uschar *);
#endif
extern BOOL spool_move_message(uschar *, uschar *, uschar *, uschar *);
+extern uschar *spool_fname(const uschar *, uschar *, uschar *, uschar *);
+extern uschar *spool_sname(const uschar *, uschar *);
extern int spool_open_datafile(uschar *);
extern int spool_open_temp(uschar *);
extern int spool_read_header(uschar *, BOOL, BOOL);
diff --git a/src/src/globals.c b/src/src/globals.c
index e7a54c4b8..4f5a922b4 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -1018,6 +1018,7 @@ BOOL queue_2stage = FALSE;
uschar *queue_domains = NULL;
int queue_interval = -1;
BOOL queue_list_requires_admin = TRUE;
+uschar *queue_name = US"";
BOOL queue_only = FALSE;
uschar *queue_only_file = NULL;
int queue_only_load = -1;
@@ -1028,7 +1029,7 @@ BOOL queue_run_first_delivery = FALSE;
BOOL queue_run_force = FALSE;
BOOL queue_run_in_order = FALSE;
BOOL queue_run_local = FALSE;
-int queue_run_max = 5;
+uschar *queue_run_max = US"5";
pid_t queue_run_pid = (pid_t)0;
int queue_run_pipe = -1;
BOOL queue_running = FALSE;
diff --git a/src/src/globals.h b/src/src/globals.h
index 1caf8e8a9..6e42bc3d7 100644
--- a/src/src/globals.h
+++ b/src/src/globals.h
@@ -666,6 +666,7 @@ extern BOOL queue_running; /* TRUE for queue running process and */
extern pid_t queue_run_pid; /* PID of the queue running process or 0 */
extern int queue_run_pipe; /* Pipe for synchronizing */
extern int queue_interval; /* Queue running interval */
+extern uschar *queue_name; /* Name of queue, if nondefault spooling */
extern BOOL queue_only; /* TRUE to disable immediate delivery */
extern int queue_only_load; /* Max load before auto-queue */
extern BOOL queue_only_load_latch; /* Latch queue_only_load TRUE */
@@ -673,7 +674,7 @@ extern uschar *queue_only_file; /* Queue if file exists/not-exists */
extern BOOL queue_only_override; /* Allow override from command line */
extern BOOL queue_only_policy; /* ACL or local_scan wants queue_only */
extern BOOL queue_run_in_order; /* As opposed to random */
-extern int queue_run_max; /* Max queue runners */
+extern uschar *queue_run_max; /* Max queue runners */
extern BOOL queue_smtp; /* Disable all immediate STMP (-odqs)*/
extern uschar *queue_smtp_domains; /* Ditto, for these domains */
diff --git a/src/src/queue.c b/src/src/queue.c
index cc8d36b23..f53759c43 100644
--- a/src/src/queue.c
+++ b/src/src/queue.c
@@ -12,6 +12,42 @@
+/* Routines with knowlege of spool layout */
+
+static void
+spool_pname_buf(uschar * buf, int len)
+{
+snprintf(CS buf, len, "%s/%s/input", spool_directory, queue_name);
+}
+
+static uschar *
+spool_dname(const uschar * purpose, uschar * subdir)
+{
+return string_sprintf("%s/%s/%s/%s",
+ spool_directory, queue_name, purpose, subdir);
+}
+
+uschar *
+spool_sname(const uschar * purpose, uschar * subdir)
+{
+return string_sprintf("%s%s%s%s%s",
+ queue_name, *queue_name ? "/" : "",
+ purpose,
+ *subdir ? "/" : "", subdir);
+}
+
+uschar *
+spool_fname(const uschar * purpose, uschar * subdir, uschar * fname, uschar * suffix)
+{
+return string_sprintf("%s/%s/%s/%s/%s%s",
+ spool_directory, queue_name, purpose, subdir, fname, suffix);
+}
+
+
+
+
+#ifndef COMPILE_UTILITY
+
/* The number of nodes to use for the bottom-up merge sort when a list of queue
items is to be ordered. The code for this sort was contributed as a patch by
Michael Haardt. */
@@ -142,7 +178,8 @@ else i = subdiroffset;
/* Set up prototype for the directory name. */
-sprintf(CS buffer, "%s/input", spool_directory);
+spool_pname_buf(buffer, sizeof(buffer));
+buffer[sizeof(buffer) - 3] = 0;
subptr = Ustrlen(buffer);
buffer[subptr+2] = 0; /* terminator for lengthened name */
@@ -161,8 +198,9 @@ for (; i <= *subcount; i++)
buffer[subptr+1] = subdirchar;
}
- dd = opendir(CS buffer);
- if (dd == NULL) continue;
+ DEBUG(D_queue_run) debug_printf("looking in %s\n", buffer);
+ if (!(dd = opendir(CS buffer)))
+ continue;
/* Now scan the directory. */
@@ -264,9 +302,11 @@ for (; i <= *subcount; i++)
{
if (!split_spool_directory && count <= 2)
{
+ uschar subdir[2];
+
rmdir(CS buffer);
- sprintf(CS big_buffer, "%s/msglog/%c", spool_directory, subdirchar);
- rmdir(CS big_buffer);
+ subdir[0] = subdirchar; subdir[1] = 0;
+ rmdir(CS spool_dname(US"msglog", subdir));
}
if (subdiroffset > 0) break; /* Single sub-directory */
}
@@ -389,7 +429,11 @@ if (!recurse)
}
log_detail = string_copy(big_buffer);
- log_write(L_queue_run, LOG_MAIN, "Start queue run: %s", log_detail);
+ if (*queue_name)
+ log_write(L_queue_run, LOG_MAIN, "Start '%s' queue run: %s",
+ queue_name, log_detail);
+ else
+ log_write(L_queue_run, LOG_MAIN, "Start queue run: %s", log_detail);
}
/* If deliver_selectstring is a regex, compile it. */
@@ -476,9 +520,8 @@ for (i = (queue_run_in_order? -1 : 0);
/* Check that the message still exists */
message_subdir[0] = f->dir_uschar;
- sprintf(CS buffer, "%s/input/%s/%s", spool_directory, message_subdir,
- f->text);
- if (Ustat(buffer, &statbuf) < 0) continue;
+ if (Ustat(spool_fname(US"input", message_subdir, f->text, US""), &statbuf) < 0)
+ continue;
/* There are some tests that require the reading of the header file. Ensure
the store used is scavenged afterwards so that this process doesn't keep
@@ -698,7 +741,12 @@ if (queue_2stage)
/* At top level, log the end of the run. */
-if (!recurse) log_write(L_queue_run, LOG_MAIN, "End queue run: %s", log_detail);
+if (!recurse)
+ if (*queue_name)
+ log_write(L_queue_run, LOG_MAIN, "End '%s' queue run: %s",
+ queue_name, log_detail);
+ else
+ log_write(L_queue_run, LOG_MAIN, "End queue run: %s", log_detail);
}
@@ -841,17 +889,16 @@ for (; f != NULL; f = f->next)
int ptr;
FILE *jread;
struct stat statbuf;
+ uschar * fname = spool_fname(US"input", message_subdir, f->text, US"");
- sprintf(CS big_buffer, "%s/input/%s/%s", spool_directory, message_subdir,
- f->text);
- ptr = Ustrlen(big_buffer)-1;
- big_buffer[ptr] = 'D';
+ ptr = Ustrlen(fname)-1;
+ fname[ptr] = 'D';
/* Add the data size to the header size; don't count the file name
at the start of the data file, but add one for the notional blank line
that precedes the data. */
- if (Ustat(big_buffer, &statbuf) == 0)
+ if (Ustat(fname, &statbuf) == 0)
size = message_size + statbuf.st_size - SPOOL_DATA_START_OFFSET + 1;
i = (now - received_time)/60; /* minutes on queue */
if (i > 90)
@@ -863,8 +910,8 @@ for (; f != NULL; f = f->next)
/* Collect delivered addresses from any J file */
- big_buffer[ptr] = 'J';
- jread = Ufopen(big_buffer, "rb");
+ fname[ptr] = 'J';
+ jread = Ufopen(fname, "rb");
if (jread != NULL)
{
while (Ufgets(big_buffer, big_buffer_size, jread) != NULL)
@@ -892,9 +939,9 @@ for (; f != NULL; f = f->next)
if (save_errno == ERRNO_SPOOLFORMAT)
{
struct stat statbuf;
- sprintf(CS big_buffer, "%s/input/%s/%s", spool_directory, message_subdir,
- f->text);
- if (Ustat(big_buffer, &statbuf) == 0)
+ uschar * fname = spool_fname(US"input", message_subdir, f->text, US"");
+
+ if (Ustat(fname, &statbuf) == 0)
printf("*** spool format error: size=" OFF_T_FMT " ***",
statbuf.st_size);
else printf("*** spool format error ***");
@@ -959,7 +1006,7 @@ struct passwd *pw;
uschar *doing = NULL;
uschar *username;
uschar *errmsg;
-uschar spoolname[256];
+uschar spoolname[32];
/* Set the global message_id variable, used when re-writing spool files. This
also causes message ids to be added to log messages. */
@@ -1004,12 +1051,13 @@ if (action >= MSG_SHOW_BODY)
for (i = 0; i < 2; i++)
{
- message_subdir[0] = (split_spool_directory == (i == 0))? id[5] : 0;
- sprintf(CS spoolname, "%s/%s/%s/%s%s", spool_directory, subdirectory,
- message_subdir, id, suffix);
- fd = Uopen(spoolname, O_RDONLY, 0);
- if (fd >= 0) break;
- if (i == 0) continue;
+ message_subdir[0] = split_spool_directory == (i == 0) ? id[5] : 0;
+ if ((fd = Uopen(spool_fname(subdirectory, message_subdir, id, suffix),
+ O_RDONLY, 0)) >= 0)
+ break;
+ if (i == 0)
+ continue;
+
printf("Failed to open %s file for %s%s: %s\n", subdirectory, id, suffix,
strerror(errno));
if (action == MSG_SHOW_LOG && !message_logs)
@@ -1031,7 +1079,6 @@ only if the action is remove and the user is an admin user, to allow for
tidying up broken states. */
if ((deliver_datafile = spool_open_datafile(id)) < 0)
- {
if (errno == ENOENT)
{
yield = FALSE;
@@ -1046,7 +1093,6 @@ if ((deliver_datafile = spool_open_datafile(id)) < 0)
strerror(errno));
return FALSE;
}
- }
/* Read the spool header file for the message. Again, continue after an
error only in the case of deleting by an administrator. Setting the third
@@ -1159,49 +1205,70 @@ switch(action)
operation, just run everything twice. */
case MSG_REMOVE:
- message_subdir[0] = id[5];
- for (j = 0; j < 2; message_subdir[0] = 0, j++)
{
- sprintf(CS spoolname, "%s/msglog/%s/%s", spool_directory, message_subdir, id);
- if (Uunlink(spoolname) < 0)
- {
- if (errno != ENOENT)
- {
- yield = FALSE;
- printf("Error while removing %s: %s\n", spoolname,
- strerror(errno));
- }
- }
- else removed = TRUE;
+ uschar suffix[3];
- for (i = 0; i < 3; i++)
+ suffix[0] = '-';
+ suffix[2] = 0;
+ message_subdir[0] = id[5];
+
+ for (j = 0; j < 2; message_subdir[0] = 0, j++)
{
- sprintf(CS spoolname, "%s/input/%s/%s-%c", spool_directory, message_subdir,
- id, "DHJ"[i]);
- if (Uunlink(spoolname) < 0)
- {
- if (errno != ENOENT)
- {
- yield = FALSE;
- printf("Error while removing %s: %s\n", spoolname,
- strerror(errno));
- }
- }
- else removed = TRUE;
+ uschar * fname = spool_fname(US"msglog", message_subdir, id, US"");
+
+ DEBUG(D_any) debug_printf(" removing %s", fname);
+ if (Uunlink(fname) < 0)
+ {
+ if (errno != ENOENT)
+ {
+ yield = FALSE;
+ printf("Error while removing %s: %s\n", fname, strerror(errno));
+ }
+ else DEBUG(D_any) debug_printf(" (no file)\n");
+ }
+ else
+ {
+ removed = TRUE;
+ DEBUG(D_any) debug_printf(" (ok)\n");
+ }
+
+ for (i = 0; i < 3; i++)
+ {
+ uschar * fname;
+
+ suffix[1] = (US"DHJ")[i];
+ fname = spool_fname(US"input", message_subdir, id, suffix);
+
+ DEBUG(D_any) debug_printf(" removing %s", fname);
+ if (Uunlink(fname) < 0)
+ {
+ if (errno != ENOENT)
+ {
+ yield = FALSE;
+ printf("Error while removing %s: %s\n", fname, strerror(errno));
+ }
+ else DEBUG(D_any) debug_printf(" (no file)\n");
+ }
+ else
+ {
+ removed = TRUE;
+ DEBUG(D_any) debug_printf(" (done)\n");
+ }
+ }
}
- }
- /* In the common case, the datafile is open (and locked), so give the
- obvious message. Otherwise be more specific. */
+ /* In the common case, the datafile is open (and locked), so give the
+ obvious message. Otherwise be more specific. */
- if (deliver_datafile >= 0) printf("has been removed\n");
- else printf("has been removed or did not exist\n");
- if (removed)
- {
- log_write(0, LOG_MAIN, "removed by %s", username);
- log_write(0, LOG_MAIN, "Completed");
+ if (deliver_datafile >= 0) printf("has been removed\n");
+ else printf("has been removed or did not exist\n");
+ if (removed)
+ {
+ log_write(0, LOG_MAIN, "removed by %s", username);
+ log_write(0, LOG_MAIN, "Completed");
+ }
+ break;
}
- break;
case MSG_MARK_ALL_DELIVERED:
@@ -1380,4 +1447,6 @@ while ((ss = string_nextinlist(&s, &sep, buffer, sizeof(buffer))) != NULL)
}
}
+#endif /*!COMPILE_UTILITY*/
+
/* End of queue.c */
diff --git a/src/src/readconf.c b/src/src/readconf.c
index f4a9b2d23..25ff58eb9 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -369,7 +369,7 @@ static optionlist optionlist_config[] = {
{ "queue_only_load_latch", opt_bool, &queue_only_load_latch },
{ "queue_only_override", opt_bool, &queue_only_override },
{ "queue_run_in_order", opt_bool, &queue_run_in_order },
- { "queue_run_max", opt_int, &queue_run_max },
+ { "queue_run_max", opt_stringptr, &queue_run_max },
{ "queue_smtp_domains", opt_stringptr, &queue_smtp_domains },
{ "receive_timeout", opt_time, &receive_timeout },
{ "received_header_text", opt_stringptr, &received_header_text },
diff --git a/src/src/receive.c b/src/src/receive.c
index 92ec2cd87..52e041c90 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -23,7 +23,7 @@ extern int dcc_ok;
static FILE *data_file = NULL;
static int data_fd = -1;
-static uschar spool_name[256];
+static uschar *spool_name = US"";
@@ -1543,7 +1543,7 @@ yet, initialize the size and warning count, and deal with no size limit. */
message_id[0] = 0;
data_file = NULL;
data_fd = -1;
-spool_name[0] = 0;
+spool_name = US"";
message_size = 0;
warning_count = 0;
received_count = 1; /* For the one we will add */
@@ -2472,7 +2472,7 @@ it will fit. */
to be the least significant base-62 digit of the time of arrival. Otherwise
ensure that it is an empty string. */
-message_subdir[0] = split_spool_directory? message_id[5] : 0;
+message_subdir[0] = split_spool_directory ? message_id[5] : 0;
/* Now that we have the message-id, if there is no message-id: header, generate
one, but only for local (without suppress_local_fixups) or submission mode
@@ -2861,20 +2861,18 @@ if (cutthrough.fd >= 0)
/* Open a new spool file for the data portion of the message. We need
to access it both via a file descriptor and a stream. Try to make the
-directory if it isn't there. Note re use of sprintf: spool_directory
-is checked on input to be < 200 characters long. */
+directory if it isn't there. */
-sprintf(CS spool_name, "%s/input/%s/%s-D", spool_directory, message_subdir,
- message_id);
-data_fd = Uopen(spool_name, O_RDWR|O_CREAT|O_EXCL, SPOOL_MODE);
-if (data_fd < 0)
+spool_name = spool_fname(US"input", message_subdir, message_id, US"-D");
+DEBUG(D_receive) debug_printf("Data file name: %s\n", spool_name);
+
+if ((data_fd = Uopen(spool_name, O_RDWR|O_CREAT|O_EXCL, SPOOL_MODE)) < 0)
{
if (errno == ENOENT)
{
- uschar temp[16];
- sprintf(CS temp, "input/%s", message_subdir);
- if (message_subdir[0] == 0) temp[5] = 0;
- (void)directory_make(spool_directory, temp, INPUT_DIRECTORY_MODE, TRUE);
+ (void) directory_make(spool_directory,
+ spool_sname(US"input", message_subdir),
+ INPUT_DIRECTORY_MODE, TRUE);
data_fd = Uopen(spool_name, O_RDWR|O_CREAT|O_EXCL, SPOOL_MODE);
}
if (data_fd < 0)
@@ -3650,11 +3648,11 @@ signal(SIGINT, SIG_IGN);
deliver_firsttime = TRUE;
#ifdef EXPERIMENTAL_BRIGHTMAIL
-if (bmi_run == 1) {
- /* rewind data file */
+if (bmi_run == 1)
+ { /* rewind data file */
lseek(data_fd, (long int)SPOOL_DATA_START_OFFSET, SEEK_SET);
bmi_verdicts = bmi_process_message(header_list, data_fd);
-};
+ }
#endif
/* Update the timstamp in our Received: header to account for any time taken by
@@ -3692,7 +3690,6 @@ if (host_checking || blackholed_by != NULL)
/* Write the -H file */
else
- {
if ((msg_size = spool_write_header(message_id, SW_RECEIVING, &errmsg)) < 0)
{
log_write(0, LOG_MAIN, "Message abandoned: %s", errmsg);
@@ -3712,7 +3709,6 @@ else
/* Does not return */
}
}
- }
/* The message has now been successfully received. */
@@ -3806,6 +3802,9 @@ if (LOGGING(8bitmime))
s = string_append(s, &size, &sptr, 2, US" M8S=", big_buffer);
}
+if (*queue_name)
+ s = string_append(s, &size, &sptr, 2, US" Q=", queue_name);
+
/* If an addr-spec in a message-id contains a quoted string, it can contain
any characters except " \ and CR and so in particular it can contain NL!
Therefore, make sure we use a printing-characters only version for the log.
@@ -3860,16 +3859,15 @@ if (message_logs && blackholed_by == NULL)
{
int fd;
- sprintf(CS spool_name, "%s/msglog/%s/%s", spool_directory, message_subdir,
- message_id);
- fd = Uopen(spool_name, O_WRONLY|O_APPEND|O_CREAT, SPOOL_MODE);
-
- if (fd < 0 && errno == ENOENT)
+ spool_name = spool_fname(US"msglog", message_subdir, message_id, US"");
+
+ if ( (fd = Uopen(spool_name, O_WRONLY|O_APPEND|O_CREAT, SPOOL_MODE)) < 0
+ && errno == ENOENT
+ )
{
- uschar temp[16];
- sprintf(CS temp, "msglog/%s", message_subdir);
- if (message_subdir[0] == 0) temp[6] = 0;
- (void)directory_make(spool_directory, temp, MSGLOG_DIRECTORY_MODE, TRUE);
+ (void)directory_make(spool_directory,
+ spool_sname(US"msglog", message_subdir),
+ MSGLOG_DIRECTORY_MODE, TRUE);
fd = Uopen(spool_name, O_WRONLY|O_APPEND|O_CREAT, SPOOL_MODE);
}
@@ -3954,17 +3952,9 @@ if (smtp_input && sender_host_address != NULL && !sender_host_notsocket &&
/* Delete the files for this aborted message. */
- sprintf(CS spool_name, "%s/input/%s/%s-D", spool_directory,
- message_subdir, message_id);
- Uunlink(spool_name);
-
- sprintf(CS spool_name, "%s/input/%s/%s-H", spool_directory,
- message_subdir, message_id);
- Uunlink(spool_name);
-
- sprintf(CS spool_name, "%s/msglog/%s/%s", spool_directory,
- message_subdir, message_id);
- Uunlink(spool_name);
+ Uunlink(spool_fname(US"input", message_subdir, message_id, US"-D"));
+ Uunlink(spool_fname(US"input", message_subdir, message_id, US"-H"));
+ Uunlink(spool_fname(US"msglog", message_subdir, message_id, US""));
goto TIDYUP;
}
@@ -4118,16 +4108,11 @@ if (smtp_input)
switch (cutthrough_done)
{
case ACCEPTED: log_write(0, LOG_MAIN, "Completed");/* Delivery was done */
- case PERM_REJ: { /* Delete spool files */
- sprintf(CS spool_name, "%s/input/%s/%s-D", spool_directory,
- message_subdir, message_id);
- Uunlink(spool_name);
- sprintf(CS spool_name, "%s/input/%s/%s-H", spool_directory,
- message_subdir, message_id);
- Uunlink(spool_name);
- sprintf(CS spool_name, "%s/msglog/%s/%s", spool_directory,
- message_subdir, message_id);
- Uunlink(spool_name);
+ case PERM_REJ:
+ { /* Delete spool files */
+ Uunlink(spool_fname(US"input", message_subdir, message_id, US"-D"));
+ Uunlink(spool_fname(US"input", message_subdir, message_id, US"-H"));
+ Uunlink(spool_fname(US"msglog", message_subdir, message_id, US""));
}
case TMP_REJ: message_id[0] = 0; /* Prevent a delivery from starting */
default:break;
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index df66ed02f..53387011c 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -4963,8 +4963,10 @@ while (done <= 0)
break;
}
etrn_command = US"exim -R";
- argv = CUSS child_exec_exim(CEE_RETURN_ARGV, TRUE, NULL, TRUE, 2, US"-R",
- smtp_cmd_data);
+ argv = CUSS child_exec_exim(CEE_RETURN_ARGV, TRUE, NULL, TRUE,
+ *queue_name ? 4 : 2,
+ US"-R", smtp_cmd_data,
+ US"-MCG", queue_name);
}
/* If we are host-testing, don't actually do anything. */
diff --git a/src/src/spool_in.c b/src/src/spool_in.c
index cafca603d..7eb42907c 100644
--- a/src/src/spool_in.c
+++ b/src/src/spool_in.c
@@ -37,7 +37,6 @@ spool_open_datafile(uschar *id)
int i;
struct stat statbuf;
flock_t lock_data;
-uschar spoolname[256];
int fd;
/* If split_spool_directory is set, first look for the file in the appropriate
@@ -49,20 +48,27 @@ splitting state. */
for (i = 0; i < 2; i++)
{
+ uschar * fname;
int save_errno;
- message_subdir[0] = (split_spool_directory == (i == 0))? id[5] : 0;
- sprintf(CS spoolname, "%s/input/%s/%s-D", spool_directory, message_subdir, id);
- if ((fd = Uopen(spoolname, O_RDWR | O_APPEND, 0)) >= 0)
+
+ message_subdir[0] = split_spool_directory == i == 0 ? id[5] : 0;
+ fname = spool_fname(US"input", message_subdir, id, US"-D");
+ DEBUG(D_deliver) debug_printf("Trying spool file %s\n", fname);
+
+ if ((fd = Uopen(fname, O_RDWR | O_APPEND, 0)) >= 0)
break;
save_errno = errno;
if (errno == ENOENT)
{
if (i == 0) continue;
if (!queue_running)
- log_write(0, LOG_MAIN, "Spool file %s-D not found", id);
+ log_write(0, LOG_MAIN, "Spool%s%s file %s-D not found",
+ *queue_name ? " Q=" : "",
+ *queue_name ? queue_name : "",
+ id);
}
- else log_write(0, LOG_MAIN, "Spool error for %s: %s", spoolname,
- strerror(errno));
+ else
+ log_write(0, LOG_MAIN, "Spool error for %s: %s", fname, strerror(errno));
errno = save_errno;
return -1;
}
@@ -318,12 +324,12 @@ and unsplit directories, as for the data file above. */
for (n = 0; n < 2; n++)
{
if (!subdir_set)
- message_subdir[0] = (split_spool_directory == (n == 0))? name[5] : 0;
- sprintf(CS big_buffer, "%s/input/%s/%s", spool_directory, message_subdir,
- name);
- f = Ufopen(big_buffer, "rb");
- if (f != NULL) break;
- if (n != 0 || subdir_set || errno != ENOENT) return spool_read_notopen;
+ message_subdir[0] = split_spool_directory == (n == 0) ? name[5] : 0;
+
+ if ((f = Ufopen(spool_fname(US"input", message_subdir, name, US""), "rb")))
+ break;
+ if (n != 0 || subdir_set || errno != ENOENT)
+ return spool_read_notopen;
}
errno = 0;
diff --git a/src/src/spool_mbox.c b/src/src/spool_mbox.c
index ada3f3693..b7ab06127 100644
--- a/src/src/spool_mbox.c
+++ b/src/src/spool_mbox.c
@@ -113,17 +113,15 @@ if (!spool_mbox_ok)
message_subdir[1] = '\0';
for (i = 0; i < 2; i++)
{
- message_subdir[0] = (split_spool_directory == (i == 0))? message_id[5] : 0;
- temp_string = string_sprintf("%s/input/%s/%s-D", spool_directory,
- message_subdir, message_id);
- data_file = Ufopen(temp_string, "rb");
- if (data_file != NULL) break;
+ message_subdir[0] = split_spool_directory == (i == 0) ? message_id[5] : 0;
+ temp_string = spool_fname(US"input", message_subdir, message_id, US"-D");
+ if ((data_file = Ufopen(temp_string, "rb"))) break;
}
}
else
data_file = Ufopen(source_file_override, "rb");
- if (data_file == NULL)
+ if (!data_file)
{
log_write(0, LOG_MAIN|LOG_PANIC, "Could not open datafile for message %s",
message_id);
diff --git a/src/src/spool_out.c b/src/src/spool_out.c
index e960907db..82b606871 100644
--- a/src/src/spool_out.c
+++ b/src/src/spool_out.c
@@ -134,15 +134,16 @@ int size_correction;
FILE *f;
header_line *h;
struct stat statbuf;
-uschar name[256];
-uschar temp_name[256];
+uschar * tname;
+uschar * fname;
-sprintf(CS temp_name, "%s/input/%s/hdr.%d", spool_directory, message_subdir,
- (int)getpid());
-fd = spool_open_temp(temp_name);
-if (fd < 0) return spool_write_error(where, errmsg, US"open", NULL, NULL);
+tname = spool_fname(US"input", message_subdir,
+ string_sprintf("hdr.%d", (int)getpid()), US"");
+
+if ((fd = spool_open_temp(tname)) < 0)
+ return spool_write_error(where, errmsg, US"open", NULL, NULL);
f = fdopen(fd, "wb");
-DEBUG(D_receive|D_deliver) debug_printf("Writing spool header file\n");
+DEBUG(D_receive|D_deliver) debug_printf("Writing spool header file: %s\n", tname);
/* We now have an open file to which the header data is to be written. Start
with the file's leaf name, to make the file self-identifying. Continue with the
@@ -302,7 +303,7 @@ to get the actual size of the headers. */
fflush(f);
if (fstat(fd, &statbuf))
- return spool_write_error(where, errmsg, US"fstat", temp_name, f);
+ return spool_write_error(where, errmsg, US"fstat", tname, f);
size_correction = statbuf.st_size;
/* Finally, write out the message's headers. To make it easier to read them
@@ -323,29 +324,30 @@ for (h = header_list; h != NULL; h = h->next)
/* Flush and check for any errors while writing */
if (fflush(f) != 0 || ferror(f))
- return spool_write_error(where, errmsg, US"write", temp_name, f);
+ return spool_write_error(where, errmsg, US"write", tname, f);
/* Force the file's contents to be written to disk. Note that fflush()
just pushes it out of C, and fclose() doesn't guarantee to do the write
either. That's just the way Unix works... */
if (EXIMfsync(fileno(f)) < 0)
- return spool_write_error(where, errmsg, US"sync", temp_name, f);
+ return spool_write_error(where, errmsg, US"sync", tname, f);
/* Get the size of the file, and close it. */
if (fstat(fd, &statbuf) != 0)
- return spool_write_error(where, errmsg, US"fstat", temp_name, NULL);
+ return spool_write_error(where, errmsg, US"fstat", tname, NULL);
if (fclose(f) != 0)
- return spool_write_error(where, errmsg, US"close", temp_name, NULL);
+ return spool_write_error(where, errmsg, US"close", tname, NULL);
/* Rename the file to its correct name, thereby replacing any previous
incarnation. */
-sprintf(CS name, "%s/input/%s/%s-H", spool_directory, message_subdir, id);
+fname = spool_fname(US"input", message_subdir, id, US"-H");
+DEBUG(D_receive|D_deliver) debug_printf("Renaming spool header file: %s\n", fname);
-if (Urename(temp_name, name) < 0)
- return spool_write_error(where, errmsg, US"rename", temp_name, NULL);
+if (Urename(tname, fname) < 0)
+ return spool_write_error(where, errmsg, US"rename", tname, NULL);
/* Linux (and maybe other OS?) does not automatically sync a directory after
an operation like rename. We therefore have to do it forcibly ourselves in
@@ -359,20 +361,20 @@ these cases. One hack on top of another... but that's life. */
#ifdef NEED_SYNC_DIRECTORY
-sprintf(CS temp_name, "%s/input/%s/.", spool_directory, message_subdir);
+tname = spool_fname(US"input", message_subdir, US".", US"");
-#ifndef O_DIRECTORY
-#define O_DIRECTORY 0
-#endif
+# ifndef O_DIRECTORY
+# define O_DIRECTORY 0
+# endif
-if ((fd = Uopen(temp_name, O_RDONLY|O_DIRECTORY, 0)) < 0)
- return spool_write_error(where, errmsg, US"directory open", name, NULL);
+if ((fd = Uopen(tname, O_RDONLY|O_DIRECTORY, 0)) < 0)
+ return spool_write_error(where, errmsg, US"directory open", fname, NULL);
if (EXIMfsync(fd) < 0 && errno != EINVAL)
- return spool_write_error(where, errmsg, US"directory sync", name, NULL);
+ return spool_write_error(where, errmsg, US"directory sync", fname, NULL);
if (close(fd) < 0)
- return spool_write_error(where, errmsg, US"directory close", name, NULL);
+ return spool_write_error(where, errmsg, US"directory close", fname, NULL);
#endif /* NEED_SYNC_DIRECTORY */
@@ -413,13 +415,12 @@ static BOOL
make_link(uschar *dir, uschar *subdir, uschar *id, uschar *suffix, uschar *from,
uschar *to, BOOL noentok)
{
-uschar f[256], t[256];
-sprintf(CS f, "%s/%s%s/%s/%s%s", spool_directory, from, dir, subdir, id, suffix);
-sprintf(CS t, "%s/%s%s/%s/%s%s", spool_directory, to, dir, subdir, id, suffix);
-if (Ulink(f, t) < 0 && (!noentok || errno != ENOENT))
+uschar * fname = spool_fname(string_sprintf("%s%s", from, dir), subdir, id, suffix);
+uschar * tname = spool_fname(string_sprintf("%s%s", to, dir), subdir, id, suffix);
+if (Ulink(fname, tname) < 0 && (!noentok || errno != ENOENT))
{
log_write(0, LOG_MAIN|LOG_PANIC, "link(\"%s\", \"%s\") failed while moving "
- "message: %s", f, t, strerror(errno));
+ "message: %s", fname, tname, strerror(errno));
return FALSE;
}
return TRUE;
@@ -451,12 +452,11 @@ static BOOL
break_link(uschar *dir, uschar *subdir, uschar *id, uschar *suffix, uschar *from,
BOOL noentok)
{
-uschar f[256];
-sprintf(CS f, "%s/%s%s/%s/%s%s", spool_directory, from, dir, subdir, id, suffix);
-if (Uunlink(f) < 0 && (!noentok || errno != ENOENT))
+uschar * fname = spool_fname(string_sprintf("%s%s", from, dir), subdir, id, suffix);
+if (Uunlink(fname) < 0 && (!noentok || errno != ENOENT))
{
log_write(0, LOG_MAIN|LOG_PANIC, "unlink(\"%s\") failed while moving "
- "message: %s", f, strerror(errno));
+ "message: %s", fname, strerror(errno));
return FALSE;
}
return TRUE;
@@ -488,10 +488,12 @@ spool_move_message(uschar *id, uschar *subdir, uschar *from, uschar *to)
{
/* Create any output directories that do not exist. */
-sprintf(CS big_buffer, "%sinput/%s", to, subdir);
-(void)directory_make(spool_directory, big_buffer, INPUT_DIRECTORY_MODE, TRUE);
-sprintf(CS big_buffer, "%smsglog/%s", to, subdir);
-(void)directory_make(spool_directory, big_buffer, INPUT_DIRECTORY_MODE, TRUE);
+(void) directory_make(spool_directory,
+ spool_sname(string_sprintf("%sinput", to), subdir),
+ INPUT_DIRECTORY_MODE, TRUE);
+(void) directory_make(spool_directory,
+ spool_sname(string_sprintf("%smsglog", to), subdir),
+ INPUT_DIRECTORY_MODE, TRUE);
/* Move the message by first creating new hard links for all the files, and
then removing the old links. When moving messages onto the main spool, the -H
diff --git a/src/src/transport.c b/src/src/transport.c
index 86350ba9d..e1e6dcebf 100644
--- a/src/src/transport.c
+++ b/src/src/transport.c
@@ -1013,7 +1013,7 @@ dkim_transport_write_message(address_item *addr, int fd, int options,
int dkim_fd;
int save_errno = 0;
BOOL rc;
-uschar dkim_spool_name[256];
+uschar * dkim_spool_name;
char sbuf[2048];
int sread = 0;
int wwritten = 0;
@@ -1027,8 +1027,8 @@ if (!(dkim_private_key && dkim_domain && dkim_selector))
check_string, escape_string, rewrite_rules,
rewrite_existflags);
-(void)string_format(dkim_spool_name, 256, "%s/input/%s/%s-%d-K",
- spool_directory, message_subdir, message_id, (int)getpid());
+dkim_spool_name = spool_fname(US"input", message_subdir, message_id,
+ string_sprintf("-%d-K", (int)getpid()));
if ((dkim_fd = Uopen(dkim_spool_name, O_RDWR|O_CREAT|O_TRUNC, SPOOL_MODE)) < 0)
{
@@ -1655,8 +1655,6 @@ open_db *dbm_file;
uschar buffer[256];
int i;
-uschar spool_dir [PATH_MAX];
-uschar spool_file [PATH_MAX];
struct stat statbuf;
*more = FALSE;
@@ -1714,8 +1712,6 @@ emptied, delete it and continue with any continuation records that may exist.
but the 1 off will remain without it. This code now allows me to SKIP over
a message I do not want to send out on this run. */
-sprintf(CS spool_dir, "%s/input/", spool_directory);
-
host_length = host_record->count * MESSAGE_ID_LENGTH;
while (1)
@@ -1754,13 +1750,13 @@ while (1)
for (i = msgq_count - 1; i >= 0; --i) if (msgq[i].bKeep)
{
- if (split_spool_directory)
- sprintf(CS spool_file, "%s%c/%s-D",
- spool_dir, msgq[i].message_id[5], msgq[i].message_id);
- else
- sprintf(CS spool_file, "%s%s-D", spool_dir, msgq[i].message_id);
+ uschar subdir[2];
+
+ subdir[0] = split_spool_directory ? msgq[i].message_id[5] : 0;
+ subdir[1] = 0;
- if (Ustat(spool_file, &statbuf) != 0)
+ if (Ustat(spool_fname(US"input", subdir, msgq[i].message_id, US"-D"),
+ &statbuf) != 0)
msgq[i].bKeep = FALSE;
else if (!oicf_func || oicf_func(msgq[i].message_id, oicf_data))
{
@@ -1927,7 +1923,6 @@ if ((pid = fork()) == 0)
argv = CUSS child_exec_exim(CEE_RETURN_ARGV, TRUE, &i, FALSE, 0);
- /* Call with the dsn flag */
if (smtp_use_dsn) argv[i++] = US"-MCD";
if (smtp_authenticated) argv[i++] = US"-MCA";
diff --git a/test/confs/0001 b/test/confs/0001
index 0daf053bd..0fd7efe44 100644
--- a/test/confs/0001
+++ b/test/confs/0001
@@ -148,7 +148,7 @@ no_queue_only_override
queue_only_file = /var/spool/exim/queue_only
queue_only_load = 8.2
no_queue_run_in_order
-queue_run_max = 5
+queue_run_max = ${if = {1}{1} {5}{10}}
queue_smtp_domains = x.y.z
receive_timeout = 0s
received_header_text = Received: ${if def:sender_rcvhost {from ${sender_rcvhost}\n\t}{${if def:sender_ident {from ${sender_ident} }}${if def:sender_helo_name {(helo=${sender_helo_name})\n\t}}}}by ${primary_hostname} ${if def:received_protocol {with ${received_protocol}}} (Exim ${version_number} #${compile_number})\n\tid ${message_id}${if def:received_for {\n\tfor $received_for}}
diff --git a/test/confs/0576 b/test/confs/0576
new file mode 100644
index 000000000..e75f94476
--- /dev/null
+++ b/test/confs/0576
@@ -0,0 +1,46 @@
+# Exim test configuration 0576
+
+SERVER =
+
+exim_path = EXIM_PATH
+keep_environment =
+host_lookup_order = bydns
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/SERVER%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+tls_advertise_hosts =
+
+log_selector = +received_recipients +sender_on_delivery
+
+acl_smtp_rcpt = rcpt
+queue_only
+queue_run_in_order
+
+#---------------
+
+begin acl
+
+rcpt:
+ accept
+ queue = ${if eq {normal}{$local_part} {} {$local_part}}
+ logwrite = using queue '$queue_name'
+
+#---------------
+
+begin routers
+
+all:
+ driver = accept
+ transport = dump
+
+#---------------
+
+begin transports
+
+dump:
+ driver = pipe
+ command = true
+
+# End
+
diff --git a/test/log/0576 b/test/log/0576
new file mode 100644
index 000000000..373f1d320
--- /dev/null
+++ b/test/log/0576
@@ -0,0 +1,25 @@
+1999-03-02 09:44:33 using queue ''
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local-smtp S=sss for normal@test.ex
+1999-03-02 09:44:33 using queue 'alternate'
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local-smtp S=sss Q=alternate for alternate@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp -qq
+1999-03-02 09:44:33 10HmaX-0005vi-00 => normal <normal@test.ex> F=<CALLER@the.local.host.name> R=all T=dump
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp -qq
+1999-03-02 09:44:33 Start 'nosuchqueue' queue run: pid=pppp
+1999-03-02 09:44:33 End 'nosuchqueue' queue run: pid=pppp
+1999-03-02 09:44:33 Start 'alternate' queue run: pid=pppp
+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 using queue 'lowpri'
+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, -qGlowpri/3s, 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/runtest b/test/runtest
index 3403d78de..6cb90fb7d 100755
--- a/test/runtest
+++ b/test/runtest
@@ -653,6 +653,9 @@ RESET_AFTER_EXTRA_LINE_READ:
s/waiting for children of \d+/waiting for children of pppp/;
s/waiting for (\S+) \(\d+\)/waiting for $1 (pppp)/;
+ # The spool header file name varies with PID
+ s%^(Writing spool header file: .*/hdr).[0-9]{1,5}%$1.pppp%;
+
# ======== Port numbers ========
# Incoming port numbers may vary, but not in daemon startup line.
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002
index 583adcff0..278a38660 100644
--- a/test/scripts/0000-Basic/0002
+++ b/test/scripts/0000-Basic/0002
@@ -23,6 +23,7 @@ primary_hostname: ${primary_hostname}
qualify_domain: $qualify_domain
bounce_return_size_limit: ${bounce_return_size_limit}
spool_directory: $spool_directory
+queue_name: $queue_name
unknown: ${unknown}
h_subject: $h_subject:(should be empty)
h_subject:$h_subject (should be empty)
diff --git a/test/scripts/0000-Basic/0576 b/test/scripts/0000-Basic/0576
new file mode 100644
index 000000000..144f02c48
--- /dev/null
+++ b/test/scripts/0000-Basic/0576
@@ -0,0 +1,52 @@
+# named queues
+# Exim test configuration 0576
+#
+no_msglog_check
+#
+exim -bs
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO: <normal@test.ex>
+DATA
+Subject: test
+
+foo
+.
+RSET
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO: <alternate@test.ex>
+DATA
+Subject: test
+
+foo
+.
+QUIT
+****
+#
+exim -qq
+****
+#
+exim -qGnosuchqueue
+****
+#
+exim -qGalternate
+****
+#
+#
+#
+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/stderr/0022 b/test/stderr/0022
index 6451e758d..c51b15bda 100644
--- a/test/stderr/0022
+++ b/test/stderr/0022
@@ -45,6 +45,7 @@ host in ignore_fromline_hosts? no (option unset)
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmbF-0005vi-00-D
Data file written for message 10HmbF-0005vi-00
>>Generated Received: header line
P Received: from [V4NET.9.8.7]
@@ -114,6 +115,7 @@ host in ignore_fromline_hosts? no (option unset)
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmbG-0005vi-00-D
Data file written for message 10HmbG-0005vi-00
>>Generated Received: header line
P Received: from [V4NET.9.8.7]
@@ -181,6 +183,7 @@ host in ignore_fromline_hosts? no (option unset)
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmbH-0005vi-00-D
Data file written for message 10HmbH-0005vi-00
>>Generated Received: header line
P Received: from [V4NET.9.8.7]
diff --git a/test/stderr/0218 b/test/stderr/0218
index c58c83011..fe4ee2df9 100644
--- a/test/stderr/0218
+++ b/test/stderr/0218
@@ -5,6 +5,7 @@ Single queue run
LOG: queue_run MAIN
Start queue run: pid=pppp -qq
queue running combined directories
+looking in TESTSUITE/spool//input
delivering 10HmaX-0005vi-00 (queue run pid ppppp)
R: client (ACL)
T: send_to_server (ACL)
@@ -12,6 +13,7 @@ delivering 10HmaY-0005vi-00 (queue run pid ppppp)
R: client (ACL)
T: send_to_server (ACL)
queue running combined directories
+looking in TESTSUITE/spool//input
delivering 10HmaX-0005vi-00 (queue run pid ppppp)
R: client (ACL)
T: send_to_server (ACL)
@@ -65,6 +67,7 @@ Single queue run
LOG: queue_run MAIN
Start queue run: pid=pppp -qq
queue running combined directories
+looking in TESTSUITE/spool//input
delivering 10HmaZ-0005vi-00 (queue run pid ppppp)
R: client (ACL)
T: send_to_server (ACL)
@@ -72,6 +75,7 @@ delivering 10HmbA-0005vi-00 (queue run pid ppppp)
R: client (ACL)
T: send_to_server (ACL)
queue running combined directories
+looking in TESTSUITE/spool//input
delivering 10HmaZ-0005vi-00 (queue run pid ppppp)
R: client (ACL)
T: send_to_server (ACL)
diff --git a/test/stderr/0275 b/test/stderr/0275
index bb642b01b..0806065d4 100644
--- a/test/stderr/0275
+++ b/test/stderr/0275
@@ -141,6 +141,7 @@ I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -149,11 +150,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -179,6 +181,7 @@ DSN: r2 propagating DSN
DSN: r3 propagating DSN
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
diff --git a/test/stderr/0278 b/test/stderr/0278
index fd5795b04..2a1afdd06 100644
--- a/test/stderr/0278
+++ b/test/stderr/0278
@@ -92,6 +92,7 @@ I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -100,11 +101,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for CALLER@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |CALLER@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -126,6 +128,7 @@ DSN: r4 propagating DSN
DSN: r5 propagating DSN
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
diff --git a/test/stderr/0294 b/test/stderr/0294
index 24da1eb2d..abd94f4f1 100644
--- a/test/stderr/0294
+++ b/test/stderr/0294
@@ -38,6 +38,7 @@ I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
F From: x@y
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
@@ -45,7 +46,8 @@ P Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= x@y U=CALLER P=local-smtp S=sss
@@ -67,6 +69,7 @@ I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
F From: x@y
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
@@ -75,7 +78,8 @@ P Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
for two@z; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= x@y U=CALLER P=local-smtp S=sss
diff --git a/test/stderr/0303 b/test/stderr/0303
index 02f42e0a0..cc6b08b27 100644
--- a/test/stderr/0303
+++ b/test/stderr/0303
@@ -90,6 +90,7 @@ search_tidyup called
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from [V4NET.2.3.4]
@@ -162,6 +163,7 @@ search_tidyup called
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from host.name.tld ([V4NET.2.3.4])
diff --git a/test/stderr/0317 b/test/stderr/0317
index 8cd90b29b..5ffdc4a36 100644
--- a/test/stderr/0317
+++ b/test/stderr/0317
@@ -17,6 +17,7 @@ I Message-Id: <E10HmaX-0005vi-00@mail.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by mail.test.ex with local (Exim x.yz)
@@ -24,7 +25,8 @@ P Received: from CALLER by mail.test.ex with local (Exim x.yz)
id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -55,6 +57,7 @@ C Resent-cc: pp@qq.rr
* Resent-bcc: xx@yy.zz
F Resent-From: CALLER_NAME <CALLER@test.ex>
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from CALLER by mail.test.ex with local (Exim x.yz)
@@ -62,7 +65,8 @@ P Received: from CALLER by mail.test.ex with local (Exim x.yz)
id 10HmaY-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
diff --git a/test/stderr/0361 b/test/stderr/0361
index 43bcdbf84..1c8029894 100644
--- a/test/stderr/0361
+++ b/test/stderr/0361
@@ -35,6 +35,7 @@ I Message-Id: <E10HmaY-0005vi-00@the.local.host.name>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from CALLER by the.local.host.name with local (Exim x.yz)
@@ -43,11 +44,12 @@ P Received: from CALLER by the.local.host.name with local (Exim x.yz)
for kilos@recurse.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |kilos@recurse.test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -67,6 +69,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaY-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaY-0005vi-00-D
reading spool file 10HmaY-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
diff --git a/test/stderr/0371 b/test/stderr/0371
index 534a643f3..2eabbaa6f 100644
--- a/test/stderr/0371
+++ b/test/stderr/0371
@@ -75,6 +75,7 @@ search_tidyup called
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from [V4NET.0.0.0] (helo=something)
diff --git a/test/stderr/0386 b/test/stderr/0386
index 3232ada03..422f74d21 100644
--- a/test/stderr/0386
+++ b/test/stderr/0386
@@ -191,6 +191,7 @@ host in ignore_fromline_hosts? no (option unset)
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from [V4NET.11.12.13] (ident=CALLER)
@@ -204,11 +205,12 @@ P Received: from [V4NET.11.12.13] (ident=CALLER)
>>
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |2@b| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= x@y H=[V4NET.11.12.13] U=CALLER P=smtp S=sss
@@ -228,6 +230,7 @@ seeking password data for user "CALLER": using cached result
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=x@y
sender_fullhost = [V4NET.11.12.13]
@@ -368,6 +371,7 @@ host in ignore_fromline_hosts? no (option unset)
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from [V4NET.11.12.13] (ident=CALLER)
@@ -381,11 +385,12 @@ P Received: from [V4NET.11.12.13] (ident=CALLER)
>>
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |2@b| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= x@y H=[V4NET.11.12.13] U=CALLER P=smtp S=sss
@@ -405,6 +410,7 @@ seeking password data for user "CALLER": using cached result
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaY-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaY-0005vi-00-D
reading spool file 10HmaY-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=x@y
sender_fullhost = [V4NET.11.12.13]
diff --git a/test/stderr/0388 b/test/stderr/0388
index 67b47ab06..d45a21121 100644
--- a/test/stderr/0388
+++ b/test/stderr/0388
@@ -202,6 +202,7 @@ T To: CALLER@myhost.test.ex
I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz)
@@ -209,7 +210,8 @@ P Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz)
for CALLER@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss
@@ -280,7 +282,8 @@ search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
Completed
diff --git a/test/stderr/0402 b/test/stderr/0402
index bf70c587f..9f95393f3 100644
--- a/test/stderr/0402
+++ b/test/stderr/0402
@@ -37,6 +37,7 @@ I Message-Id: <E10HmaX-0005vi-00@mail.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
considering: ${tod_full}
expanding: ${tod_full}
@@ -148,7 +149,7 @@ local_scan() returned 0 NULL
considering: ${tod_full}
expanding: ${tod_full}
result: Tue, 2 Mar 1999 09:44:33 +0000
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
@@ -161,6 +162,7 @@ DSN: Flags :0
DSN: **** SPOOL_OUT - address: |rd+CALLER@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |rd+usery@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -186,6 +188,7 @@ seeking password data for user "CALLER": using cached result
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
diff --git a/test/stderr/0403 b/test/stderr/0403
index 96e990bfd..0f5338b38 100644
--- a/test/stderr/0403
+++ b/test/stderr/0403
@@ -25,6 +25,7 @@ I Message-Id: <E10HmaX-0005vi-00@mail.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by mail.test.ex with local (Exim x.yz)
@@ -33,11 +34,12 @@ P Received: from CALLER by mail.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -55,6 +57,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
diff --git a/test/stderr/0404 b/test/stderr/0404
index 1f791c416..f1c32cf94 100644
--- a/test/stderr/0404
+++ b/test/stderr/0404
@@ -125,6 +125,7 @@ I Message-Id: <E10HmaX-0005vi-00@mail.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by mail.test.ex with local (Exim x.yz)
@@ -133,11 +134,12 @@ P Received: from CALLER by mail.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -158,6 +160,7 @@ seeking password data for user "CALLER": using cached result
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
@@ -286,13 +289,14 @@ I Message-Id: <E10HmaY-0005vi-00@mail.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from CALLER by mail.test.ex with local (Exim x.yz)
id 10HmaY-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
@@ -1511,6 +1515,7 @@ DSN: Flags :0
DSN: **** SPOOL_OUT - address: |sender@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |sender@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= <> R=10HmaX-0005vi-00 U=CALLER P=local S=sss
@@ -1530,6 +1535,7 @@ seeking password data for user "CALLER": using cached result
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaY-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaY-0005vi-00-D
reading spool file 10HmaY-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=
sender_local=1 ident=CALLER
diff --git a/test/stderr/0408 b/test/stderr/0408
index 67fe44cb5..96b57117d 100644
--- a/test/stderr/0408
+++ b/test/stderr/0408
@@ -25,6 +25,7 @@ I Message-Id: <E10HmaX-0005vi-00@mail.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by mail.test.ex with local (Exim x.yz)
@@ -33,11 +34,12 @@ P Received: from CALLER by mail.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -55,6 +57,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
diff --git a/test/stderr/0465 b/test/stderr/0465
index f86dc46e8..01b71ac81 100644
--- a/test/stderr/0465
+++ b/test/stderr/0465
@@ -69,6 +69,7 @@ T To: abc@domain.
I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
@@ -81,11 +82,12 @@ accept: condition test succeeded in ACL "check_data"
end of ACL "check_data": ACCEPT
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |abc@domain| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= <> U=CALLER P=local-smtp S=sss
@@ -138,6 +140,7 @@ T To: abc@xyz.
I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
diff --git a/test/stderr/0471 b/test/stderr/0471
index 1c860c21f..eba0e4a52 100644
--- a/test/stderr/0471
+++ b/test/stderr/0471
@@ -25366,6 +25366,7 @@ I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -25374,11 +25375,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for r1@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |r1@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
diff --git a/test/stderr/0487 b/test/stderr/0487
index c8d720beb..1f4f5116e 100644
--- a/test/stderr/0487
+++ b/test/stderr/0487
@@ -49,6 +49,7 @@ F From: unqualified
I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER (helo=x.y)
@@ -58,11 +59,12 @@ P Received: from CALLER (helo=x.y)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= x@y U=CALLER P=local-esmtp S=sss
@@ -83,6 +85,7 @@ seeking password data for user "CALLER": using cached result
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=x@y
sender_local=0 ident=CALLER
diff --git a/test/stderr/0489 b/test/stderr/0489
index 291dda645..23b0212a0 100644
--- a/test/stderr/0489
+++ b/test/stderr/0489
@@ -14,6 +14,7 @@ I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
F From: "Phil Q. Hazel" <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -22,7 +23,8 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for X@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
@@ -44,6 +46,7 @@ I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
F From: John "Jack" Smith <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -52,7 +55,8 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for X@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
@@ -73,6 +77,7 @@ I Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
F From: John "Jack" "Q." Smith <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaZ-0005vi-00-D
Data file written for message 10HmaZ-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -81,7 +86,8 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for X@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmaZ-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
@@ -102,6 +108,7 @@ I Message-Id: <E10HmbA-0005vi-00@myhost.test.ex>
F From: "John (Jack) Q. Smith" <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmbA-0005vi-00-D
Data file written for message 10HmbA-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -110,7 +117,8 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for X@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmbA-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
@@ -131,6 +139,7 @@ I Message-Id: <E10HmbB-0005vi-00@myhost.test.ex>
F From: John ("Jack") "Q." Smith <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmbB-0005vi-00-D
Data file written for message 10HmbB-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -139,7 +148,8 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for X@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmbB-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
@@ -160,6 +170,7 @@ I Message-Id: <E10HmbC-0005vi-00@myhost.test.ex>
F From: "John (\"Jack\") Q. Smith" <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmbC-0005vi-00-D
Data file written for message 10HmbC-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -168,7 +179,8 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for X@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmbC-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
@@ -189,6 +201,7 @@ I Message-Id: <E10HmbD-0005vi-00@myhost.test.ex>
F From: "Phil \"Q Hazel" <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmbD-0005vi-00-D
Data file written for message 10HmbD-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -197,7 +210,8 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for X@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmbD-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
@@ -218,6 +232,7 @@ I Message-Id: <E10HmbE-0005vi-00@myhost.test.ex>
F From: "Phil \"Q" "X." Hazel <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmbE-0005vi-00-D
Data file written for message 10HmbE-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -226,7 +241,8 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for X@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
+Renaming spool header file: TESTSUITE/spool//input//10HmbE-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
diff --git a/test/stderr/0514 b/test/stderr/0514
index 22f78df7e..0c24042f8 100644
--- a/test/stderr/0514
+++ b/test/stderr/0514
@@ -6,6 +6,7 @@ admin user
changed uid/gid: privilege not needed
uid=EXIM_UID gid=EXIM_GID pid=pppp
set_process_info: pppp listing the queue
+looking in TESTSUITE/spool//input
reading spool file 10HmaX-0005vi-00-H
user=spaced user uid=CALLER_UID gid=CALLER_GID sender="spaced user"@myhost.test.ex
sender_local=1 ident=spaced user
diff --git a/test/stderr/0575 b/test/stderr/0575
index 4c1a4c099..fb8282a6a 100644
--- a/test/stderr/0575
+++ b/test/stderr/0575
@@ -39,6 +39,7 @@ host in ignore_fromline_hosts? no (option unset)
search_tidyup called
>>Headers after rewriting and local additions:
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from [V4NET.0.0.0]
diff --git a/test/stderr/2600 b/test/stderr/2600
index cc1864aa2..6f2eaeac1 100644
--- a/test/stderr/2600
+++ b/test/stderr/2600
@@ -309,6 +309,7 @@ I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -317,11 +318,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for userx@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@myhost.test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@myhost.test.ex U=CALLER P=local S=sss
@@ -339,6 +341,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@myhost.test.ex
sender_local=1 ident=CALLER
diff --git a/test/stderr/5004 b/test/stderr/5004
index 501488711..c619887d3 100644
--- a/test/stderr/5004
+++ b/test/stderr/5004
@@ -27,6 +27,7 @@ I Message-Id: <E10HmaX-0005vi-00@mail.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by mail.test.ex with local (Exim x.yz)
@@ -35,11 +36,12 @@ P Received: from CALLER by mail.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -59,6 +61,7 @@ seeking password data for user "CALLER": using cached result
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
diff --git a/test/stderr/5005 b/test/stderr/5005
index f55aa9b1f..ad683388f 100644
--- a/test/stderr/5005
+++ b/test/stderr/5005
@@ -25,6 +25,7 @@ I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -33,11 +34,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for nofile@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |nofile@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -55,6 +57,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
@@ -209,6 +212,7 @@ I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaY-0005vi-00-D
Data file written for message 10HmaY-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -217,11 +221,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaY-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -238,6 +243,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaY-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaY-0005vi-00-D
reading spool file 10HmaY-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
@@ -393,6 +399,7 @@ I Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaZ-0005vi-00-D
Data file written for message 10HmaZ-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -401,11 +408,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaZ-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -422,6 +430,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaZ-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaZ-0005vi-00-D
reading spool file 10HmaZ-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
@@ -545,11 +554,12 @@ Writing retry data for T:userx@test.ex
dbfn_write: key=T:userx@test.ex
end of retry processing
delivery deferred: update_spool=1 header_rewritten=0
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaZ-0005vi-00-H
Size of headers = sss
end delivery of 10HmaZ-0005vi-00
search_tidyup called
@@ -584,6 +594,7 @@ I Message-Id: <E10HmbA-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmbA-0005vi-00-D
Data file written for message 10HmbA-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -592,11 +603,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmbA-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -613,6 +625,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmbA-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmbA-0005vi-00-D
reading spool file 10HmbA-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
@@ -729,11 +742,12 @@ Writing retry data for T:userx@test.ex
dbfn_write: key=T:userx@test.ex
end of retry processing
delivery deferred: update_spool=1 header_rewritten=0
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmbA-0005vi-00-H
Size of headers = sss
end delivery of 10HmbA-0005vi-00
search_tidyup called
diff --git a/test/stderr/5006 b/test/stderr/5006
index 15e322819..6162c9bb0 100644
--- a/test/stderr/5006
+++ b/test/stderr/5006
@@ -25,6 +25,7 @@ I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
F From: CALLER_NAME <CALLER@test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Data file name: TESTSUITE/spool//input//10HmaX-0005vi-00-D
Data file written for message 10HmaX-0005vi-00
>>Generated Received: header line
P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
@@ -33,11 +34,12 @@ P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
calling local_scan(); timeout=300
local_scan() returned 0 NULL
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |userx@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local S=sss
@@ -55,6 +57,7 @@ seeking password data for user "CALLER": cache not available
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
set_process_info: pppp delivering specified messages
set_process_info: pppp delivering 10HmaX-0005vi-00
+Trying spool file TESTSUITE/spool//input//10HmaX-0005vi-00-D
reading spool file 10HmaX-0005vi-00-H
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
diff --git a/test/stdout/0002 b/test/stdout/0002
index 9a2768bdc..0bbd4c754 100644
--- a/test/stdout/0002
+++ b/test/stdout/0002
@@ -14,6 +14,7 @@
> qualify_domain: myhost.test.ex
> bounce_return_size_limit: 102400
> spool_directory: TESTSUITE/spool
+> queue_name:
> Failed: unknown variable in "${unknown}"
> h_subject: (should be empty)
> h_subject: (should be empty)
diff --git a/test/stdout/0574 b/test/stdout/0574
index 8b960505d..aea0754b7 100644
--- a/test/stdout/0574
+++ b/test/stdout/0574
@@ -38,11 +38,12 @@ local_scan() returned 0 NULL
considering: ${tod_full}
expanding: ${tod_full}
result: Tue, 2 Mar 1999 09:44:33 +0000
-Writing spool header file
+Writing spool header file: TESTSUITE/spool//input//hdr.pppp
DSN: Write SPOOL :-dsn_envid NULL
DSN: Write SPOOL :-dsn_ret 0
DSN: Flags :0
DSN: **** SPOOL_OUT - address: |dest@test.ex| errorsto: |NULL| orcpt: |NULL| dsn_flags: 0
+Renaming spool header file: TESTSUITE/spool//input//10HmaX-0005vi-00-H
Size of headers = sss
LOG: MAIN
<= tester@test.ex H=(test.ex) [127.0.0.1] P=esmtp S=sss
diff --git a/test/stdout/0576 b/test/stdout/0576
new file mode 100644
index 000000000..608078ed1
--- /dev/null
+++ b/test/stdout/0576
@@ -0,0 +1,17 @@
+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=10HmaX-0005vi-00
+250 Reset OK
+250 OK
+250 Accepted
+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