I'm trying to get sendmail (8.7 on Linux) to reject spam identified by
scanning headers. The check_* rulesets on sendmail.org don't (for example)
allow rejecting based on To: (e.g., 'friend') or Received: lines, which
I'd like to take into consideration.
I've been searching sendmail and procmail docs, the bat book, etc., but
haven't found some key info:
- I've had sendmail pass incoming mail to my script and I see that I can
emit text and set a non-zero exit code to reject mail. I have been unable
to find documentation on the MDA interaction, e.g. what exit codes mean
what to sendmail. So far I know that 'exit 1' gets me 'unknown mailer
error 1', but it seems there MUST be better codes. Hmm, I'll try just text
with zero exit code and see what happens. Surely this is documented
- procmail looks like a nice header scanner, with the valuable ability to
deliver acceptable mail to the right mailbox, but I don't see how to
reject mail (e.g. return text and/or the non-zero exit code, if I just
knew what number to return...).
It looks like an ideal would be procmail recipes to recognize spam, e.g.
and return non-zero exit code to sendmail. If no recipes match, procmail
falls off the end and delivers to the regular destination.
I really don't want to generate a reply, most of those would just clutter
up my queue for 5 days then die undelivered (from what I've been seeing
Digging through the anti-spam sites, I haven't seen the answer. Thanks in
advance to anybody who can supply or point me to it. Meanwhile, at least I
can work on the procmail recipes and trash the junk to /dev/null!
mac at casteel.nospam.org
Legitimate email, remove nospam. Spammers most unwelcome.