logo       

Re: lots of "ifs": msg#00017

mail.maildrop

Subject: Re: lots of "ifs"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 11 January 2004 11:30 am, Robin Lynn Frank wrote:
> In switching over from procmail, I have what I basically want by doing:
>
> if ( $SIZE < 50000 )
> {
> xfilter "/usr/bin/spamc -f"
>
> import SENDER
> import RECIPIENT
> import EXTENSION
>
> to "| /usr/bin/tmda-filter"
> }
>
> In procmail, I was able to exclude mail lists we subscribe to from
> processing by spamc or tmda (to save resources) by the following:
>
> * !^Subject: .*Biglumber-news
> * !^Subject: .*spamNEWS
> * !^To: .*postfix-users@xxxxxxxxxxx
> * !^CC: .*postfix-users@xxxxxxxxxxx
>
> I've been trying all morning to add something similar to the "if" statement
> above, but can't quite nail it down.

I'm going to include my mailfilter it has lots of examples so you can look
though there and pick pout what you want.

in your case you want something like

if ( /^X-Loop: anomy-list/ )
{
to "$LMB"
}

if ( $SIZE < 50000 )
{
xfilter "/usr/bin/spamc -f"

import SENDER
import RECIPIENT
import EXTENSION

to "| /usr/bin/tmda-filter"
}

This will look for your mailing list first and if it finds it then it will
deliver it to in this case $LMB which I have set further up as the location
of my mailbox.

Let me know how this goes for you.
- --
-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-
Brook Humphrey
Mobile PC Medic, 420 1st, Cheney, WA 99004, 509-235-9107
http://www.webmedic.net, bah@xxxxxxxxxxxx, bah@xxxxxxxxxxxxxxxxxx
Holiness unto the Lord
-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAAaq/nT1TkA6FgPgRAgbcAJ43nME3ZysQ4ai86TRsx2/tEubJbgCfUe4F
U238sMqbmKXb5//Fktvdsng=
=W8rJ
-----END PGP SIGNATURE-----

Attachment: .mailfilter
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise