On Thu, 2003-02-20 at 09:00, Derek Jennings wrote:
> Procmail recipes are wondrously arcane. It took me days to get my head around
> even the simplest. Once I had something that worked I did not attempt to cut
> out redundant bits.
>
> To analyse these two lines :-
>
> The leading ':0' delineates the start of a recipe
> The next ':' tells procmail to set the lockfile.
> Next comes the name of the lockfile. If no name is given the default lockfile
> is assumed, so I did not really have to explicitly name it.
>
> The next line would normally contain the filter this recipe is testing
> against, but since this is the default action no test is required, and we go
> straight on to the action which is to put the mail in the $DEFAULT mailbox.
>
> Another example recipe is :-
> :0 : $LOCKFILE
> * ^To:.*@linux-mandrake.com
> $NEWBIE
>
> This says " Set the lockfile, scan the mail looking for a newline followed by
> 'To:' with any number of characters following then '@linux-mandrake.com'.
> If this filter is met put the mail in NEWBIE folder.
> derek
I'll attach my latest /etc/procmailrc for further reference - it also
contains some "recipes" for catching most Windows-borne nasties...
--
Thu, 20 Feb 2003 10:20:00 +1100
10:20am up 23:03, 2 users, load average: 0.06, 0.38, 0.30
------------------------------------------------------------------
| __ __ | kuhn media australia |
| / ,, /| |'-. | http://kma.0catch.com |
| .\__/ || | | |=================================|
| _ / `._ \|_|_.-' | stephen kuhn |
| | / \__.`=._) (_ | email: [EMAIL PROTECTED] |
| |/ ._/ |"""""""""| | email: [EMAIL PROTECTED] |
| |'. `\ | | | icq: 5483808 |
| ;"""/ / | | | |
| smk ) /_/| |.-------.| | mobile: 0410-728-389 |
| ' `-`' " " | Berkeley, New South Wales, AU |
------------------------------------------------------------------
linux user:267497 * RH 8.0 * PC/Mac/Linux/Networking/Consulting
------------------------------------------------------------------
Nothing cures insomnia like the realization that it's time to get up.
PATH=/bin:/usr/bin
:0
* ^From.*@redturtle.it
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@lyris.linkclicks.com
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@headboy.co.uk
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@getoffersdirect.com
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@another.com
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@sympatico.com
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@phantomemail.com
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@coolconcerns.co.uk
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@hananet.net
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@jennasmail.com
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*[EMAIL PROTECTED]
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@ecplaza.net
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*[EMAIL PROTECTED]
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@tyrell.net
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^From.*@*.co.kr
* ^Subject:.*
{
:0
/dev/null
}
:0
* ^(X-Spanska|From.*hahaha)
{
LOG="VIRUS "
:0
/dev/null
}
:0 B
* > 100000
* mDmcOaA5pDmoOaw5sDnAOeA56DnsOfA59Dn4Ofw5ADoEOgg6HDo8OkQ6SD
{
LOG="SirCam "
:0
/dev/null
}
# Attachment with an unzipped Win32 executable - KLEZ
:0
* Content-Type:.*multipart/alternative
* BD ?? AAAMFAAA9AgAAPYlAAAKAgAATVpQAAIAAAAEAA8A//8AALgAAAAAAAAAQAAaAKgBAAC6EAAO
{
LOG="KLEZ "
:0
/dev/null
}
:0 HB
* > 54000
* ^Content-Type: audio/x-(wav|midi);
{
LOG="Klez "
:0
/dev/null
}
# Unless you read Chinese, Japanese, or Korean:
:0
* [Bb][Ii][Gg]5
{
LOG = "Big5 "
:0
/dev/null
}
# It is reliably reported that this single test may kill half your
# spam in one shot:
:0
* !^Message-Id
{
LOG = "No ID "
:0
/dev/null
}
# And this is one is pretty effective, too:
:0
* !^To:
{
LOG = "No To: "
:0
/dev/null
}
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com