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/
This will at least give some readable files. I can't advise you on security
issues, so I'll let you determine if the directory and files should be
writable.
You can place razor-agent.conf there also (provided you delete
/etc/razor/razor-agent.conf), or you can use /etc/razor/razor-agent.conf
instead.
You can debug razor by starting up spamd in non-daemon mode and use the '-D
razor2' argument. Then use spamc from another terminal session. I only tried
it with one normal user, you should probably try it with several.
Gary V
_________________________________________________________________
MSN Shopping has everything on your holiday list. Get expert picks by style,
age, and price. Try it!
http://shopping.msn.com/content/shp/?ctId=8000,ptnrid=176,ptnrdata=200601&tcode=wlmtagline