masqmail
changeset 102:f4719cffc48c
removed the ACC_NO_RECVD_HDR because it is never set
I do not see a reason why we should need it
author | meillo@marmaro.de |
---|---|
date | Wed, 23 Jun 2010 13:54:28 +0200 |
parents | 82416aaacd31 |
children | c85fbf7014b1 |
files | src/accept.c src/masqmail.h |
diffstat | 2 files changed, 27 insertions(+), 28 deletions(-) [+] |
line diff
1.1 --- a/src/accept.c Tue Jun 22 13:28:11 2010 +0200 1.2 +++ b/src/accept.c Wed Jun 23 13:54:28 2010 +0200 1.3 @@ -375,40 +375,40 @@ 1.4 1.5 /* Received header: */ 1.6 /* At this point because we have to know the rcpts for the 'for' part */ 1.7 - if (!(flags & ACC_NO_RECVD_HDR)) { 1.8 - gchar *for_string = NULL; 1.9 - header *hdr = NULL; 1.10 + gchar *for_string = NULL; 1.11 + header *hdr = NULL; 1.12 1.13 - DEBUG(3) debugf("adding 'Received:' header\n"); 1.14 + DEBUG(3) debugf("adding 'Received:' header\n"); 1.15 1.16 - if (g_list_length(msg->rcpt_list) == 1) { 1.17 - address *addr = (address *) (g_list_first(msg->rcpt_list)->data); 1.18 - for_string = g_strdup_printf(" for %s", addr_string(addr)); 1.19 - } 1.20 + if (g_list_length(msg->rcpt_list) == 1) { 1.21 + address *addr = (address *) (g_list_first(msg->rcpt_list)->data); 1.22 + for_string = g_strdup_printf(" for %s", addr_string(addr)); 1.23 + } 1.24 1.25 - if (msg->received_host == NULL) { 1.26 - hdr = create_header(HEAD_RECEIVED, "Received: from %s by %s with %s (%s %s) id %s%s; %s\n", 1.27 - passwd->pw_name, conf.host_name, prot_names[msg->received_prot], 1.28 - PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); 1.29 - } else { 1.30 + if (msg->received_host == NULL) { 1.31 + /* received locally */ 1.32 + hdr = create_header(HEAD_RECEIVED, "Received: from %s by %s with %s (%s %s) id %s%s; %s\n", 1.33 + passwd->pw_name, conf.host_name, prot_names[msg->received_prot], 1.34 + PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); 1.35 + } else { 1.36 + /* received from remote */ 1.37 #ifdef ENABLE_IDENT 1.38 - DEBUG(5) debugf("adding 'Received:' header (5)\n"); 1.39 - hdr = create_header(HEAD_RECEIVED, "Received: from %s (ident=%s) by %s with %s (%s %s) id %s%s; %s\n", 1.40 - msg->received_host, msg->ident ? msg->ident : "unknown", conf.host_name, 1.41 - prot_names[msg->received_prot], PACKAGE, VERSION, msg->uid, for_string ? for_string : "", 1.42 - rec_timestamp()); 1.43 + DEBUG(5) debugf("adding 'Received:' header (5)\n"); 1.44 + hdr = create_header(HEAD_RECEIVED, "Received: from %s (ident=%s) by %s with %s (%s %s) id %s%s; %s\n", 1.45 + msg->received_host, msg->ident ? msg->ident : "unknown", conf.host_name, 1.46 + prot_names[msg->received_prot], PACKAGE, VERSION, msg->uid, for_string ? for_string : "", 1.47 + rec_timestamp()); 1.48 #else 1.49 - hdr = create_header(HEAD_RECEIVED, "Received: from %s by %s with %s (%s %s) id %s%s; %s\n", 1.50 - msg->received_host, conf.host_name, prot_names[msg->received_prot], 1.51 - PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); 1.52 + hdr = create_header(HEAD_RECEIVED, "Received: from %s by %s with %s (%s %s) id %s%s; %s\n", 1.53 + msg->received_host, conf.host_name, prot_names[msg->received_prot], 1.54 + PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); 1.55 #endif 1.56 - } 1.57 - header_fold(hdr); 1.58 - msg->hdr_list = g_list_prepend(msg->hdr_list, hdr); 1.59 + } 1.60 + header_fold(hdr); 1.61 + msg->hdr_list = g_list_prepend(msg->hdr_list, hdr); 1.62 1.63 - if (for_string) 1.64 - g_free(for_string); 1.65 - } 1.66 + if (for_string) 1.67 + g_free(for_string); 1.68 1.69 /* write message to spool: */ 1.70 /* accept is no longer responsible for this
2.1 --- a/src/masqmail.h Tue Jun 22 13:28:11 2010 +0200 2.2 +++ b/src/masqmail.h Wed Jun 23 13:54:28 2010 +0200 2.3 @@ -314,7 +314,6 @@ 2.4 #define ACC_DEL_BCC 0x04 /* -t option, delete Bcc header */ 2.5 #define ACC_RCPT_FROM_HEAD 0x08 /* -t option, get rcpts from headers */ 2.6 #define ACC_NODOT_TERM 0x10 /* a dot on a line itself does not end the message (-oi option) */ 2.7 -#define ACC_NO_RECVD_HDR 0x20 /* do not create a Received: header */ 2.8 #define ACC_MAIL_FROM_HEAD 0x40 /* get return path from header */ 2.9 #define ACC_NODOT_RELAX 0x80 /* do not be picky if message ist not terminated by a dot on a line */ 2.10 #define ACC_SAVE_ENVELOPE_TO 0x0100 /* save an existent Envelope-to header as X-Orig-Envelope-to */