You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris Purves <ch...@northfolk.ca> on 2006/11/24 00:50:18 UTC
razor-agent.log being placed in root directory
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
Re: razor-agent.log being placed in root directory - solved
Posted by Chris Purves <ch...@northfolk.ca>.
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
Re: razor-agent.log being placed in root directory
Posted by Chris Purves <ch...@northfolk.ca>.
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
Re: razor-agent.log being placed in root directory
Posted by Gary V <mr...@hotmail.com>.
>After creating the /root/.razor files, copy the .razor directory to the
>helper home.
>cp -r /root/.razor/ /etc/spamassassin/helper-home-dir/
>
Note that this is functionally equivilent to:
razor-admin -create -home=/etc/spamassassin/helper-home-dir/.razor
Gary V
_________________________________________________________________
Get FREE company branded e-mail accounts and business Web site from
Microsoft Office Live
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
Re: razor-agent.log being placed in root directory
Posted by Gary V <mr...@hotmail.com>.
>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
Re: razor-agent.log being placed in root directory
Posted by Chris Purves <ch...@northfolk.ca>.
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
RE: razor-agent.log being placed in root directory
Posted by Gary V <mr...@hotmail.com>.
>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'.
Gary V
_________________________________________________________________
Get free, personalized commercial-free online radio with MSN Radio powered
by Pandora http://radio.msn.com/?icid=T002MSN03A07001
RE: razor-agent.log being placed in root directory
Posted by Sietse van Zanen <si...@wizdom.nu>.
I beleive razor log files and config go into the homedir of the user running spamassassin.
For me, Í run SA as user spamassassin and that user's homedir is /var/lib/spamassassin.
There is a .razor dir there, wheere all the files are.
-Sietse
From: Chris Purves
Sent: Fri 24-Nov-06 0:50
To: users@spamassassin.apache.org
Subject: razor-agent.log being placed in root directory
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