Mercurial > masqmail-0.2
changeset 109:db52c64acaa2
improved comments related to -t option
author | meillo@marmaro.de |
---|---|
date | Tue, 29 Jun 2010 11:34:53 +0200 (2010-06-29) |
parents | 46f407c0727a |
children | c678d0342451 |
files | src/accept.c src/masqmail.h |
diffstat | 2 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/accept.c Tue Jun 29 11:00:33 2010 +0200 +++ b/src/accept.c Tue Jun 29 11:34:53 2010 +0200 @@ -58,9 +58,12 @@ /* accept message from anywhere. A locally originating message is indicated by msg->recieved_host == NULL - If the flags ACC_DEL_RCPTS is set, recipients in the msg->rcpt_list is - copied and items occuring in it will be removed from the newly constructed - (from To/Cc/Bcc headers if ACC_RCPT_TO is set) rcpt_list. + The -t option: + The ACC_RCPT_FROM_HEAD flag adds the recipients found in To/Cc/Bcc + headers to the recipients list. + The ACC_DEL_RCPTS flag makes only sense if the ACC_RCPT_FROM_HEAD + flag is given too. With ACC_DEL_RCPTS the recipients given on the + command line are removed from the ones given in headers. */ accept_error @@ -202,7 +205,7 @@ g_free(path); } - /* -t option */ + /* -t option (see comment above) */ if (flags & ACC_DEL_RCPTS) { non_rcpt_list = msg->rcpt_list; msg->rcpt_list = NULL; @@ -242,6 +245,7 @@ /* fall through */ case HEAD_BCC: if (flags & ACC_RCPT_FROM_HEAD) { + /* -t option (see comment above) */ DEBUG(5) debugf("hdr->value = %s\n", hdr->value); if (hdr->value) { msg->rcpt_list = addr_list_append_rfc822(msg->rcpt_list, hdr->value, conf.host_name); @@ -317,6 +321,8 @@ } if (flags & ACC_DEL_RCPTS) { + /* remove the recipients given on the command line from the ones given in headers + -t option (see comment above) */ GList *rcpt_node; foreach(non_rcpt_list, rcpt_node) { address *rcpt = (address *) (rcpt_node->data);
--- a/src/masqmail.h Tue Jun 29 11:00:33 2010 +0200 +++ b/src/masqmail.h Tue Jun 29 11:34:53 2010 +0200 @@ -308,8 +308,7 @@ } msgout_perhost; /* flags for accept() */ -/*#define ACC_LOCAL 0x01 (we better use received_host == NULL) */ -#define ACC_DEL_RCPTS 0x02 /* -t option, delete rcpts */ +#define ACC_DEL_RCPTS 0x02 /* -t option, delete rcpts that were given as cmd args */ #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_MAIL_FROM_HEAD 0x40 /* get return path from header */