I am using spamassassin in a php script, but when I train spamassassin as my user the php script's exec command to call spamassassin get the untrained version because of the user specific nature of sa-learn. So I need to sudo to my user in the exec command and get the environment of my user along with the premissions
Tried that uses the prefence files of the users calling sudo not the user in sudo
kman99
2009-07-15 17:05:53
A:
sudo -H -u <username> <command>
The -H flag sets the $HOME
environment variable. Without setting this flag, SpamAssassin is probably looking in the old user's homedir for settings.
pix0r
2009-07-15 17:18:17