git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix local delivery delay when combined with remote callout/hold. Bug 2599
[exim.git]
/
src
/
src
/
spool_out.c
diff --git
a/src/src/spool_out.c
b/src/src/spool_out.c
index 463961f57e270dd726a7b5f03dcd3d9b48692fd0..113765babb90dbaedaf23d64e7e2edac78b43b05 100644
(file)
--- a/
src/src/spool_out.c
+++ b/
src/src/spool_out.c
@@
-3,6
+3,7
@@
*************************************************/
/* Copyright (c) University of Cambridge 1995 - 2018 */
*************************************************/
/* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
/* See the file NOTICE for conditions of use and distribution. */
/* Functions for writing spool files, and moving them about. */
/* See the file NOTICE for conditions of use and distribution. */
/* Functions for writing spool files, and moving them about. */
@@
-173,9
+174,11
@@
if (sender_host_address)
fprintf(fp, "-host_address %s.%d\n", sender_host_address, sender_host_port);
if (sender_host_name)
spool_var_write(fp, US"host_name", sender_host_name);
fprintf(fp, "-host_address %s.%d\n", sender_host_address, sender_host_port);
if (sender_host_name)
spool_var_write(fp, US"host_name", sender_host_name);
- if (sender_host_authenticated)
- spool_var_write(fp, US"host_auth", sender_host_authenticated);
}
}
+if (sender_host_authenticated)
+ spool_var_write(fp, US"host_auth", sender_host_authenticated);
+if (sender_host_auth_pubname)
+ spool_var_write(fp, US"host_auth_pubname", sender_host_auth_pubname);
/* Also about the interface a message came in on */
/* Also about the interface a message came in on */
@@
-260,9
+263,10
@@
if (tls_in.ourcert)
fprintf(fp, "-tls_ourcert %s\n", CS big_buffer);
}
if (tls_in.ocsp) fprintf(fp, "-tls_ocsp %d\n", tls_in.ocsp);
fprintf(fp, "-tls_ourcert %s\n", CS big_buffer);
}
if (tls_in.ocsp) fprintf(fp, "-tls_ocsp %d\n", tls_in.ocsp);
-# if
def EXPERIMENTAL
_TLS_RESUME
+# if
ndef DISABLE
_TLS_RESUME
fprintf(fp, "-tls_resumption %c\n", 'A' + tls_in.resumption);
# endif
fprintf(fp, "-tls_resumption %c\n", 'A' + tls_in.resumption);
# endif
+if (tls_in.ver) spool_var_write(fp, US"tls_ver", tls_in.ver);
#endif
#ifdef SUPPORT_I18N
#endif
#ifdef SUPPORT_I18N
@@
-275,9
+279,9
@@
if (message_smtputf8)
#endif
/* Write the dsn flags to the spool header file */
#endif
/* Write the dsn flags to the spool header file */
-DEBUG(D_deliver) debug_printf("DSN: Write SPOOL: -dsn_envid %s\n", dsn_envid);
+/* DEBUG(D_deliver) debug_printf("DSN: Write SPOOL: -dsn_envid %s\n", dsn_envid); */
if (dsn_envid) fprintf(fp, "-dsn_envid %s\n", dsn_envid);
if (dsn_envid) fprintf(fp, "-dsn_envid %s\n", dsn_envid);
-DEBUG(D_deliver) debug_printf("DSN: Write SPOOL :-dsn_ret %d\n", dsn_ret);
+/* DEBUG(D_deliver) debug_printf("DSN: Write SPOOL: -dsn_ret %d\n", dsn_ret); */
if (dsn_ret) fprintf(fp, "-dsn_ret %d\n", dsn_ret);
/* To complete the envelope, write out the tree of non-recipients, followed by
if (dsn_ret) fprintf(fp, "-dsn_ret %d\n", dsn_ret);
/* To complete the envelope, write out the tree of non-recipients, followed by
@@
-291,7
+295,7
@@
for (int i = 0; i < recipients_count; i++)
{
recipient_item *r = recipients_list + i;
{
recipient_item *r = recipients_list + i;
- DEBUG(D_deliver) debug_printf("DSN: Flags: 0x%x\n", r->dsn_flags);
+ /* DEBUG(D_deliver) debug_printf("DSN: Flags: 0x%x\n", r->dsn_flags); */
if (r->pno < 0 && !r->errors_to && r->dsn_flags == 0)
fprintf(fp, "%s\n", r->address);
if (r->pno < 0 && !r->errors_to && r->dsn_flags == 0)
fprintf(fp, "%s\n", r->address);
@@
-405,8
+409,6
@@
return statbuf.st_size - size_correction;
}
}
-#ifdef SUPPORT_MOVE_FROZEN_MESSAGES
-
/************************************************
* Make a hard link *
************************************************/
/************************************************
* Make a hard link *
************************************************/
@@
-488,8
+490,7
@@
return TRUE;
/* Move the files for a message (-H, -D, and msglog) from one directory (or
hierarchy) to another. It is assume that there is no -J file in existence when
/* Move the files for a message (-H, -D, and msglog) from one directory (or
hierarchy) to another. It is assume that there is no -J file in existence when
-this is done. At present, this is used only when move_frozen_messages is set,
-so compile it only when that support is configured.
+this is done.
Arguments:
id the id of the message to be delivered
Arguments:
id the id of the message to be delivered
@@
-506,6
+507,9
@@
spool_move_message(uschar *id, uschar *subdir, uschar *from, uschar *to)
{
uschar * dest_qname = queue_name_dest ? queue_name_dest : queue_name;
{
uschar * dest_qname = queue_name_dest ? queue_name_dest : queue_name;
+/* Since we are working within the spool, de-taint the dest queue name */
+dest_qname = string_copy_taint(dest_qname, FALSE);
+
/* Create any output directories that do not exist. */
(void) directory_make(spool_directory,
/* Create any output directories that do not exist. */
(void) directory_make(spool_directory,
@@
-543,7
+547,6
@@
log_write(0, LOG_MAIN, "moved from %s%s%s%sinput, %smsglog to %s%s%s%sinput, %sm
return TRUE;
}
return TRUE;
}
-#endif
/* End of spool_out.c */
/* vi: aw ai sw=2
/* End of spool_out.c */
/* vi: aw ai sw=2