You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by sa...@burger.homeunix.org on 2006/07/15 00:27:31 UTC

how to dump message as it enters spamassassin

Hi,

I am new to this list. I have searched the spamassassin FAQ and list 
archive but couldn't find the answer.

I have the following test rule in my local.cf:
header LOCAL_MISSING_MSGID      MESSAGEID =~ /^UNSET$/ [if-unset: UNSET]
describe LOCAL_MISSING_MSGID    Missing Message-Id header
score LOCAL_MISSING_MSGID       0.010

But it's not triggering. Other rules in local.cf are working, just this 
one isn't. To make things more complicated, my MTA inserts a Message-Id 
header when it doesn't see one, so by the time I get the source of the 
mail and feed it to spamassassin, it passes.

Is there a way to dump the input message as it enters spamassassin? I 
have spamd running as a daemon, using version 3.1.1. The log shows:

spamd[12345]: spamd: checking message (unknown) for (unknown):102

Thanks,
Robert


Re: how to dump message as it enters spamassassin

Posted by Loren Wilton <lw...@earthlink.net>.
> Thanks! That solved my problem. Do you know why my previous rule, using 
> UNSET, doesn't work?

Haven't a clue.  I've never used that form.

> Next question: how can I obtain "message" the way spamassassin sees it, 
> not in its final form (altered by MTA+SA)?

Look into 'report_safe'.  You can wrap the original message as an 
attachment, so the original is unchanged.

        Loren


Re: how to dump message as it enters spamassassin

Posted by jdow <jd...@earthlink.net>.
From: <sa...@burger.homeunix.org>

> On Jul 14, 2006, at 9:32 PM, Loren Wilton wrote:
> 
>>> I have the following test rule in my local.cf:
>>> header LOCAL_MISSING_MSGID      MESSAGEID =~ /^UNSET$/ [if-unset: 
>>> UNSET]
>>> describe LOCAL_MISSING_MSGID    Missing Message-Id header
>>> score LOCAL_MISSING_MSGID       0.010
>>
>> header    __HAVE_MSGID    exists:MESSAGEID
>> meta    MISSING_MSGID    !__HAVE_MSGID
>>
>> or
>>
>> header    __HAVE_MSGID    MESSAGEID    =~    /./
>> meta    MISSING_MSGID    !__HAVE_MSGID
>>
>> The first test will test to see if the item exists.  The second will 
>> test that it both exists and is not blank.
> 
> Thanks! That solved my problem. Do you know why my previous rule, using 
> UNSET, doesn't work?
> 
>>> But it's not triggering. Other rules in local.cf are working, just 
>>> this one isn't. To make things more complicated, my MTA inserts a 
>>> Message-Id header when it doesn't see one, so by the time I get the 
>>> source of the mail and feed it to spamassassin, it passes.
>>>
>>> Is there a way to dump the input message as it enters spamassassin? I 
>>> have spamd running as a daemon, using version 3.1.1. The log shows:
>>
>> spamassassin -t <message
> 
> Next question: how can I obtain "message" the way spamassassin sees it, 
> not in its final form (altered by MTA+SA)?

With the "not good enough for snobs" procmail it's really easy to get
unmolested copies.

:0c:
/tmp/copies

Put those two lines then a blank line just in front of the rule
that runs spamassassin, usually via spamc.

{o.o}

Re: how to dump message as it enters spamassassin

Posted by sa...@burger.homeunix.org.
On Jul 14, 2006, at 9:32 PM, Loren Wilton wrote:

>> I have the following test rule in my local.cf:
>> header LOCAL_MISSING_MSGID      MESSAGEID =~ /^UNSET$/ [if-unset: 
>> UNSET]
>> describe LOCAL_MISSING_MSGID    Missing Message-Id header
>> score LOCAL_MISSING_MSGID       0.010
>
> header    __HAVE_MSGID    exists:MESSAGEID
> meta    MISSING_MSGID    !__HAVE_MSGID
>
> or
>
> header    __HAVE_MSGID    MESSAGEID    =~    /./
> meta    MISSING_MSGID    !__HAVE_MSGID
>
> The first test will test to see if the item exists.  The second will 
> test that it both exists and is not blank.

Thanks! That solved my problem. Do you know why my previous rule, using 
UNSET, doesn't work?

>> But it's not triggering. Other rules in local.cf are working, just 
>> this one isn't. To make things more complicated, my MTA inserts a 
>> Message-Id header when it doesn't see one, so by the time I get the 
>> source of the mail and feed it to spamassassin, it passes.
>>
>> Is there a way to dump the input message as it enters spamassassin? I 
>> have spamd running as a daemon, using version 3.1.1. The log shows:
>
> spamassassin -t <message

Next question: how can I obtain "message" the way spamassassin sees it, 
not in its final form (altered by MTA+SA)?

Robert


Re: how to dump message as it enters spamassassin

Posted by Loren Wilton <lw...@earthlink.net>.
> I have the following test rule in my local.cf:
> header LOCAL_MISSING_MSGID      MESSAGEID =~ /^UNSET$/ [if-unset: UNSET]
> describe LOCAL_MISSING_MSGID    Missing Message-Id header
> score LOCAL_MISSING_MSGID       0.010

header    __HAVE_MSGID    exists:MESSAGEID
meta    MISSING_MSGID    !__HAVE_MSGID

or

header    __HAVE_MSGID    MESSAGEID    =~    /./
meta    MISSING_MSGID    !__HAVE_MSGID

The first test will test to see if the item exists.  The second will test 
that it both exists and is not blank.

>
> But it's not triggering. Other rules in local.cf are working, just this 
> one isn't. To make things more complicated, my MTA inserts a Message-Id 
> header when it doesn't see one, so by the time I get the source of the 
> mail and feed it to spamassassin, it passes.
>
> Is there a way to dump the input message as it enters spamassassin? I have 
> spamd running as a daemon, using version 3.1.1. The log shows:

spamassassin -t <message


        Loren