Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: idyll on March 18, 2006, 10:10:46 PM
-
I need to enter my whitelists from a previous 6.0.1 installation.
What is the path on the 7.0 PR 1?
thanks
regards,
patrick
-
idyll
/home/e-smith/db/spamassassin
-
Ray...thanks.
it seems /etc/mail/spamassassin is where the whitelist.cf should reside.
There is a reference to this list in the link you provided, but not a list, per say.
regards,
patrick
-
idyll
>.... but not a list, per say.
If there was a server manager panel for the white list entries (which there is not at present) then the whitelist entries would go into the spamassassin db.
See below for the format.
You need to put them there manually, either directly editing the spamassassin db or by using the db.... command.
When you expand templates and restart spamassassin it will read the data into /etc/mail/spamassassin/local.cf
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
There are templates in /etc/e-smith/templates/etc/mail/spamassassin/local.cf that relate to this.
# DO NOT MODIFY THIS FILE.
# This file is automatically maintained by the Mitel Networks SME Server
# configuration software. Manually editing this file may put your
# system in an unknown state.
#
# updated: Sun Mar 19 10:23:09 2006
wbl.global=list|*domain.com.au|White|footytips@triumph.com.au|Black
I tried the above just now on a sme7 test server and the white/black list functionality is working.
-
I hand edited the db file and hope a contrib finds its way into the mix as inserting this many addresses is problematic.
I appreciate the pointers. Thanks.
regards,
patrick
-
Ray,
That's good information, but I'm missing one thing. How do I add using the db commands. I don't know the keys.
db spamassassin set key type [prop1 val1] [prop2 val2] ...
Do you have an example to get me started? Thanks.
-
Is it like this:
db spamassassin set wbl.global list *somedomain.com white
then;
# db spamassassin show
wbl.global=list
*somedomain.com=white
wbl.global_to=list
I tried this and expanded the template, but it did not make an entry to /etc/mail/spamassassin/local.cf That's probably best if I got the formatting messed up.
-
My apologies,
It's late and I'm tired. The proper method seems to be:
db spamassassin setprop wbl.global *@*vonage.com White
db spamassassin setprop wbl.global *domain2.com White
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
-
svc -t /service/spamd
You are not advised to use "svc" as far as I know - better to use
/etc/rc.d/init.d/spamassassin restart
If I am wrong perhaps someone can correct it..
-
jfarschman
You can put all the required entries into the one command eg
db spamassassin setprop wbl.global *@*vonage.com White *domain2.com White *domain3.com Black
(all on one line)
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
-
brianr
>...You are not advised to use "svc" as far as I know...
I believe it was the "service" command that is deprecated since around sme5.6. It did not always perform everything that was required of it in all circumstances on sme server.
The "svc" program controls services monitored by supervise.
ie
svc -t /service/xxxxx
is the correct way to do it now since sme6.
although
/etc/rc.d/init.d/spamassassin restart
or the shorter
/etc/init.d/spamassassin restart
still work but svc..... is now preferred/recommended.
See
http://cr.yp.to/daemontools/svc.html
&
http://cr.yp.to/daemontools/supervise.html
-
thank you for this precieuses information, but to put only one address of the type: would toto@toto.com in white list, which be the order exact?
thx ;-)
-
CC,
You'd do it the way I did it above:
db spamassassin setprop wbl.global *domain2.com White
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
So you'd do it line by line altering only this part:
*domain2.com White
Be careful about the capital letters.
-
Are there any plans for a Web interface for this? Whitelisting domains etc is a commonly requested item, but requiring mulitple steps at the command line is going to be beyond the ability of many SME admins.
Also, the spam configuration options on the email filtering page are non-intuitive and could do with a redesign. For a start, if spam sensitivity is not set to 'Custom', the two custom fields should be greyed out.
-
Morpheus,
Take a look at bugzilla. There is a bug there where you should share your two cents.
http://bugs.contribs.org/show_bug.cgi?id=807
-
Which header fields does a white/black list operate on ?
-
Hi all,
I was searching the forums because I have the same problem, and I thought that a little script might make things a bit easier. I had a text file of white-listed domains called whitelist.txt and the script below, reads the list and adds it to the Spamassassin whitelist db, here it is:
----------------------------- C U T ----------------------------------------
# Script that reads a list of "Whitelisted" domains from a file called
# whitelist.txt and adds it to the whitelist of spamassassin.
for line in cat whitelist.txt
do
db spamassassin setprop wbl.global $line White
done
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
-----------------------------------------------------------------------------
I copied the script and the whitelist.txt file in /home/e-smith/db and i then checked the /etc/mail/spamassassin/local.cf which portrayed the changes.
I might be a bit rusty with my shell scripting, so feel free to alter it or to suggest a better way.
Just thought this might be of help
Regards to all
gb
-
This looks good... and of course work.
Simplicity.
-
CC,
You'd do it the way I did it above:
db spamassassin setprop wbl.global *domain2.com White
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
So you'd do it line by line altering only this part:
*domain2.com White
Be careful about the capital letters.
I see how to add an address but how do you remove an address?
-
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
-
Seeker
> I see how to add an address but how do you remove an address?
>> ....you need to re-enter the whole command, minus the entry to be removed
Sorry that advice is not correct. You need to use the delprop switch
eg
to remove fred@goodsite.com White list entry do
db spamassassin delprop wbl.global fred@goodsite.com White
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
and I have revised the above post so as not to mislead future readers
type
db
to see the available usage syntax
-
Good information, thank you Ray and others. Just flagging an issue I encontered. When upgrading from vs6 to vs7, in /home/e-smith/spamassassin, you may need to add/edit
wbl.global=list because it may just be wbl.global=
This is what happened:
[root@gateway db]# db spamassassin setprop wbl.global user@domain.com White
ERROR: You should not set a config record without a type (key was wbl.global).
[root@gateway db]# db spamassassin show
conf.global=
wbl.global=
wbl.global_to=list
[root@gateway db]# pico spamassassin ---> add list to wbl.global=
[root@gateway db]# db spamassassin show
conf.global=
wbl.global=list
wbl.global_to=list
After this, all is fine.