diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-10-12 10:40:13 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-10-12 10:45:19 +0200 |
commit | 50d432f8b45bd284b1c36ae1bef333d71a2c457f (patch) | |
tree | 1bb793de03ee0caae1a0fb1084b672f2bcb9f905 /transact.c | |
parent | 7c7a17f14b9bb34240ed15e3a9ef9a56f1acbcfc (diff) | |
download | fetchmail-50d432f8b45bd284b1c36ae1bef333d71a2c457f.tar.gz fetchmail-50d432f8b45bd284b1c36ae1bef333d71a2c457f.tar.bz2 fetchmail-50d432f8b45bd284b1c36ae1bef333d71a2c457f.zip |
Enhance verbose logging in multidrop header parsing.
Diffstat (limited to 'transact.c')
-rw-r--r-- | transact.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1087,10 +1087,12 @@ process_headers: else if (delivered_to && ctl->server.envelope != STRING_DISABLED && ctl->server.envelope && !strcasecmp(ctl->server.envelope, "Delivered-To")) { + if (outlevel >= O_DEBUG) + report(stdout, GT_("Parsing envelope \"%s\" names \"%-.*s\"\n"), ctl->server.envelope, strcspn(delivered_to+2+strlen(ctl->server.envelope), "\r\n"), delivered_to+2+strlen(ctl->server.envelope)); find_server_names(delivered_to, ctl, &msgblk.recipients); xfree(delivered_to); } - else if (received_for) + else if (received_for) { /* * We have the Received for addressee. * It has to be a mailserver address, or we @@ -1098,9 +1100,10 @@ process_headers: * We use find_server_names() to let local * hostnames go through. */ + if (outlevel >= O_DEBUG) + report(stdout, GT_("Parsing Received names \"%-.*s\"\n"), strcspn(received_for+2, "\r\n"), received_for+2); find_server_names(received_for, ctl, &msgblk.recipients); - else - { + } else { /* * We haven't extracted the envelope address. * So check all the "Resent-To" header addresses if @@ -1108,6 +1111,8 @@ process_headers: * the "To" addresses. */ register struct addrblk *nextptr; + if (outlevel >= O_DEBUG) + report(stdout, GT_("No envelope recipient found, resorting to header guessing.\n")); if (resent_to_addrchain) { /* delete the "To" chain and substitute it * with the "Resent-To" list @@ -1122,6 +1127,9 @@ process_headers: } /* now look for remaining adresses */ while (to_addrchain) { + if (outlevel >= O_DEBUG) + report(stdout, GT_("Guessing from header \"%-.*s\".\n"), strcspn(msgblk.headers+to_addrchain->offset, "\r\n"), msgblk.headers+to_addrchain->offset); + find_server_names(msgblk.headers+to_addrchain->offset, ctl, &msgblk.recipients); nextptr = to_addrchain->next; free(to_addrchain); |