masqmail
diff src/masqmail.c @ 276:1abc1faeb45d
for -t cmdline args are now added to the rcpt list instead of substracted
Please read the diff and the section about -t in man/masqmail.8.
Masqmail's behavior had been like the one of exim/smail, now it's
similar to postfix.
Masqmail does it now the most simple way, regarding the code.
Also, addr args are always recipients, -t does not change their meaning.
-t makes the addrs from rcpt hdrs, rcpt addrs too.
It would have been logical too, to ignore the cmdline args,
in the sense of ``headers *instead of* args'' but none of the
popular MTAs does it that way and it would have been a bit more
complicated in the code.
Anyway, this is a corner-case that should better be avoided completely.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Fri, 03 Dec 2010 21:05:34 -0300 |
parents | 7b12d081b939 |
children | c35c59a36a2a |
line diff
1.1 --- a/src/masqmail.c Fri Dec 03 19:35:34 2010 -0300 1.2 +++ b/src/masqmail.c Fri Dec 03 21:05:34 2010 -0300 1.3 @@ -223,9 +223,18 @@ 1.4 DEBUG(5) debugf("accepting message on stdin\n"); 1.5 1.6 msg->received_prot = PROT_LOCAL; 1.7 + 1.8 + /* warn if -t option and cmdline addr args */ 1.9 + if (addr_cnt && (accept_flags & ACC_RCPT_FROM_HEAD)) { 1.10 + logwrite(LOG_ALERT, "command line address arguments are now *added* to the mail header\\\n"); 1.11 + logwrite(LOG_ALERT, " recipient addresses (instead of substracted) when -t is given.\\\n"); 1.12 + logwrite(LOG_ALERT, " this changed with version 0.3.1\n"); 1.13 + } 1.14 + 1.15 for (i = 0; i < addr_cnt; i++) { 1.16 if (addresses[i][0] == '|') { 1.17 logwrite(LOG_ALERT, "no pipe allowed as recipient address: %s\n", addresses[i]); 1.18 + /* should we better ignore this one addr? */ 1.19 exit(1); 1.20 } 1.21 msg->rcpt_list = g_list_append(msg->rcpt_list, create_address_qualified(addresses[i], TRUE, conf.host_name));