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
After creating the /root/.razor files, copy the .razor directory to the
helper home.
cp -r /root/.razor/ /etc/spamassassin/helper-home-dir/
Okay, this is what finally fixed it. I didn't actually copy the
directory, but instead created an empty .razor directory. When I
restarted spamd, it created
razor-agent.log
server.c101.cloudmark.com.conf
servers.catalogue.lst
servers.discovery.lst
servers.nomination.lst
in that directory. I thought that razor would create the .razor
directory itself, but it wouldn't do that. I actually ran 'razor-admin
-create -home=/etc/spamassassin/helper-home-dir' earlier, but without
the .razor as you suggested in your other mail. Thanks again for the help.
--
Chris