Koozali.org: home of the SME Server

enabling user_prefs in spamassassin ?

Offline steve288

  • *
  • 336
  • +0/-0
enabling user_prefs in spamassassin ?
« on: February 20, 2009, 07:50:21 PM »
I like using the user_prefs file to put blacklists names and whitelist names, also making any small recipe changes to spamassassin.

When I look at the /usr/share/spamassassin/user_prefs.template it says

“ If you want to make changes to the site-wide defaults,  create a file in /etc/spamassassin or /etc/mail/spamassassin instead.”

Does this mean that if I create a user_prefs file in /etc/mail/spamassassin  that it should start using the user_prefs and apply it  globally.

I know that I can use
db spamassassin setprop wbl.global *@vonage.com White

and I can download a contrib to do this but I wanted to use the user_prefs.

Thanks.

Offline steve288

  • *
  • 336
  • +0/-0
Re: enabling user_prefs in spamassassin ?
« Reply #1 on: February 24, 2009, 05:49:54 PM »
I add this information for others who may be strugging with the same things. I hope I dont incure the wrath of the Gods of SME. The fact that no one answered my question means either, Im such a nob that no one has the time for mornons with questions so simple that ignoring them is the best plan, (a possibility I open to theory).  Or that no one has the answer.

Unfortunetely I have tried a variety of things to get the user_prefs to work but cannot. The message at the top of the user_prefs.template (see my previous message) about putting the user_prefs into your etc/mail/spamassassin folder etc. simply does not work. Perhaps you must do some other things, but I tried allow_user_rules 1 option in root local.cf, then in /etc/mail/spamassassin. And while spamassassin -D --lint seems to show it in there it seems to not apply it. So Im just confused.
I Did do by the way :
expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd/

Again maybe thats the wrong command.
 
By the way a helpfull note in any mention about "spamassassin -D --lint" might be that you cannot simply use the commad "spamassassin -D --lint" which does work, but streams by that its impossible to make head nor tails of it. For the novice who doesnt know how to fix this use;
 "spamassassin -D --lint &> filename.txt 
or spamassassin --lint -D 2>&1 | less
or spamassassin --lint -D 2>&1| grep -i string
It has to do with standard output.

What does work and how can you change the rules?

Well the faq
http://wiki.contribs.org/Email#Custom_Rule_Scores.
Is very helpfull. Look for the title "Custom Rule Scores"
This works.

However when I do the lint command it does not seem to find this or report anything regarding your custom changes in your etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf . But if you send a mail out to yourself with some rule in it you can look at the header and sure enough there it is.

Frankly Im not really sure where the new local.cf is being stored.
Anyway I hope that this adds some information to those looking to makes changes to the rules on their own.
Regards

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: enabling user_prefs in spamassassin ?
« Reply #2 on: February 25, 2009, 07:45:24 PM »
I add this information for others who may be strugging with the same things. I hope I dont incure the wrath of the Gods of SME.
As mentioned in another post, to you on these forums, I think you need to deepen your knowledge on the bowels of SME Server before starting to give advices like this. Also familiarize yourself with the general guidelines used here (http://wiki.contribs.org/SME_Server:Community).

SME Server relies heavily on the server-manager, internal configuration database and the template system. All is explained in the SME Server Developers Guide linked in the wiki, before giving users advice how to modify your system I think you need to familiarize yourself with it and give instructions like this with very great care as most SME Server users are not linux guru's and a mistake is easily made.

If you need new functionality or changes to the system in general that could benefit more (like a large part of the community) please post you changes in the wiki instead of in the forums or perhaps even better report it as a NFR (New Feature Request) in the bug tracker first, then the developers can decide if they might incorporate it or that it is something that should be documented (most likely in the wiki).
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)