On Sat, Nov 12, 2011 at 9:26 PM, Gary V  wrote:
>> On 12.11.2011 17:31, Mufit Eribol wrote:
>>
>>> [root@mail amavisd]# razor-check -d -home=/var/spool/amavisd/.razor/<
>>> /usr/share/doc/spamassassin-3.3.1/sample-spam.txt
>>
>> now razor config files is owned by root ?
>>
>> thus spamassassin/amavis cant update later :/
>>
>
> That is may fear also. In the first instance where you use
> spamassassin, root was reading from
> /var/spool/amavisd/.razor/razor-agent.conf and using a razorhome of
> /var/spool/amavisd/.razor, possibly due to setting the location of the
> config file in local.cf? If so, remove it from local.cf. Each user
> should be able to write to /.razor directory under their home
> directory and if you debug as root and root is using the directory of
> another user, it may take ownership of any files it writes, preventing
> the user that should be the owner of all the files in that directory
> from overwriting files in the future.
>
> When running razor-check -d you can see that is it's using
> /root/.razor and it found no razor.conf so it had to manually do a
> discovery and did write some files to the directory:
>
> Nov 12 17:25:35.838541 check[3162]: [ 5] wrote 3 ARRAY items to file:
> /root/.razor/servers.catalogue.lst
> Nov 12 17:25:35.838718 check[3162]: [ 5] wrote 4 ARRAY items to file:
> /root/.razor/servers.nomination.lst
>
> So, I think remove the entry in local.cf and then:
>
> chown -R amavis:amavis /var/spool/amavisd/.razor
>
> Then see if things improve:
>
> su amavis -c 'spamassassin -t -D razor2 <
> /usr/share/doc/spamassassin-3.3.1/sample-spam.txt'
>
> --
> Gary V
>

If you are still having problems after following the suggestions
above, it's also possible that razor simply did not create all the
files correcty in the user's /.razor directory. I have seen this
happen. You can run the create command more than once to fix things
up, in fact when I install razor-agents, I always run it twice:

su amavis -c 'razor-admin -create'

-- 
Gary V

Reply via email to