Mercurial > masqmail
comparison 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 |
comparison
equal
deleted
inserted
replaced
275:1405012509e3 | 276:1abc1faeb45d |
---|---|
221 } | 221 } |
222 | 222 |
223 DEBUG(5) debugf("accepting message on stdin\n"); | 223 DEBUG(5) debugf("accepting message on stdin\n"); |
224 | 224 |
225 msg->received_prot = PROT_LOCAL; | 225 msg->received_prot = PROT_LOCAL; |
226 | |
227 /* warn if -t option and cmdline addr args */ | |
228 if (addr_cnt && (accept_flags & ACC_RCPT_FROM_HEAD)) { | |
229 logwrite(LOG_ALERT, "command line address arguments are now *added* to the mail header\\\n"); | |
230 logwrite(LOG_ALERT, " recipient addresses (instead of substracted) when -t is given.\\\n"); | |
231 logwrite(LOG_ALERT, " this changed with version 0.3.1\n"); | |
232 } | |
233 | |
226 for (i = 0; i < addr_cnt; i++) { | 234 for (i = 0; i < addr_cnt; i++) { |
227 if (addresses[i][0] == '|') { | 235 if (addresses[i][0] == '|') { |
228 logwrite(LOG_ALERT, "no pipe allowed as recipient address: %s\n", addresses[i]); | 236 logwrite(LOG_ALERT, "no pipe allowed as recipient address: %s\n", addresses[i]); |
237 /* should we better ignore this one addr? */ | |
229 exit(1); | 238 exit(1); |
230 } | 239 } |
231 msg->rcpt_list = g_list_append(msg->rcpt_list, create_address_qualified(addresses[i], TRUE, conf.host_name)); | 240 msg->rcpt_list = g_list_append(msg->rcpt_list, create_address_qualified(addresses[i], TRUE, conf.host_name)); |
232 } | 241 } |
233 | 242 |