-if (is_tainted(val)) putc('-', fp);
-fprintf(fp, "-%s %s\n", name, val);
+putc('-', fp);
+if (is_tainted(val))
+ {
+ const uschar * quoter_name;
+ putc('-', fp);
+ (void) quoter_for_address(val, "er_name);
+ if (quoter_name)
+ fprintf(fp, "(%s)", quoter_name);
+ }
+fprintf(fp, "%s %s\n", name, val);
where SW_RECEIVING, SW_DELIVERING, or SW_MODIFYING
errmsg where to put an error message; if NULL, panic-die on error
where SW_RECEIVING, SW_DELIVERING, or SW_MODIFYING
errmsg where to put an error message; if NULL, panic-die on error
-
-tname = spool_fname(US"input", message_subdir, US"hdr.", message_id);
+uschar * tname = spool_fname(US"input", message_subdir, US"hdr.", message_id);
if ((fd = spool_open_temp(tname)) < 0)
return spool_write_error(where, errmsg, US"open", NULL, NULL);
if ((fd = spool_open_temp(tname)) < 0)
return spool_write_error(where, errmsg, US"open", NULL, NULL);
fprintf(fp, "%d %d\n", (int)received_time.tv_sec, warning_count);
fprintf(fp, "-received_time_usec .%06d\n", (int)received_time.tv_usec);
fprintf(fp, "%d %d\n", (int)received_time.tv_sec, warning_count);
fprintf(fp, "-received_time_usec .%06d\n", (int)received_time.tv_usec);
/* If there is information about a sending host, remember it. The HELO
data can be set for local SMTP as well as remote. */
/* If there is information about a sending host, remember it. The HELO
data can be set for local SMTP as well as remote. */
- fprintf(fp, "-host_address %s.%d\n", sender_host_address, sender_host_port);
+ fprintf(fp, "-host_address [%s]:%d\n", sender_host_address, sender_host_port);
+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 */
if (interface_address)
{
if (is_tainted(interface_address)) putc('-', fp);
/* Also about the interface a message came in on */
if (interface_address)
{
if (is_tainted(interface_address)) putc('-', fp);
- fprintf(fp, "-interface_address %s.%d\n", interface_address, interface_port);
+ fprintf(fp, "-interface_address [%s]:%d\n", interface_address, interface_port);
if (f.spool_file_wireformat)
fprintf(fp, "-spool_file_wireformat\n");
else
if (f.spool_file_wireformat)
fprintf(fp, "-spool_file_wireformat\n");
else
if (authenticated_id)
spool_var_write(fp, US"auth_id", authenticated_id);
if (authenticated_sender)
if (authenticated_id)
spool_var_write(fp, US"auth_id", authenticated_id);
if (authenticated_sender)
if (f.allow_unqualified_recipient) fprintf(fp, "-allow_unqualified_recipient\n");
if (f.allow_unqualified_sender) fprintf(fp, "-allow_unqualified_sender\n");
if (f.allow_unqualified_recipient) fprintf(fp, "-allow_unqualified_recipient\n");
if (f.allow_unqualified_sender) fprintf(fp, "-allow_unqualified_sender\n");
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);
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);
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);
/* DEBUG(D_deliver) debug_printf("DSN: Flags: 0x%x\n", r->dsn_flags); */
if (r->pno < 0 && !r->errors_to && r->dsn_flags == 0)
/* DEBUG(D_deliver) debug_printf("DSN: Flags: 0x%x\n", r->dsn_flags); */
if (r->pno < 0 && !r->errors_to && r->dsn_flags == 0)
/* for DSN SUPPORT extend exim 4 spool in a compatible way by
adding new values upfront and add flag 0x02 */
/* for DSN SUPPORT extend exim 4 spool in a compatible way by
adding new values upfront and add flag 0x02 */
- fprintf(fp, "%s %s %d,%d %s %d,%d#3\n", r->address, orcpt, Ustrlen(orcpt),
+ fprintf(fp, "%s %s %d,%d %s %d,%d#3\n", address, orcpt, Ustrlen(orcpt),
r->dsn_flags, errors_to, Ustrlen(errors_to), r->pno);
}
r->dsn_flags, errors_to, Ustrlen(errors_to), r->pno);
}
-make_link(uschar *dir, uschar * dq, uschar *subdir, uschar *id, uschar *suffix,
- uschar *from, uschar *to, BOOL noentok)
+make_link(const uschar * dir, const uschar * dq, const uschar * subdir, const uschar * id,
+ const uschar * suffix, const uschar * from, const uschar * to, BOOL noentok)
{
uschar * fname = spool_fname(string_sprintf("%s%s", from, dir), subdir, id, suffix);
uschar * tname = spool_q_fname(string_sprintf("%s%s", to, dir), dq, subdir, id, suffix);
{
uschar * fname = spool_fname(string_sprintf("%s%s", from, dir), subdir, id, suffix);
uschar * tname = spool_q_fname(string_sprintf("%s%s", to, dir), dq, subdir, id, suffix);
-break_link(uschar *dir, uschar *subdir, uschar *id, uschar *suffix, uschar *from,
- BOOL noentok)
+break_link(const uschar * dir, const uschar * subdir, const uschar * id,
+ const uschar * suffix, const uschar * from, BOOL noentok)
{
uschar * fname = spool_fname(string_sprintf("%s%s", from, dir), subdir, id, suffix);
if (Uunlink(fname) < 0 && (!noentok || errno != ENOENT))
{
uschar * fname = spool_fname(string_sprintf("%s%s", from, dir), subdir, id, suffix);
if (Uunlink(fname) < 0 && (!noentok || errno != ENOENT))
-spool_move_message(uschar *id, uschar *subdir, uschar *from, uschar *to)
+spool_move_message(const uschar * id, const uschar * subdir,
+ const uschar * from, const uschar * to)
/* 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,