masqmail
diff src/accept.c @ 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 | d04fbd5ce16e |
children | 47ee3fbcecd2 |
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