Mercurial > 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 wrap: on
line diff
--- a/src/masqmail.c Fri Dec 03 19:35:34 2010 -0300 +++ b/src/masqmail.c Fri Dec 03 21:05:34 2010 -0300 @@ -223,9 +223,18 @@ DEBUG(5) debugf("accepting message on stdin\n"); msg->received_prot = PROT_LOCAL; + + /* warn if -t option and cmdline addr args */ + if (addr_cnt && (accept_flags & ACC_RCPT_FROM_HEAD)) { + logwrite(LOG_ALERT, "command line address arguments are now *added* to the mail header\\\n"); + logwrite(LOG_ALERT, " recipient addresses (instead of substracted) when -t is given.\\\n"); + logwrite(LOG_ALERT, " this changed with version 0.3.1\n"); + } + for (i = 0; i < addr_cnt; i++) { if (addresses[i][0] == '|') { logwrite(LOG_ALERT, "no pipe allowed as recipient address: %s\n", addresses[i]); + /* should we better ignore this one addr? */ exit(1); } msg->rcpt_list = g_list_append(msg->rcpt_list, create_address_qualified(addresses[i], TRUE, conf.host_name));