X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/cd19f9a79c20f9c0c9d650a8aa21d9cc54a66620..4687a69c269ee3f2a7f0625e0147a503fd9d3d0b:/src/src/moan.c diff --git a/src/src/moan.c b/src/src/moan.c index a3c8e0aba..641540839 100644 --- a/src/src/moan.c +++ b/src/src/moan.c @@ -30,8 +30,9 @@ Returns: nothing void moan_write_from(FILE *f) { -uschar * s = expand_string(dsn_from); -if (!s) +uschar * s; +GET_OPTION("dsn_from"); +if (!(s = expand_string(dsn_from))) { log_write(0, LOG_MAIN|LOG_PANIC, "Failed to expand dsn_from (using default): %s", expand_string_message); @@ -175,6 +176,7 @@ uschar * s, * s2; /* For DMARC if there is a specific sender set, expand the variable for the header From: and grab the address from that for the envelope FROM. */ +GET_OPTION("dmarc_forensic_sender"); if ( ident == ERRMESS_DMARC_FORENSIC && dmarc_forensic_sender && (s = expand_string(dmarc_forensic_sender)) @@ -513,9 +515,12 @@ if (check_sender && message_file && f.trusted_caller && { uschar *new_sender = NULL; if (regex_match_and_setup(regex_From, big_buffer, 0, -1)) + { + GET_OPTION("uucp_from_sender"); new_sender = expand_string(uucp_from_sender); + } if (new_sender) sender_address = new_sender; - else firstline = big_buffer; + else firstline = big_buffer; } /* If viable sender address, send a message */ @@ -757,13 +762,12 @@ llen = domain++ - recipient; while ((item = string_nextinlist(&listptr, &sep, NULL, 0))) { - const uschar *newaddress = item; - const uschar *pattern = string_dequote(&newaddress); + const uschar * newaddress = item; + const uschar * pattern = string_dequote(&newaddress); /* If no new address found, just skip this item. */ - while (isspace(*newaddress)) newaddress++; - if (*newaddress == 0) continue; + if (!Uskip_whitespace(&newaddress)) continue; /* We now have an item to match as an address in item, and the additional address in newaddress. If the pattern matches, expand the new address string