From ca8074e71371266c614fc20907419ec178015421 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 16 Oct 2010 00:44:30 +0200 Subject: -vv multidrop: Also report non-Delivered-To: envelope parsing. --- transact.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'transact.c') diff --git a/transact.c b/transact.c index d29f2c12..1b4e3755 100644 --- a/transact.c +++ b/transact.c @@ -1088,20 +1088,25 @@ process_headers: free(sdps_envto); } else #endif /* SDPS_ENABLE */ - if (env_offs > -1) /* We have the actual envelope addressee */ - find_server_names(msgblk.headers + env_offs, ctl, &msgblk.recipients); + if (env_offs > -1) { /* We have the actual envelope addressee */ + if (outlevel >= O_DEBUG) { + const char *tmps = msgblk.headers + env_offs; + size_t l = strcspn(tmps, "\r\n"); + report(stdout, GT_("Parsing envelope \"%s\" names \"%-.*s\"\n"), ctl->server.envelope, UCAST_TO_INT(l), tmps); + } + find_server_names(msgblk.headers + env_offs, ctl, &msgblk.recipients); + } else if (delivered_to && ctl->server.envelope != STRING_DISABLED && - ctl->server.envelope && !strcasecmp(ctl->server.envelope, "Delivered-To")) - { - if (outlevel >= O_DEBUG) { - const char *tmps = delivered_to + 2 + strlen(ctl->server.envelope); - size_t l = strcspn(tmps, "\r\n"); - report(stdout, GT_("Parsing envelope \"%s\" names \"%-.*s\"\n"), ctl->server.envelope, UCAST_TO_INT(l), tmps); - } + ctl->server.envelope && !strcasecmp(ctl->server.envelope, "Delivered-To")) + { + if (outlevel >= O_DEBUG) { + const char *tmps = delivered_to + 2 + strlen(ctl->server.envelope); + size_t l = strcspn(tmps, "\r\n"); + report(stdout, GT_("Parsing envelope \"%s\" names \"%-.*s\"\n"), ctl->server.envelope, UCAST_TO_INT(l), tmps); + } 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 -- cgit v1.2.3