procmail confirmation
am 29.11.2006 16:20:37 von dkoleary
Hey;
I want to clean up some of my procmail recipies; whitelisting
emails individually is getting to be a pain in the ass. I believe I
understand what I need to do, but would like some confirmation.
I have a list of valid emails and domains contained in a file:
${HOME}/WHITELIST.
In my ~/.procmailrc, I have Wl=${HOME}/WHITELIST
and a recipie that says:
# Attempt to whitelist emails
:0:
* ? /bin/fgrep -i -f ${Wl}
${DEFAULT}
The way I understand it, the email will be piped through fgrep which
will return 0 or 1 depending on whether or not the fgrep worked. If
0 (it worked), the email will get dumped to ${DEFAULT} and no further
processing happens.
Is that correct?
Thanks for any info.
Doug
--
--------
Senior UNIX Admin
O'Leary Computer Enterprises
dkoleary@olearycomputers.com (w) 630-904-6098 (c) 630-248-2749
resume: http://www.olearycomputers.com/resume.html
Re: procmail confirmation
am 29.11.2006 17:16:19 von keeling
Doug O'Leary :
>
> I want to clean up some of my procmail recipies; whitelisting
> emails individually is getting to be a pain in the ass. I believe I
> understand what I need to do, but would like some confirmation.
>
> I have a list of valid emails and domains contained in a file:
> ${HOME}/WHITELIST.
>
> In my ~/.procmailrc, I have Wl=${HOME}/WHITELIST
>
> and a recipie that says:
>
> # Attempt to whitelist emails
> :0:
> * ? /bin/fgrep -i -f ${Wl}
> ${DEFAULT}
Should be:
> :0:
> * ? /bin/fgrep -i -f ${Wl}
> ${DEFAULT}
However, that's limited. Here's the form I use for repeat spammers:
SPUNAME = ${PMDIR}/spammers_uname.lst
:0
* $ ! (^From:.*|^TO)${LISTS}
* $ ? /usr/bin/formail -x"From" -x"From:" -x"Sender:" \
-x"Reply-To:" -x"Return-Path:" -x"To:" \
| /bin/fgrep -s -i -f ${SPUNAME}
{
LOG="Spuname --- "
:0:
${MAILDIR}/spam-mail
}
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
Spammers! http://www.spots.ab.ca/~keeling/emails.html