Mark asekd,
| Any ideas why this code fragment sends all messages to the bit bucket
| instead of auto-replying?
|
| | (formail -brtD 128 /tmp/everybody.cache -A"X-Loop: EveryBodyTrap" ;\
| echo "Your message to the mailing list was rejected." ;\
| echo "You are NOT authorized to send to this list." ;\
| ) | $SENDMAIL -oi -t
formail -D does not produce any standard output unless it is used while
splitting (that is, in conjunction with formail's -s option).
This might work (untested, so emphasis is on "might"):
| (formail -brtD 128 /tmp/everybody.cache -A"X-Loop: EveryBodyTrap" -s ;\
echo "Your message to the mailing list was rejected." ;\
echo "You are NOT authorized to send to this list." ;\
) | $SENDMAIL -oi -t
but if the address *is* a duplicate, you're still feeding the body text to
$SENDMAIL as its only input. Better, I should think,
:0 flags
* conditions you already have, including, I trust,
* ! ^X-Loop: EveryBodyTrap
* ! ? formail -rD 128 /tmp/everybody.cache
| (formail -rt -A"X-Loop: EveryBodyTrap" ;\
echo "Your message to the mailing list was rejected." ;\
echo "You are NOT authorized to send to this list." ;\
) | $SENDMAIL -t
Notes:
1. Since you know that the body will not have any lone periods, -oi is
unnecessary.
2. If -r, -x, or -X is present, formail will drop the body, so -b does
nothing, unless -k is also present to make formail keep the body. If -k
preserves the body despite -r, -x, or -X, then -b will prevent the column
of citation characters.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail