Gary V wrote:
Gary V wrote:
I noticed today that razor-agent.log is placed in the root directory. I have --helper-home-dir=/etc/spamassassin/helper-home-dir set as a spamd option, but the log is not being written to there. How can I fix this problem?

Thanks.

--
Chris

This may be an indication there is no razor-agent.conf. Assuming root owns the log file, as root, run 'razor-admin -create' twice in a row. The log should move to the /root/.razor directory (the home directory of whatever user runs the command). To prevent logging for user 'root', edit /root/.razor/razor-agent.conf and change debuglevel to 0. To control logging on a site wide basis, you could copy /root/.razor/razor-agent.conf to /etc/razor/razor-agent.conf. If other users use razor, you should run 'razor-admin -create' twice as those users too. If you report spam to the razor servers, then you also need to run 'razor-admin register'.


Thanks, everyone for your suggestions, but it still doesn't make sense. My setup is that spamd is run by root, and spamc is called by the user to whom mail is being delivered. For this reason I don't want .razor directories created for every user.

From 'man spamd':

-H directory, --helper-home-dir=directory
    Specify that external programs such as Razor, DCC, and Pyzor should
    have a HOME environment variable set to a specific directory.  The
    default is to use the HOME environment variable setting from the
    shell running spamd.  By specifying no argument, spamd will use the
    spamc caller's home directory instead.

Setting this should set the razor home directory when using spamc. My spamd options are:

--max-children=3 --helper-home-dir=/etc/spamassassin/helper-home-dir -s /var/log/spamassassin/spamd.log -x -Q

This setup works for pyzor, because if I remove all the files from helper-home-dir and restart spamd, a .pyzor directory will be created. It seems to me that spamd is not properly setting the razor home environment.

--
Chris


The problem:

Razor-Log: Computed razorhome from env: /etc/spamassassin/helper-home-dir/.razor
Razor-Log: No razorhome found, using all defaults

Hi Gary, I appreciate the help. I increased the debuglevel from 3 to 10 in /etc/razor/razor-agent.conf, then reading from /razor-agent.log I see:

Nov 24 14:28:52.764664 check[6495]: [ 5] computed razorhome=, conf=/etc/razor/razor-agent.conf, ident=identity

So, it looks to me that spamd is not passing the home environment variable to razor.

--
Chris

Reply via email to