Ah! I see… that makes sense.. but spamc reads one mail at a time, is there way 
(other than writing a script) to have it read a folder full of emails?


> On Nov 2, 2015, at 8:02 AM, Benny Pedersen <m...@junc.eu> wrote:
> 
> Axb skrev den 2015-11-02 16:42:
>> On 11/02/2015 04:38 PM, Shaheen Bakhtiar wrote:
>>> Well… I’m glad I’m on this mailing list :P
>>> I did the same thing, running sa-learn —spam /spamfolder as root, and
>>> was pondering this very issue.
>>> I understand the logic behind why it shouldn’t be run as root, the
>>> problem is on FC 22 the spamd user has /sbin/nologin as the shell in
>>> /etc/passwd. Which means in order to run the process as spamd one has
>>> to manual change that to /bin/bash, then, change it back
>>> (/sbin/nologin it self is a security precaution), once the process is
>>> complete.
> 
> no you should use spamc not sa-learn
> 
>>> This seems convoluted.
>>> I know sa-learn has -u option but that simply changes the user name
>>> in the environment (does not sudo), is there a better way to do this?
>>> Have i missed something?
> 
> sa-learn is using user-prefs, also for root if it exists, search for it in 
> $HOME
> 
>>> Shawn
>> Assuming you're using file based Bayes DB
>> in local.cf add:
>> bayes_path /path_to/bayes/bayes
>> then you can learn as root .
>> h2h
> 
> for global bayes yes, but for non global bayes its better in user_prefs file
> 
> and why did he change spamd login permisson when using sa-learn :(
> 
> use spamc, not spamd if spamc is not used
> 
> on does not need to login to apache for see a homepage, same goes for spamd, 
> it is using port 783 so it need to be started as root, but the real work will 
> happend as the user calling spamc

Reply via email to