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
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
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:
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
-.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,
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"
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
&`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
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
------------
# 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
@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) \
uschar *primary_hostname = NULL;
+uschar *queue_name = US"";
+
int received_count = 0;
uschar *received_protocol = NULL;
int received_time = 0;
* 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 */
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);
}
}
* 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;
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);
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;
been delivered, and removing visible names. */
if (recipients_list != NULL)
- {
for (i = 0; i < recipients_count; i++)
{
uschar *r = recipients_list[i].address;
(void)find_dest(q, r, dest_add, FALSE);
}
}
- }
/* Recover the dynamic store used by spool_read_header(). */
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;
}
#ifdef WITH_CONTENT_SCAN
ACLC_MIME_REGEX,
#endif
+ ACLC_QUEUE,
ACLC_RATELIMIT,
ACLC_RECIPIENTS,
#ifdef WITH_CONTENT_SCAN
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. */
#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
#ifdef WITH_CONTENT_SCAN
TRUE, /* mime_regex */
#endif
+ TRUE, /* queue */
TRUE, /* ratelimit */
FALSE, /* recipients */
#ifdef WITH_CONTENT_SCAN
#ifdef WITH_CONTENT_SCAN
FALSE, /* mime_regex */
#endif
+ TRUE, /* queue */
FALSE, /* ratelimit */
FALSE, /* recipients */
#ifdef WITH_CONTENT_SCAN
~(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)
rc = match_isinlist(dkim_cur_signer,
&arg,0,NULL,NULL,MCL_STRING,TRUE,NULL);
else
- rc = FAIL;
+ rc = FAIL;
break;
case ACLC_DKIM_STATUS:
break;
#endif
+ case ACLC_QUEUE:
+ queue_name = string_copy_malloc(arg);
+ break;
+
case ACLC_RATELIMIT:
rc = acl_ratelimit(arg, where, log_msgptr);
break;
{
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. */
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,
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. */
}
/* 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;
queue_run_count, (queue_run_count == 1)? "" : "es");
break;
}
- }
}
}
}
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. */
/* 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. */
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.
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) */
}
}
- if (ipa != NULL)
+ if (ipa)
{
memcpy(p, " ...", 5);
p += 4;
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
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)
{
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;
}
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");
}
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;
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,
static uschar *frozen_info = US"";
static uschar *used_return_path = NULL;
-static uschar spoolname[PATH_MAX];
-
/*************************************************
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);
}
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">");
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
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))
|| 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));
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 */
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
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 */
+ }
}
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 */
}
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 */
}
}
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;
}
|| 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;
}
}
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. */
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 */
uschar * new_sender_address,
* save_sender_address;
BOOL save_qr = queue_running;
+uschar * spoolname;
/* make spool_open_datafile non-noisy on fail */
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);
/* -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) */
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;
}
if (*argrest == 'f')
{
queue_run_force = TRUE;
- if (*(++argrest) == 'f')
+ if (*++argrest == 'f')
{
deliver_force_thaw = TRUE;
argrest++;
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])))
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;
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;
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;
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;
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.
/* 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:
) ||
(
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)
) ||
(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);
}
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. */
}
{ "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 },
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);
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;
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;
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 */
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 */
+/* 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. */
/* 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 */
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. */
{
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 */
}
}
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. */
/* 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
/* 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);
}
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)
/* 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)
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 ***");
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. */
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)
tidying up broken states. */
if ((deliver_datafile = spool_open_datafile(id)) < 0)
- {
if (errno == ENOENT)
{
yield = FALSE;
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
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:
}
}
+#endif /*!COMPILE_UTILITY*/
+
/* End of queue.c */
{ "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 },
static FILE *data_file = NULL;
static int data_fd = -1;
-static uschar spool_name[256];
+static uschar *spool_name = US"";
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 */
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
/* 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)
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
/* 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);
/* Does not return */
}
}
- }
/* The message has now been successfully received. */
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.
{
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);
}
/* 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;
}
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;
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. */
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
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;
}
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;
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);
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
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
/* 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
#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 */
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;
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;
{
/* 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
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;
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)
{
uschar buffer[256];
int i;
-uschar spool_dir [PATH_MAX];
-uschar spool_file [PATH_MAX];
struct stat statbuf;
*more = FALSE;
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)
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))
{
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";
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}}
--- /dev/null
+# 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
+
--- /dev/null
+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
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.
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)
--- /dev/null
+# 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
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]
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]
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]
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)
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)
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)
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)
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)
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
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
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)
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
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
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)
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
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)
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
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]
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])
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)
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
* 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)
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
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)
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
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
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)
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)
>>
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
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]
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)
>>
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
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]
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)
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
>>>>>>>>>>>>>>>> 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
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}
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: |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
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
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)
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
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
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)
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
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
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
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
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
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)
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
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
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)
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
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)
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)
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
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)
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
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
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)
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
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)
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
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)
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
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)
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
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)
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
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)
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
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)
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
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)
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
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
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]
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)
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
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
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)
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
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
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)
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
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
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)
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
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
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)
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
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
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
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)
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
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
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
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)
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
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
> 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)
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
--- /dev/null
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaX-0005vi-00\r
+250 Reset OK\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaY-0005vi-00\r
+221 the.local.host.name closing connection\r
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaZ-0005vi-00\r
+221 the.local.host.name closing connection\r