You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Matias Pelenur <li...@matiaspelenur.com> on 2004/10/09 01:13:21 UTC

Problems reporting spam to razor2 from procmail

Hi,
I followed the instructions in the ReportingSpam and RazorSiteWide Wiki
pages to try to enable spam reporting on my server. I'm using RedHat 9, 
Postfix, SpamAssassin 3.0 and Razor 2.61. I have SpamAssassin set-up to 
run from /etc/procmail and it works fine, including the razor2 checks 
and so on.

First I tried running spamassassin -r from the command line:

cat email.txt | /usr/bin/spamassassin -D -r -C=/etc/mail/spamassassin

That works. Looking at the spamassasin debug info, I see the following:

debug: Razor2 is available
debug: entering helper-app run mode
  Razor-Log: read_file: 17 items read from /etc/razor/razor-agent.conf
  Razor-Log: Found razorhome: /etc/razor
Oct 08 16:04:32.833571 report[21809]: [ 2] [bootup] Logging initiated
LogDebugLevel=9 to stdout
Oct 08 16:04:32.834028 report[21809]: [ 5] computed
razorhome=/etc/razor, conf=/etc/razor/razor-agent.conf, ident=/etc/razor/id
entity-ruvvjF_w6B
<snip>

All good. Then, I added the same to my .procmailrc:

:0 H
* ^.*To:.matias\+spam
{
    :0: spamassassin.spamlock
    | /usr/bin/spamassassin -D -r -C=/etc/mail/spamassassin

    :0:
    $DEFAULT/.Spam/
}

But it doesn't work. Looking at the procmaillog, I see the following:

debug: Razor2 is available
debug: entering helper-app run mode
razor2 report failed: No such file or directory Razor2 report requires
authentication at /usr/lib/perl5/site_perl/5.8.0/Mail/Sp
amAssassin/Reporter.pm line 148.
debug: leaving helper-app run mode
  Razor-Log: read_file: 17 items read from /etc/razor/razor-agent.conf
  Razor-Log: Found razorhome: /etc/razor, however, can't write to it.
Oct 08 16:04:32.833571 report[21809]: [ 2] [bootup] Logging initiated
LogDebugLevel=9 to stdout
Oct 08 16:04:32.834028 report[21809]: [ 5] computed
razorhome=/etc/razor, conf=/etc/razor/razor-agent.conf, ident=/etc/razor/id
entity-ruvvjF_w6B
debug: SpamAssassin: could not report spam to Razor.

As you can see there's the "No such file or directory" error and "Found
razorhome: /etc/razor, however, can't write to it." error.

At first I thought it might be the permissions for the /etc/razor folder
for the user running procmail. However, at that point procmail should be
running as me, and if I can run spamassassin correctly from the command
line, I don't see why procmail shouldn't do the same... In any case, I
added myself and the postfix user to a group "spam", and made /etc/razor
rw by group spam, to no avail..

Is there some environment variable(s) that procmail is getting rid of
and that spamassassin needs to use razor2?

Any insight would be appreciated.

Thanks,
Matias Pelenur