David Bromage <dbromage(_at_)metz(_dot_)une(_dot_)edu(_dot_)au> writes:
I've managed to work out a lot of things about procmail, but I'm not a
programmer so I'd be grateful of you gurus would check over these entries
for me:
# rejections ---- $PMDIR/.reject says why bulk email is a Bad Thing (tm)
:0
* ^(From|Received|Message-I).*bulk-e-mail
*!^X-Loop: dbromage(_at_)metz(_dot_)une(_dot_)edu(_dot_)au
{
:0 c
| (formail -rk ; cat $PMDIR/.reject) | $SENDMAIL -oi -t | elm -s"Abuse not app
reciated" zrs(_at_)ZRS(_dot_)NET
:0
/dev/null
}
Huh? What's the "elm" command for? You're already piping the message
into $SENDMAIL which will send the message back with the contents of
$PMDIR/.reject appende, so elm will have no input and will send an
empty message to "zrs(_at_)ZRS(_dot_)NET". If that's really what you want to do
(why?!?!), then you should, for clarity, change the action to:
| (formail -rk ; cat $PMDIR/.reject) | $SENDMAIL -oi -t; \
elm -s"Abuse not appreciated" zrs(_at_)ZRS(_dot_)NET </dev/null
Also, what's the point of the 'c' flag on that recipe when you follow
it with a recipe that always dumps to /dev/null. Seems kinda pointless
to me...
Finally, there's no point in checking for the presence of an X-Loop: header
if you never add one to outgoing mail. You should add an
-A"X-Loop: dbromage(_at_)metz(_dot_)une(_dot_)edu(_dot_)au"
argument to all the formail commands involved in sending out messages, so
that the action above should _really_ be:
| (formail -rkA"X-Loop: dbromage(_at_)metz(_dot_)une(_dot_)edu(_dot_)au" ; cat
$PMDIR/.reject) | \
$SENDMAIL -oi -t; elm -s"Abuse not appreciated" zrs(_at_)ZRS(_dot_)NET
</dev/null
Philip Guenther