procmail
[Top] [All Lists]

Re: Spammish?

2003-02-15 19:12:16
On Sat, 15 Feb 2003 fleet(_at_)teachout(_dot_)org wrote:

OK.  Given enough time and enough monkeys ...

Here's what I've come up with:

VERBOSE and all that other stuff

EOL="
"

:0 fwh
* condition
{
    LOG="SPAM: Broke rule 1$EOL"
    SPAMFLAG="yes"
}


  <stuff cut>


:0 c
* $SPAMFLAG ?? yes
spamfolder



I have this to add headers into the spam emails:

# remove the variable
SPAMREASON


# sardine mail - usenet name
:0
* ^TO_sardines(_at_)purse-seine\(_dot_)net
{
  nl
  nl=${SPAMREASON+"$NL"}
  SPAMREASON="${SPAMREASON}${nl}${SPAMREASON_HEADER}To sardines"
}


# 10 spaces in the subject
:0
* ^Subject:.*          .
{
  nl
  nl=${SPAMREASON+"$NL"}
  SPAMREASON="${SPAMREASON}${nl}${SPAMREASON_HEADER}subject spaces"
}



etc etc


then:

# Add reason headers and deliver spam
:0
* ! SPAMREASON ?? ^^^^
{
  # Add the spam reason headers
  :0 fhw
  | formail -A "${SPAMREASON}"

  # deliver
  :0:
  IN.zzzz.spam
}


I end up with new headers in the email, such as:

X-Mundungus-Spam-Reason: undisclosed recip
X-Mundungus-Spam-Reason: mailix Id, no smtp
X-Mundungus-Spam-Reason: suspect mailix message Id




Alan

( Please do not email me AS WELL as replying to the list. Personal
  email is welcome but may invoke a password autoresponder - the
  current pass-through address is alan+1@  )


_______________________________________________
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>