procmail
[Top] [All Lists]

Re: Kind of functions in procmail

2001-11-17 17:32:24

Have a look at http://www.it.ca/software/procmail-spamtrap .  It's
catching about 90% of the spam that comes in here, and only rarely
is it getting false positives.

My spamtrap isn't usually describing the reason for a trap, but it
is adding a header line with the string of text ($MATCH) that was
noticed as a spam element.  The existence of the "X-spamtrap:" header
line is enough to determine the handling for a particular message,
and the way I've set it up I can get multiple "X-spamtrap" header
lines if a particular message is matched by multiple rules.

I'm not sure what you're trying to do with the double quotes.  Perhaps
they should be another nesting level of curly braces?

This is untested, but how about:


SPAMREASON=none
SPAMFOLDER=spamfolder
XSPAMKILLERHEADER=X-spamkiller

:0
* $ misc rule 1...
{ SPAMREASON="hit rule 1" }

:0
* $ misc rule 2...
{ SPAMREASON="rule 2 matched" }

:0
* ! SPAMREASON ?? none
{
        LOG="${XSPAMKILLERHEADER}: ${SPAMREASON}"

        :0 
        | ${FORMAIL} -I "${XSPAMKILLERHEADER}: ${SPAMREASON}"

        :0 
        ${SPAMFOLDER}
}


On Fri, Nov 16, 2001 at 03:30:42PM +0100, heddy Boubaker wrote:
From: heddy Boubaker <boubaker(_at_)cena(_dot_)fr>
Subject: Kind of functions in procmail
To: procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de
Date: Fri, 16 Nov 2001 15:30:42 +0100


 hi I'm looking for a way to factorize some parts of my procmailrc, as
 functions, for ex I've MANY rules like that
 
:0
* $ misc rule 1...
{
        SPAMREASON="misc rule 1 match ${MATCH}"
        LOG="${SPAMKILLERTAG}: ${SPAMREASON}
"
        :0 fwh
        | ${FORMAIL} -i "${XSPAMKILLERHEADER}: ${SPAMREASON}"
        :0
        ${SPAMFOLDER}
}

:0
* $ misc rule 2...
{
        SPAMREASON="misc rule 2 match ${MATCH}"
        LOG="${SPAMKILLERTAG}: ${SPAMREASON}
"
        :0 fwh
        | ${FORMAIL} -i "${XSPAMKILLERHEADER}: ${SPAMREASON}"
        :0
        ${SPAMFOLDER}
}

  thanks in advance for any help

-- 
 /   From the last station before the end of the neT   \
 \ Centre d'Etudes de la Navigation Aerienne,  div SSS /
 / 7, av edouard Belin - 31055 Toulouse CEDEX - France \
 \ Tel:(+33|0)5.62.25.95.22 | Fax:(+33|0)5.62.25.95.99 /
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  IT Canada                                            http://www.it.ca/

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>