# HG changeset patch # User meillo@marmaro.de # Date 1277294068 -7200 # Node ID f4719cffc48c2bb9441aa096cc4a5dd4e9bc9604 # Parent 82416aaacd3103df7b680d3a638d1f5378aa846b removed the ACC_NO_RECVD_HDR because it is never set I do not see a reason why we should need it diff -r 82416aaacd31 -r f4719cffc48c src/accept.c --- a/src/accept.c Tue Jun 22 13:28:11 2010 +0200 +++ b/src/accept.c Wed Jun 23 13:54:28 2010 +0200 @@ -375,40 +375,40 @@ /* Received header: */ /* At this point because we have to know the rcpts for the 'for' part */ - if (!(flags & ACC_NO_RECVD_HDR)) { - gchar *for_string = NULL; - header *hdr = NULL; + gchar *for_string = NULL; + header *hdr = NULL; - DEBUG(3) debugf("adding 'Received:' header\n"); + DEBUG(3) debugf("adding 'Received:' header\n"); - if (g_list_length(msg->rcpt_list) == 1) { - address *addr = (address *) (g_list_first(msg->rcpt_list)->data); - for_string = g_strdup_printf(" for %s", addr_string(addr)); - } + if (g_list_length(msg->rcpt_list) == 1) { + address *addr = (address *) (g_list_first(msg->rcpt_list)->data); + for_string = g_strdup_printf(" for %s", addr_string(addr)); + } - if (msg->received_host == NULL) { - hdr = create_header(HEAD_RECEIVED, "Received: from %s by %s with %s (%s %s) id %s%s; %s\n", - passwd->pw_name, conf.host_name, prot_names[msg->received_prot], - PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); - } else { + if (msg->received_host == NULL) { + /* received locally */ + hdr = create_header(HEAD_RECEIVED, "Received: from %s by %s with %s (%s %s) id %s%s; %s\n", + passwd->pw_name, conf.host_name, prot_names[msg->received_prot], + PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); + } else { + /* received from remote */ #ifdef ENABLE_IDENT - DEBUG(5) debugf("adding 'Received:' header (5)\n"); - hdr = create_header(HEAD_RECEIVED, "Received: from %s (ident=%s) by %s with %s (%s %s) id %s%s; %s\n", - msg->received_host, msg->ident ? msg->ident : "unknown", conf.host_name, - prot_names[msg->received_prot], PACKAGE, VERSION, msg->uid, for_string ? for_string : "", - rec_timestamp()); + DEBUG(5) debugf("adding 'Received:' header (5)\n"); + hdr = create_header(HEAD_RECEIVED, "Received: from %s (ident=%s) by %s with %s (%s %s) id %s%s; %s\n", + msg->received_host, msg->ident ? msg->ident : "unknown", conf.host_name, + prot_names[msg->received_prot], PACKAGE, VERSION, msg->uid, for_string ? for_string : "", + rec_timestamp()); #else - hdr = create_header(HEAD_RECEIVED, "Received: from %s by %s with %s (%s %s) id %s%s; %s\n", - msg->received_host, conf.host_name, prot_names[msg->received_prot], - PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); + hdr = create_header(HEAD_RECEIVED, "Received: from %s by %s with %s (%s %s) id %s%s; %s\n", + msg->received_host, conf.host_name, prot_names[msg->received_prot], + PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); #endif - } - header_fold(hdr); - msg->hdr_list = g_list_prepend(msg->hdr_list, hdr); + } + header_fold(hdr); + msg->hdr_list = g_list_prepend(msg->hdr_list, hdr); - if (for_string) - g_free(for_string); - } + if (for_string) + g_free(for_string); /* write message to spool: */ /* accept is no longer responsible for this diff -r 82416aaacd31 -r f4719cffc48c src/masqmail.h --- a/src/masqmail.h Tue Jun 22 13:28:11 2010 +0200 +++ b/src/masqmail.h Wed Jun 23 13:54:28 2010 +0200 @@ -314,7 +314,6 @@ #define ACC_DEL_BCC 0x04 /* -t option, delete Bcc header */ #define ACC_RCPT_FROM_HEAD 0x08 /* -t option, get rcpts from headers */ #define ACC_NODOT_TERM 0x10 /* a dot on a line itself does not end the message (-oi option) */ -#define ACC_NO_RECVD_HDR 0x20 /* do not create a Received: header */ #define ACC_MAIL_FROM_HEAD 0x40 /* get return path from header */ #define ACC_NODOT_RELAX 0x80 /* do not be picky if message ist not terminated by a dot on a line */ #define ACC_SAVE_ENVELOPE_TO 0x0100 /* save an existent Envelope-to header as X-Orig-Envelope-to */