procmail
[Top] [All Lists]

Re: Need feedback on this recipe.

2003-06-20 21:32:24
On Fri, Jun 20, 2003 at 10:20:53PM -0400, Dragoncrest wrote:
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#
:0fw: spamassassin.lock
* < 800000
| /usr/local/bin/spamc

This should'nt really be an issue.

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

* ^X-Spam-Level: \*{15,}

mail/spam


# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "probably-spam".
:0:
* ^X-Spam-Status: Yes
mail/spam

# Work around procmail bug: any output on stderr will cause the "F" in 
"From"
# to be dropped.  This will re-add it.
:0

:0h 

You only want to look at the header here, though I've never heard of this bug.

* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "

  :0 fhw
  | sed -e '1s/^/F/'
}

# This addition filters viruses
:0 fhw
* B ?? ^Content-type: (audio|application)
* B ?? ^Content-type:[  ](audio|application)

"[      ]" contain a literal space and tab.

* B ?? name=.*\.(com|exe|bat|scr|pif|hta|shs|vb[es]|ws[fh])\>
* Subject: *\/.+

Why are you pulling a match? You're not using it...

mail/viruses

# The ever wonderful logfile
LOGFILE=$HOME/procmail.log

Define this at the top.


# This forwards mail off to paul's dumping account.
:0
* ^TO_()user1(_at_)netzero(_dot_)net\>
{
        FORWARDTO = "$FORWARDTO dumper1(_at_)domain(_dot_)net"
}

# This forwards mail off to dad's dumping account.
:0
* ^TO_()user2(_at_)netzero(_dot_)net\>
{
        FORWARDTO = "$FORWARDTO dumper2(_at_)domain(_dot_)net"
}

:0 a
! $FORWARDTO

This is all unncessary.

:0
* ^To_ user1(_at_)netzero(_dot_)net
! dumper1(_at_)domain(_dot_)net

:0 ^To_ user2(_at_)netzero(_dot_)net
! dumper2(_at_)domain(_dot_)net

etc.
You're not saving yourself any effort by having a seperate recipe to define a
variable for each address you forward, then referencing that variable to
actually do the forwarding, unless you're using that variable for something else
later on that you're not showing us.

-- 
Andrew Edelstein        -       http://andrew.pure-chaos.com/resume.txt

Please do not reply directly to me, or Cc: me on a reply to a list message.
I'll get my copy from the list.

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