On Mon, 17 Mar 2003 08:26:44 -0600, Jason Crowe
<jcrowe(_at_)midwestglove(_dot_)com> wrote:
I have my procmail filters separated into a green list, a black list, then
everything else goes through the filters (spam,virus,porn,etc). What would
like to do is move my green & black email list to MySQL. Has anyone done
this before? Are there any reasons not to do this?
Here is a section of my rc.green file that allows email in before the spam
filtering starts.
:0
*
^From:.*(@lowes.com|@wal-mart.com|@westlakehardware.com|@doitbest.com|@samsc
lub.com|@target.com|@orgill.com|@homedepot.com|@pamida.com|@mei\
jer.com|@shopko.com|@jcpenney.com|@walgreens.com|@cabelas.com|@franks.com|co
stco.com)
{
:0
$DEFAULT
}
I am afraid that this will get very unmanagable over time. I am hoping to
come away with a better idea for dealing with my green/black list.
I posted the exact same inquiry few days ago, got flamed and by some
rude disturbed individual by the name "Tony L. Svanstrom", you'd better
wear a coat, possible an RTFM flame coming your way.
Back to your question.
I read somewhere a tutorial that says do the following.
# Set the path to the executable, and shell
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr
SHELL=/usr/local/bin/bash
FORMAIL=/usr/bin/formail (or path to formail on your system)
FGREP=/usr/bin/fgrep (or path to fgrep on your system)
# Define the location of the whitelist and black list files.
whitelist=(path to the whitelist file) <==== one address /line file
blacklist= (path to the black list file) <==== One address /line file
# check against whitelist
:0
* ? ($FORMAIL -x From: -x Sender: -x Resent-From: | $FGREP -iqf
$whitelist)
${DEFAULT}
This works quite well.
But when I try similar recipe for a blacklisted body filtering.
# Check against blacklist
:0B
* ? ($FGREP -if $blacklist)
/var/log/spam/test-spam
Here is what I see when I turn log to verbose=On.
procmail: Executing "(/bin/fgrep,-if,/var/log/blacklist)"
(/bin/fgrep: (/bin/fgrep: No such file or directory
procmail: Non-zero exitcode (127) from "(/bin/fgrep"
procmail: No match on "(/bin/fgrep -if /var/log/blacklist)"
Like you, my procmailrc is now a bloated one, and despite detailed
comments, and the whitelist of form sender and resent, it is getting
very unmanageable.
I resorted to write a small PHP script that takes an input from an html
form and then writes individual recipe for each entry, not a big deal,
but it saves some time for me.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail