Seeker
EDITED this post with the correct method using delprop
> I see how to add an address but how do you remove an address?
Say your initial config command was
db spamassassin setprop wbl.global *@*vonage.com White *domain2.com White *domain3.com Black *@domain2.com White harry@badsite.com Black fred@goodsite.com White
(all on one line)
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
Then to remove fred@goodsite.com White list entry the command is
db spamassassin delprop wbl.global fred@goodsite.com White
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
Until a panel is available another way to add entries is using a small script to make alterations easier and avoid mistyping
mkdir -p /opt/scripts (or your preferred location)
cd /opt/scripts
pico -w wblist
(type in the following and save)
db spamassassin setprop wbl.global *@*vonage.com White *domain2.com White *domain3.com Black *@domain2.com White harry@badsite.com Black fred@goodsite.com White
(all on one line)
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
Be careful, when entering the above db command, that all entries are on the one line, you may need to edit the file after you first save it to get it formatted correctly. To prevent line wrapping use
pico -w wblist
Ctrl o to save
Ctrl x to exit
chmod u+x wblist
Then run the script to configure your white and black entries
cd /opt/scripts
./wblist
or
. /opt/scripts/wblist
Check the entries in the db are correct
db spamassassin show
In future when you need to add white or black entries, check the current entries using
db spamassassin show
edit wblist as necessary adding extra entries, and then save & run the script.
As entries added this way are additive, then you can only delete them using the delprop switch either individually or collectively
eg issue the command
db spamassassin delprop wbl.global fred@goodsite.com White
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
OR
db spamassassin delprop wbl.global *@*vonage.com White *domain2.com White *domain3.com Black *@domain2.com White harry@badsite.com Black fred@goodsite.com White
(all on one line)
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
at the command prompt type
db
to show usage syntax