Discussion:
user_prefs
Alan Fullmer
22 years ago
Permalink
I am having difficulty, and was wondering if anyone can shed some light on
the subject.

I can't get spam assassin to read any user_prefs file.

it works with the local.cf just fine.

is there something i've missed?

thanks in advance.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Matt Kettler
22 years ago
Permalink
Post by Alan Fullmer
I am having difficulty, and was wondering if anyone can shed some light on
the subject.
I can't get spam assassin to read any user_prefs file.
it works with the local.cf just fine.
What settings are you trying to put in user_prefs?
How do you launch SA?
Where did you try to put your user_prefs file?



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Alan Fullmer
22 years ago
Permalink
I launch it from the spamd, then postfix uses the spamc to filter.

my options i have ./spamd -d -c

the user_pref's file I am trying to get to work is in the
~username/.spamassassin/user_prefs

the ~username is a username listed in passwd's home dir for that user.


----- Original Message -----
From: "Matt Kettler" <***@comcast.net>
To: "Alan Fullmer" <lists-***@xnote.com>;
<spamassassin-***@lists.sourceforge.net>
Sent: Thursday, September 11, 2003 7:01 PM
Subject: Re: [SAtalk] user_prefs
...
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Matt Kettler
22 years ago
Permalink
Post by Alan Fullmer
my options i have ./spamd -d -c
No.. what entries are you trying to put into the user_prefs itself that
aren't working?

If it's a rule, well then read the manpage.. rules are ignored in
user_prefs when using spamd for security reasons.

If it's some other option, specify what you put there.





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Alan Fullmer
22 years ago
Permalink
I guess I should start from the top.

Originally I installed SA through the spamassassin way, not through spamd
(originally) I have changed to spamd because of the speed.

I have a site-wide config in /etc/mail/spamassassin/local.cf

I have it set to various things. The required_hits is 6.0.

I have some users on the system that want to have theirs set to a different
value.

I was going to have them use a user_prefs file in their home directory.
Assuming their names are dick and jane, both of which are accounts in
/etc/passwd.
So I have 2 files: /home/dick/.spamassassin/user_prefs and
/home/jane/.spamassassin/user_prefs

their files have some different values and rules, as well as required_hits
10.0

I am currently using the spamd file. Called by postfix:
spamfilter unix - n n - - pipe
flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter.sh -f ${sender} --
${recipient}

spamfilter is a username I created to run the script:

#!/bin/bash
/usr/local/bin/spamc -f | /usr/sbin/sendmail -i "$@"
exit $?


It does not even touch those user_prefs files (checked it with the -D
option)

I have recently (within the hour) been told two things, both of which I am
not sure are true or not.

1) You should not use user_prefs with the spamd due to security risks.
2) I cannot have my MTA call the function. I have to have something like
procmail do the work.

So Bottom Line, This is what I am trying to accomplish. I have looked at
several websites... all of which work in their own way (have tried all of
them) but they dont' use the user_prefs.

I would like to have a global local.cf for those who do not have thier own
user_prefs file.
I would like to have the ability to scan for each user. based on that
user_prefs file.

I hope i have made sense.




----- Original Message -----
From: "Matt Kettler" <***@comcast.net>
To: "Alan Fullmer" <lists-***@xnote.com>;
<spamassassin-***@lists.sourceforge.net>
Sent: Thursday, September 11, 2003 8:14 PM
Subject: Re: [SAtalk] user_prefs
Post by Matt Kettler
Post by Alan Fullmer
my options i have ./spamd -d -c
No.. what entries are you trying to put into the user_prefs itself that
aren't working?
If it's a rule, well then read the manpage.. rules are ignored in
user_prefs when using spamd for security reasons.
If it's some other option, specify what you put there.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Matt Kettler
22 years ago
Permalink
Post by Alan Fullmer
So I have 2 files: /home/dick/.spamassassin/user_prefs and
/home/jane/.spamassassin/user_prefs
<snip>
Post by Alan Fullmer
It does not even touch those user_prefs files (checked it with the -D
option)
Well, you've never told spamc to use jane or dick's userid.. so it's going
to use spamfilter's user_prefs and it will never touch any other user_prefs
in the system.

If you pass spamc -u jane, it will cause spamd to read jane's user_prefs,
so get that information to it, and you'll get the behavior you want.

Spamd does not ever try to infer what userid it should run as from the
content of the message. It will only do it based on what user spamc is
executed as, or based on the -u parameter to spamc, if provided. The reason
for this is simple..spamc can't reliably know who the mail is for. The
message might not be addressed to them (ie: a bcc), and spamc never sees
the message envelope.

Note: you might need to call spamc as root for -u to work fully.. I've
never tried it as a deprived user.
Post by Alan Fullmer
1) You should not use user_prefs with the spamd due to security risks.
That's not true.. you can use user_prefs with spamd quite safely.. but not
for rules.

You can do things like set the default hits, declare whitelist_from's, even
over-ride scores.. but any body, header, rawbody, etc statements are rules
and can be abused in user_prefs. SpamAssassin will by default ignore
anything which can contain a regex in user_prefs.
Post by Alan Fullmer
2) I cannot have my MTA call the function. I have to have something like
procmail do the work.
Hmm, I'm not sure that's a problem, but most people do use procmail to do
the work, if for no other reason than added capabilities that are handy.
Post by Alan Fullmer
I would like to have a global local.cf for those who do not have thier own
user_prefs file.
I would like to have the ability to scan for each user. based on that
user_prefs file.
That's quite possible, but as I said above, spamc needs to know what user
to act as, it can't figure it out on it's own.





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Alan Fullmer
22 years ago
Permalink
forget that last message, i have no idea why it sent it twice, nor why it took a day later to send the second one.

apologies.

:-)


----- Original Message -----
From: Alan Fullmer
To: spamassassin-***@lists.sourceforge.net
Sent: Thursday, September 11, 2003 3:01 PM
Subject: [SAtalk] user_prefs


I am having difficulty, and was wondering if anyone can shed some light on the subject.

I can't get spam assassin to read any user_prefs file.

it works with the local.cf just fine.

is there something i've missed?
Alan Fullmer
22 years ago
Permalink
I am having difficulty, and was wondering if anyone can shed some light on the subject.

I can't get spam assassin to read any user_prefs file.

it works with the local.cf just fine.

is there something i've missed?

Continue reading on narkive:
Loading...