I wrote a short shell script that does the trick for me. It assumes that there is a
file, local.cf.top that has all the config info from the normal local.cf file,
everything except the white or blacklist info, and a file local.cf.names that contains
all the whitelist and blacklist lines.
Run whitelist <domain-or-address-to-whitelist> and it takes care of the whole thing,
including restarting spamd. I have a similar script for blacklisting, but I'm sure
you can figure out how to make the change.
Comments from y'all?
===================================================
#!/bin/sh
# This script adds a domain name to the white or black list
# file located in /etc/mail/spamassassin/local.cf.names
# What we want is to append "whitelist_from \t $1" to local.cf.names
# and then re-create the local.cf file from local.cf.top + local.cf.names.
cd /etc/mail/spamassassin
if [ "x$1" == "x" ]
then
echo "Please enter the domain name to whitelist!"
exit 1
fi
echo -e "Appending whitelist_from\t$1 to local.cf.names..."
echo -e "whitelist_from\t\t$1" >> local.cf.names
cat local.cf > local.cf.saved
sort -u local.cf.names > local.cf.names.sorted
cat local.cf.top > local.cf
cat local.cf.names.sorted >> local.cf
service spamd restart
========================================================
-Michael
>>> O-Zone <[EMAIL PROTECTED]> 09/17/03 10:15AM >>>
Hi all,
i need to add an address to spamassassin whitelist. Where ?
Tnx. Oz
--
------
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk