Home > Archive > alt.os.linux > October 2002 > procmail never "hits" on recipe





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author procmail never "hits" on recipe
Mark

2002-10-31, 1:24 am

As someone who's new to procmail, I'm frustrated by this one:

I'm running procmail with spamassassin. The headers are appropriately
tagged by SA, but I'd like to route those tagged messages to a 'spam'
mailbox instead of having them passed to the mail client.
The problem is that I never get a "hit" on the recipe/rule below, and I
have no idea why.

My procmailrc:
---------------------------------
LOGFILE=/var/log/procmaillog
LOGABSTRACT=all
VERBOSE=on
#
:0fw
| /usr/bin/spamassassin
:0e
{
EXITCODE=$?
}
:0:
* ^X-Spam-Status: Yes
spam
----------------------------------
procmail log looks like this:

procmail: [18558] Thu Oct 31 00:15:26 2002
procmail: Executing "/usr/bin/spamassassin"
procmail: [18558] Thu Oct 31 00:15:27 2002
procmail: No match on "^X-Spam-Status: Yes"
procmail: Locking "/var/spool/mail/root.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/root"
procmail: Opening "/var/spool/mail/root"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/root.lock"
procmail: Notified comsat: "root@1561:/var/spool/mail/root"
Folder: /var/spool/mail/root 1
--------------------------------------------

I'm really not too sure what I'm doing (as if that's not obvious), but I
have tried the above recipe without the exit code, and have gotten the
same results. It's as if it's never getting as far as that recipe/rule,
but I have no idea why.

Thanks!

Mark

--
e-mail: geekmaster@gmx.net

** Black coffee, blue morning.

Joachim Feise

2002-10-31, 2:24 am

Mark wrote:
> As someone who's new to procmail, I'm frustrated by this one:
>
> I'm running procmail with spamassassin. The headers are appropriately
> tagged by SA, but I'd like to route those tagged messages to a 'spam'
> mailbox instead of having them passed to the mail client.
> The problem is that I never get a "hit" on the recipe/rule below, and I
> have no idea why.
>
> My procmailrc:
> ---------------------------------
> LOGFILE=/var/log/procmaillog
> LOGABSTRACT=all
> VERBOSE=on
> #
> :0fw
> | /usr/bin/spamassassin
> :0e
> {
> EXITCODE=$?
> }
> :0:
> * ^X-Spam-Status: Yes
> spam
> ----------------------------------


My procmail filter for spamassassin looks like this:
:0fw
| spamassassin -P

:0:
* ^X-Spam-Status: Yes
spamtrap/

That works just fine (I'm using qmail's maildir format, so I need
the / at the end of the directory).
With my version of spamassassin (2.42), -P actually isn't necessary
anymore since it is the default. If you have an older version, you
may need it.

-Joe

Mark

2002-10-31, 3:24 am

Joachim Feise wrote:
> Mark wrote:
>
>> As someone who's new to procmail, I'm frustrated by this one:
>>
>> I'm running procmail with spamassassin. The headers are appropriately
>> tagged by SA, but I'd like to route those tagged messages to a 'spam'
>> mailbox instead of having them passed to the mail client.
>> The problem is that I never get a "hit" on the recipe/rule below, and
>> I have no idea why.
>>
>> My procmailrc:
>> ---------------------------------
>> LOGFILE=/var/log/procmaillog
>> LOGABSTRACT=all
>> VERBOSE=on
>> #
>> :0fw
>> | /usr/bin/spamassassin
>> :0e
>> {
>> EXITCODE=$?
>> }
>> :0:
>> * ^X-Spam-Status: Yes
>> spam
>> ----------------------------------

>
>
> My procmail filter for spamassassin looks like this:
> :0fw
> | spamassassin -P
>
> :0:
> * ^X-Spam-Status: Yes
> spamtrap/
>
> That works just fine (I'm using qmail's maildir format, so I need
> the / at the end of the directory).
> With my version of spamassassin (2.42), -P actually isn't necessary
> anymore since it is the default. If you have an older version, you
> may need it.
>
> -Joe
>

Thanks very much for the quick follow-up. I originally had my procmail
looking exactly like yours, but used no "P", and no '/' at the end of
the filename. I'm using the version of spamassassin bundled with RH 8.0.
I'll try the parameters you mention and see what happens. Thanks again.

Mark

--
e-mail: geekmaster@gmx.net

** Actual Headline: Man Steals Clock, Faces Time

David Means

2002-10-31, 8:24 am

On Thu, 31 Oct 2002 02:11:56 -0500, Mark wrote:

> As someone who's new to procmail, I'm frustrated by this one:
>
> I'm running procmail with spamassassin. The headers are appropriately
> tagged by SA, but I'd like to route those tagged messages to a 'spam'
> mailbox instead of having them passed to the mail client. The problem is
> that I never get a "hit" on the recipe/rule below, and I have no idea
> why.

{ snip }

I'm doing exactly that, execpt I'm checking both the index and the status.
Here are my rules:

DROPPRIVS=yes

:0fw
| /usr/bin/spamc -f

:0 a
* ^X-Spam-Status:[ \t]*Yes,[ \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0
/dev/null

Mark

2002-10-31, 10:24 am

David Means wrote:
> On Thu, 31 Oct 2002 02:11:56 -0500, Mark wrote:
>
>
>>As someone who's new to procmail, I'm frustrated by this one:
>>
>>I'm running procmail with spamassassin. The headers are appropriately
>>tagged by SA, but I'd like to route those tagged messages to a 'spam'
>>mailbox instead of having them passed to the mail client. The problem is
>>that I never get a "hit" on the recipe/rule below, and I have no idea
>>why.

>
> { snip }
>
> I'm doing exactly that, execpt I'm checking both the index and the status.
> Here are my rules:
>
> DROPPRIVS=yes
>
> :0fw
> | /usr/bin/spamc -f
>
> :0 a
> * ^X-Spam-Status:[ \t]*Yes,[ \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0
> /dev/null
>

Thanks very much. I'm replacing my recipe with yours, and I'll see what
happens. It seems odd that the simple "Yes" isn't caught though.

Mark

--
e-mail: geekmaster@gmx.net

** Dammit, Tuvok, the Prime Directive doesn't apply - they have coffee!

Mark

2002-10-31, 2:24 pm

Mark wrote:
> David Means wrote:
>
>> On Thu, 31 Oct 2002 02:11:56 -0500, Mark wrote:
>>
>>
>>> As someone who's new to procmail, I'm frustrated by this one:
>>>
>>> I'm running procmail with spamassassin. The headers are appropriately
>>> tagged by SA, but I'd like to route those tagged messages to a 'spam'
>>> mailbox instead of having them passed to the mail client. The problem is
>>> that I never get a "hit" on the recipe/rule below, and I have no idea
>>> why.

>>
>>
>> { snip }
>>
>> I'm doing exactly that, execpt I'm checking both the index and the
>> status. Here are my rules:
>>
>> DROPPRIVS=yes
>>
>> :0fw
>> | /usr/bin/spamc -f
>>
>> :0 a
>> * ^X-Spam-Status:[ \t]*Yes,[ \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0
>> /dev/null
>>

> Thanks very much. I'm replacing my recipe with yours, and I'll see what
> happens. It seems odd that the simple "Yes" isn't caught though.
>
> Mark


Nah, no luck. Same situation. On a known identified spam message,
procmail reports:

procmail: [24959] Thu Oct 31 14:19:51 2002
procmail: Executing "/usr/bin/spamassassin"
procmail: [24959] Thu Oct 31 14:19:56 2002
procmail: No match on "^X-Spam-Status:[ \t]*Yes,[
\t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0"
procmail: Locking "/var/spool/mail/root.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/root"
procmail: Opening "/var/spool/mail/root"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/root.lock"
procmail: Notified comsat: "root@4812:/var/spool/mail/root"
Folder: /var/spool/mail/root 1

Any other ideas would be appreciated. Thanks again,

Mark

--
e-mail: geekmaster@gmx.net

** Actual Headline: Man Steals Clock, Faces Time

Lew Pitcher

2002-10-31, 3:25 pm

On Thu, 31 Oct 2002 15:11:45 -0500, Mark <geekmaster@gmx.net> wrote:

>Mark wrote:
>> David Means wrote:
>>
>>> On Thu, 31 Oct 2002 02:11:56 -0500, Mark wrote:

[snip]
>>>>
>>>> I'm running procmail with spamassassin.

[snip]
>>>> The problem is
>>>> that I never get a "hit" on the recipe/rule below, and I have no idea
>>>> why.

[snip]
>>> :0 a
>>> * ^X-Spam-Status:[ \t]*Yes,[ \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0
>>> /dev/null
>>>

>> Thanks very much. I'm replacing my recipe with yours, and I'll see what
>> happens. It seems odd that the simple "Yes" isn't caught though.
>>
>> Mark

>
>Nah, no luck. Same situation. On a known identified spam message,
>procmail reports:
>
>procmail: [24959] Thu Oct 31 14:19:51 2002
>procmail: Executing "/usr/bin/spamassassin"
>procmail: [24959] Thu Oct 31 14:19:56 2002
>procmail: No match on "^X-Spam-Status:[ \t]*Yes,[
>\t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0"

[snip]

One dumb question: are you sure that you've still got procmail's regexp support
installed? Could it be that the regexp isn't being parsed as a regexp?


Lew Pitcher
IT Consultant, Development Services
Toronto Dominion Bank Financial Group

(Opinions expressed are my own, not my employers')
Mark

2002-10-31, 4:24 pm

Lew Pitcher wrote:
> On Thu, 31 Oct 2002 15:11:45 -0500, Mark <geekmaster@gmx.net> wrote:
>
>
>>Mark wrote:
>>
>>>David Means wrote:
>>>
>>>
>>>>On Thu, 31 Oct 2002 02:11:56 -0500, Mark wrote:

>
> [snip]
>
>>>>>I'm running procmail with spamassassin.

>
> [snip]
>
>>>>>The problem is
>>>>>that I never get a "hit" on the recipe/rule below, and I have no idea
>>>>>why.

>
> [snip]
>
>>>>:0 a
>>>>* ^X-Spam-Status:[ \t]*Yes,[ \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0
>>>>/dev/null
>>>>
>>>
>>>Thanks very much. I'm replacing my recipe with yours, and I'll see what
>>>happens. It seems odd that the simple "Yes" isn't caught though.
>>>
>>>Mark

>>
>>Nah, no luck. Same situation. On a known identified spam message,
>>procmail reports:
>>
>>procmail: [24959] Thu Oct 31 14:19:51 2002
>>procmail: Executing "/usr/bin/spamassassin"
>>procmail: [24959] Thu Oct 31 14:19:56 2002
>>procmail: No match on "^X-Spam-Status:[ \t]*Yes,[
>>\t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0"

>
> [snip]
>
> One dumb question: are you sure that you've still got procmail's regexp support
> installed? Could it be that the regexp isn't being parsed as a regexp?
>
>
> Lew Pitcher
> IT Consultant, Development Services
> Toronto Dominion Bank Financial Group
>
> (Opinions expressed are my own, not my employers')


Not a dumb question at all Lew. If it's enabled/installed by default as
part of the RH8 distro, then it's there. If not, then you may have
nailed my problem. It is *exactly* as if the regexp isn't being parsed
as a regexp. Let me have a look. Thanks for the pointer.

Mark

--
e-mail: geekmaster@gmx.net

** Caffeine isn't a drug, it's a vitamin!

Mark

2002-10-31, 5:24 pm

Mark wrote:
> Lew Pitcher wrote:
>
>> On Thu, 31 Oct 2002 15:11:45 -0500, Mark <geekmaster@gmx.net> wrote:
>>
>>
>>> Mark wrote:
>>>
>>>> David Means wrote:
>>>>
>>>>
>>>>> On Thu, 31 Oct 2002 02:11:56 -0500, Mark wrote:

>>
>>
>> [snip]
>>
>>>>>> I'm running procmail with spamassassin.

>>
>>
>> [snip]
>>
>>>>>> The problem is
>>>>>> that I never get a "hit" on the recipe/rule below, and I have no idea
>>>>>> why.

>>
>>
>> [snip]
>>
>>>>> :0 a
>>>>> * ^X-Spam-Status:[ \t]*Yes,[ \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0
>>>>> /dev/null
>>>>>
>>>>
>>>> Thanks very much. I'm replacing my recipe with yours, and I'll see
>>>> what happens. It seems odd that the simple "Yes" isn't caught though.
>>>>
>>>> Mark
>>>
>>>
>>> Nah, no luck. Same situation. On a known identified spam message,
>>> procmail reports:
>>>
>>> procmail: [24959] Thu Oct 31 14:19:51 2002
>>> procmail: Executing "/usr/bin/spamassassin"
>>> procmail: [24959] Thu Oct 31 14:19:56 2002
>>> procmail: No match on "^X-Spam-Status:[ \t]*Yes,[
>>> \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0"

>>
>>
>> [snip]
>>
>> One dumb question: are you sure that you've still got procmail's
>> regexp support
>> installed? Could it be that the regexp isn't being parsed as a regexp?
>>
>>
>> Lew Pitcher
>> IT Consultant, Development Services
>> Toronto Dominion Bank Financial Group
>>
>> (Opinions expressed are my own, not my employers')

>
>
> Not a dumb question at all Lew. If it's enabled/installed by default as
> part of the RH8 distro, then it's there. If not, then you may have
> nailed my problem. It is *exactly* as if the regexp isn't being parsed
> as a regexp. Let me have a look. Thanks for the pointer.
>
> Mark
>

I'm not having much luck finding any info that indicates an "on/off"
state, or installation options with respect to regexp functionality in
procmail. Instead, it *appears* to me (but what do I know?) that it's
the format of the line(s) in the recipe that indicates whether or not
it's a regexp. This seems like it should simply work, but it sure doesn't.

Mark

--
e-mail: geekmaster@gmx.net

** True Headline: Farmer Bill Dies in House

Mark

2002-10-31, 5:24 pm

Mark wrote:
> Mark wrote:
>
>> Lew Pitcher wrote:
>>
>>> On Thu, 31 Oct 2002 15:11:45 -0500, Mark <geekmaster@gmx.net> wrote:
>>>
>>>
>>>> Mark wrote:
>>>>
>>>>> David Means wrote:
>>>>>
>>>>>
>>>>>> On Thu, 31 Oct 2002 02:11:56 -0500, Mark wrote:
>>>
>>>
>>>
>>> [snip]
>>>
>>>>>>> I'm running procmail with spamassassin.
>>>
>>>
>>>
>>> [snip]
>>>
>>>>>>> The problem is
>>>>>>> that I never get a "hit" on the recipe/rule below, and I have no
>>>>>>> idea
>>>>>>> why.
>>>
>>>
>>>
>>> [snip]
>>>
>>>>>> :0 a
>>>>>> * ^X-Spam-Status:[ \t]*Yes,[ \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0
>>>>>> /dev/null
>>>>>>
>>>>>
>>>>> Thanks very much. I'm replacing my recipe with yours, and I'll see
>>>>> what happens. It seems odd that the simple "Yes" isn't caught though.
>>>>>
>>>>> Mark
>>>>
>>>>
>>>>
>>>> Nah, no luck. Same situation. On a known identified spam message,
>>>> procmail reports:
>>>>
>>>> procmail: [24959] Thu Oct 31 14:19:51 2002
>>>> procmail: Executing "/usr/bin/spamassassin"
>>>> procmail: [24959] Thu Oct 31 14:19:56 2002
>>>> procmail: No match on "^X-Spam-Status:[ \t]*Yes,[
>>>> \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0"
>>>
>>>
>>>
>>> [snip]
>>>
>>> One dumb question: are you sure that you've still got procmail's
>>> regexp support
>>> installed? Could it be that the regexp isn't being parsed as a regexp?
>>>
>>>
>>> Lew Pitcher
>>> IT Consultant, Development Services
>>> Toronto Dominion Bank Financial Group
>>>
>>> (Opinions expressed are my own, not my employers')

>>
>>
>>
>> Not a dumb question at all Lew. If it's enabled/installed by default
>> as part of the RH8 distro, then it's there. If not, then you may have
>> nailed my problem. It is *exactly* as if the regexp isn't being parsed
>> as a regexp. Let me have a look. Thanks for the pointer.
>>
>> Mark
>>

> I'm not having much luck finding any info that indicates an "on/off"
> state, or installation options with respect to regexp functionality in
> procmail. Instead, it *appears* to me (but what do I know?) that it's
> the format of the line(s) in the recipe that indicates whether or not
> it's a regexp. This seems like it should simply work, but it sure doesn't.
>
> Mark
>

I just noticed one difference after appending the "-P" to the end of
spamassassin in the procmail recipe. Now, I am seeing what appears to be
the actual message size in the procmail log, as opposed to a "1". I also
re-booted a few minutes ago too, so who knows. BTW, I hope <red-faced>
that it doesn't take a re-boot to enable procmail changes. If so, I've
wasted at least 36 hours.


Mark

--
e-mail: geekmaster@gmx.net

** A morning without coffee is like something without, . . . something else

Mark

2002-10-31, 8:24 pm

Mark wrote:
> Mark wrote:
>
>> Mark wrote:
>>
>>> Lew Pitcher wrote:
>>>
>>>> On Thu, 31 Oct 2002 15:11:45 -0500, Mark <geekmaster@gmx.net> wrote:
>>>>
>>>>
>>>>> Mark wrote:
>>>>>
>>>>>> David Means wrote:
>>>>>>
>>>>>>
>>>>>>> On Thu, 31 Oct 2002 02:11:56 -0500, Mark wrote:
>>>>
>>>>
>>>>
>>>>
>>>> [snip]
>>>>
>>>>>>>> I'm running procmail with spamassassin.
>>>>
>>>>
>>>>
>>>>
>>>> [snip]
>>>>
>>>>>>>> The problem is
>>>>>>>> that I never get a "hit" on the recipe/rule below, and I have no
>>>>>>>> idea
>>>>>>>> why.
>>>>
>>>>
>>>>
>>>>
>>>> [snip]
>>>>
>>>>>>> :0 a
>>>>>>> * ^X-Spam-Status:[ \t]*Yes,[ \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0
>>>>>>> /dev/null
>>>>>>>
>>>>>>
>>>>>> Thanks very much. I'm replacing my recipe with yours, and I'll see
>>>>>> what happens. It seems odd that the simple "Yes" isn't caught though.
>>>>>>
>>>>>> Mark
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Nah, no luck. Same situation. On a known identified spam message,
>>>>> procmail reports:
>>>>>
>>>>> procmail: [24959] Thu Oct 31 14:19:51 2002
>>>>> procmail: Executing "/usr/bin/spamassassin"
>>>>> procmail: [24959] Thu Oct 31 14:19:56 2002
>>>>> procmail: No match on "^X-Spam-Status:[ \t]*Yes,[
>>>>> \t]*hits=([1-9][0-9]|[8-9])\..*=[45]\.0"
>>>>
>>>>
>>>>
>>>>
>>>> [snip]
>>>>
>>>> One dumb question: are you sure that you've still got procmail's
>>>> regexp support
>>>> installed? Could it be that the regexp isn't being parsed as a regexp?
>>>>
>>>>
>>>> Lew Pitcher
>>>> IT Consultant, Development Services
>>>> Toronto Dominion Bank Financial Group
>>>>
>>>> (Opinions expressed are my own, not my employers')
>>>
>>>
>>>
>>>
>>> Not a dumb question at all Lew. If it's enabled/installed by default
>>> as part of the RH8 distro, then it's there. If not, then you may have
>>> nailed my problem. It is *exactly* as if the regexp isn't being
>>> parsed as a regexp. Let me have a look. Thanks for the pointer.
>>>
>>> Mark
>>>

>> I'm not having much luck finding any info that indicates an "on/off"
>> state, or installation options with respect to regexp functionality in
>> procmail. Instead, it *appears* to me (but what do I know?) that it's
>> the format of the line(s) in the recipe that indicates whether or not
>> it's a regexp. This seems like it should simply work, but it sure
>> doesn't.
>>
>> Mark
>>

> I just noticed one difference after appending the "-P" to the end of
> spamassassin in the procmail recipe. Now, I am seeing what appears to be
> the actual message size in the procmail log, as opposed to a "1". I also
> re-booted a few minutes ago too, so who knows. BTW, I hope <red-faced>
> that it doesn't take a re-boot to enable procmail changes. If so, I've
> wasted at least 36 hours.
>
>
> Mark
>

AH HA! Grabbing and installing the latest version of spamassassin
resolved it! The version packaged with RH8 was 2.31. The current
version (I believe 2.42) works fine. I don't know if it was a version
related issue, or if something got "fixed" by making and installing the
new version, but it works now.

Mark

--
e-mail: geekmaster@gmx.net

** :^) Specially captioned for the humor impaired :^)

Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net