I provide email forwarding for about 100 friends and friends-of-friends
and am currently moving things to a new server to put online next month (I
push maybe 3500 emails/day through the system).

Currently, I have a procmail rule that reads in a text file of
"whitelisted" and "blacklisted" addresses and either forwards them before
SA filters them or in the case of a blacklist, dumps them to /dev/null.

The contents of these files are based on entries users make in a simple
web interface and then the middleware creates a text file of the addys.
However, it'd be cool to use the built in whitelist/blacklist features of
SA instead of this outside check.  Where I'm falling down us easy
command-line calls to display the contents of the black/white lists as
well as remove blacklist addys (since there are command-line arguments to
add/remove whitelist entries).

This system is still being set up, so I can change easily.

---

Basicly, what I'm doing current is using a systemwide aliases file to call
procmail once postfix takes care of processing the email and handling it
off for local delivery, like this for an example user named "ribbit".

/etc/aliases
ribbit:         "|/usr/bin/procmail -m /var/virtualusers/procmailrc ribbit [EMAIL 
PROTECTED]"

and then the /var/virtualusers/procmailrc is as follows

# set up some variables
WHITELIST=/var/virtualusers/$1.whitelist
BLACKLIST=/var/virtualusers/$1.blacklist
#
# Check against Whitelist
#
:0
* ? formail -x"From" -x"From:" -x"Sender:"\
        | fgrep -is -f $WHITELIST
! $2
#
# Check against Blacklist
#
:0
* ? formail -x"From" -x"From:" -x"Sender:"\
        | fgrep -is -f $BLACKLIST
/dev/null

# Pipe remaining email to spamc if under 256k
:0fw
* < 256000

        | /usr/bin/spamc -f -u $1

        :0e
        {
                EXITCODE=$?
        }
# Forward post-processed remaining email on to the forward address
:0
        {
                :0
                ! $2
        }

---

Essentially, the contents of $WHITELIST and $BLACKLIST are just a text
file with one address per line to check against.

I don't claim this is the "best" way, or even a "good" way and certainly
isn't efficient, but I'm not an very good admin and an even worse
programmer, so making it work for my 100 or so users that I forward email
for is the primary goal.  The new box is a 2.4GHz Intel with 1.5GB of
ram, so efficiency isn't that important; the current is a dual 1GHz with
1GB and it's handling this miniscule load just fine.

Please me gentle to me in your replies :-)



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to