[Mimedefang] enabling razor tests & re-constituting mail from the spool directory

Jason Englander jason at englanders.cc
Wed Apr 30 16:52:02 EDT 2003


On Wed, 30 Apr 2003, Rich Stanton wrote:

> Thanks for clearing that up.  On a related note, how do I check that the
> razor tests etc are being done?  Do I just need to wait for a spam and see
> if 'razor' appears in the spamassassin tests within the email, or can I get
> a debug output from anywhere (my maillog doesn't seem to detail what tests
> were done)?

You can, like you said, just wait for a spam and see if the RAZOR2_CHECK
test matches.  You can also log when it does match to syslog by making a
change to your filter.  After this line:

    my($hits, $req, $names, $report) = spam_assassin_check();

Add something like this to log the tests that match each time a message
comes in:

    md_syslog("info", "$MsgID: SA tests that matched: $names");

or to only log a line when razor matches a message:

    md_syslog("info", "$MsgID: this message was found in razor") if $names =~ /RAZOR2_CHECK/;

MIMEDefang uses SpamAssassin and SpamAssassin uses Razor, so
they all act as the user that MIMEDefang runs as.  So, if
yours runs as user "defang", and /home/defang exists, then
look for /home/defang/.razor/razor-agent.log  You can raise or lower the
log level by modifying razor-agent.conf in there.  If you don't have a
razor-agent.conf, you can create one by running this:

su defang -c "razor-admin -create"

If you can't or don't want to do that, you can create a global one by
doing this:

razor-admin -home=/etc/razor -create

Then those files will be in /etc/razor, they'll be used if
/home/defang/.razor doesn't exist.  Make sure that directory is readable
and writeable by defang.  Open up the config file and add "razorhome =
/etc/razor" to it and change logfile from razor-agent.log to
/etc/razor/razor-agent.log (razorhome should take care of that, but it
doesn't...)

  Jason

-- 
Jason Englander <jason at englanders.cc>
394F 7E02 C105 7268 777A  3F5A 0AC0 C618 0675 80CA




More information about the MIMEDefang mailing list