masqmail

diff src/accept.c @ 109:db52c64acaa2

improved comments related to -t option
author meillo@marmaro.de
date Tue, 29 Jun 2010 11:34:53 +0200
parents 1f0d63713a1c
children c678d0342451
line diff
     1.1 --- a/src/accept.c	Tue Jun 29 11:00:33 2010 +0200
     1.2 +++ b/src/accept.c	Tue Jun 29 11:34:53 2010 +0200
     1.3 @@ -58,9 +58,12 @@
     1.4  /* accept message from anywhere.
     1.5     A locally originating message is indicated by msg->recieved_host == NULL
     1.6  
     1.7 -   If the flags ACC_DEL_RCPTS is set, recipients in the msg->rcpt_list is
     1.8 -   copied and items occuring in it will be removed from the newly constructed
     1.9 -   (from To/Cc/Bcc headers if ACC_RCPT_TO is set) rcpt_list.
    1.10 +   The -t option:
    1.11 +   The ACC_RCPT_FROM_HEAD flag adds the recipients found in To/Cc/Bcc
    1.12 +   headers to the recipients list.
    1.13 +   The ACC_DEL_RCPTS flag makes only sense if the ACC_RCPT_FROM_HEAD
    1.14 +   flag is given too. With ACC_DEL_RCPTS the recipients given on the
    1.15 +   command line are removed from the ones given in headers.
    1.16  */
    1.17  
    1.18  accept_error
    1.19 @@ -202,7 +205,7 @@
    1.20  		g_free(path);
    1.21  	}
    1.22  
    1.23 -	/* -t option */
    1.24 +	/* -t option (see comment above) */
    1.25  	if (flags & ACC_DEL_RCPTS) {
    1.26  		non_rcpt_list = msg->rcpt_list;
    1.27  		msg->rcpt_list = NULL;
    1.28 @@ -242,6 +245,7 @@
    1.29  				/* fall through */
    1.30  			case HEAD_BCC:
    1.31  				if (flags & ACC_RCPT_FROM_HEAD) {
    1.32 +					/* -t option (see comment above) */
    1.33  					DEBUG(5) debugf("hdr->value = %s\n", hdr->value);
    1.34  					if (hdr->value) {
    1.35  						msg->rcpt_list = addr_list_append_rfc822(msg->rcpt_list, hdr->value, conf.host_name);
    1.36 @@ -317,6 +321,8 @@
    1.37  		}
    1.38  
    1.39  		if (flags & ACC_DEL_RCPTS) {
    1.40 +			/* remove the recipients given on the command line from the ones given in headers
    1.41 +			   -t option (see comment above) */
    1.42  			GList *rcpt_node;
    1.43  			foreach(non_rcpt_list, rcpt_node) {
    1.44  				address *rcpt = (address *) (rcpt_node->data);