Karsten Bräckelmann wrote:
This gives USER=postfix and HOME=/root
I know. :)  That was meant for your enlightenment...
Thanks

so how do I fix the mkdir /root/.spamassassin failed error?

You don't. Seriously, see above. sudo switches the user, it does not
necessarily mean you get the same environment as a daemon running as
that user. Hence SA trying to access / write in a HOME dir not owned by
the current user but inherited.

Sorry but i'm sooo super confused right now -

What user does SA usually run under? Where does it get it's env, in
particular the HOME? Mimic that, if you want to see how it would do.

Again, sudo as above just switches the user. It does not reflect what
your SA running user's environment is, and which files it accesses.

yup I get that i just don't know what to do next to fix the permissions error.

Run your checks as the SA running user. Do use it's environment.
Otherwise, your debugging will not show what the real system is like and
where the issue is.

>From another post of yours it seems you get errors su'ing to postfix.
Dunno about that right now, it's late here, and frankly -- I don't know
what user you're running SA as, or how it is called. All I know is that
you tried switching to postfix.

BTW, hint, the '-' in Andrews post is key, to get the user's environment
instead of inheriting the calling one's.

Thanks for your time Karsten, I appreciate your help and apologise for being linux 'thick' at times.

It'd definitely be worthwhile to read up a little on su, sudo, the
environment (hint: see '-') and maybe HOME. Just so you understand why
merely switching user doesn't effect the env, and why your unprivileged
postfix user tried to mess with root's home.


Anyway, what was all this about again? FuzzyOCR? Just to catch the
recent image spams?

They can easily be detected without it. Never scored below 5 here, and
gets an additional 2 points using the nice meta posted recently by John
Hardin on this list.


I am going to read up on su sudo and the enviroment so I can get a better handle on how to run stuff through as the spamassassin user (postfix in my case) The reason behind it was we are getting a particular kind of spam through and I thought that FuzzyOCR should be stopping them as they are pngs
example: http://www.pastebin.ca/1424245
I will read some of the recent threads and find the meta posted by John and see if it will help.

Reply via email to