summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-12-16 16:33:32 +0000
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2018-12-18 14:59:37 +0100
commit569a8b23aa46c3d5cabdcd1540cd4c590d592f80 (patch)
tree7100dbab57c4042cc78aeff5b9aa5388ac9da5c1 /src
parent22d6c944c489adf9e13daa05991c5a92545a9750 (diff)
Log failures to extract envelope addresses from message headers. Bug 2351
(cherry picked from commit 60c02b350a7d325e64ae0a656cfd37a9fbd162a7)
Diffstat (limited to 'src')
-rw-r--r--src/src/receive.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/src/receive.c b/src/src/receive.c
index 93b350a65..6d54ad33c 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -3244,16 +3244,16 @@ if (extract_recip && (bad_addresses || recipients_count == 0))
if (recipients_count == 0) debug_printf("*** No recipients\n");
if (bad_addresses)
{
- error_block *eblock = bad_addresses;
+ error_block * eblock;
debug_printf("*** Bad address(es)\n");
- while (eblock != NULL)
- {
+ for (eblock = bad_addresses; eblock; eblock = eblock->next)
debug_printf(" %s: %s\n", eblock->text1, eblock->text2);
- eblock = eblock->next;
- }
}
}
+ log_write(0, LOG_MAIN|LOG_PANIC, "%s %s found in headers",
+ message_id, bad_addresses ? "bad addresses" : "no recipients");
+
fseek(spool_data_file, (long int)SPOOL_DATA_START_OFFSET, SEEK_SET);
/* If configured to send errors to the sender, but this fails, force
@@ -3265,11 +3265,12 @@ if (extract_recip && (bad_addresses || recipients_count == 0))
if (error_handling == ERRORS_SENDER)
{
if (!moan_to_sender(
- (bad_addresses == NULL)?
- (extracted_ignored? ERRMESS_IGADDRESS : ERRMESS_NOADDRESS) :
- (recipients_list == NULL)? ERRMESS_BADNOADDRESS : ERRMESS_BADADDRESS,
- bad_addresses, header_list, spool_data_file, FALSE))
- error_rc = (bad_addresses == NULL)? EXIT_NORECIPIENTS : EXIT_FAILURE;
+ bad_addresses
+ ? recipients_list ? ERRMESS_BADADDRESS : ERRMESS_BADNOADDRESS
+ : extracted_ignored ? ERRMESS_IGADDRESS : ERRMESS_NOADDRESS,
+ bad_addresses, header_list, spool_data_file, FALSE
+ ) )
+ error_rc = bad_addresses ? EXIT_FAILURE : EXIT_NORECIPIENTS;
}
else
{