procmail
[Top] [All Lists]

Procmail 4.0 WishList

2004-06-26 13:01:15
In ... another forum that shall remain nameless,
some were speculating on changes to Procmail.

And I came up with a bit of a WishList, as follows:

1) Lose the damned ":0" for a start! Put the options after the thing it mods.
2) Replace "*" with ":"?
3) Support [0-9a-f]{12} instead of [0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a- f][0-9a-f][0-9a-f][0-9a-f]
4) Support DNS lookups directly.
5) Maybe support some sort of "Function" definitions.
6) ">" indicates final delivery ("we're done").
7) "+" indicates non-final delivery (aka ":0 c").
8) put formail into the code so you don't need to spawn another shell.
9) Use $1, etc. instead of "\" + "/".
10) FULL PCREs instead of "Almost". Except maybe use " " as a synonym for \s.

Oh yeah, blank line fulfills the same function of ":0" in starting a recipe.

Ideally, it would be nice if the majority of rules could be written in a way that didn't look like REs, for those who don't know what REs are, without getting one into trouble.
Oh yeah, some obvious way of specifying "or" would be nice, too.
Just for the neophites. The rest of us know "|".

Oh Yeah ^^2. While-loops might be nice....

Some example code that MIGHT be written in Procmail 4.0 as I currently envision it:

        # Old trick...
        :D ^MiME-Version:
         { x="${x:+$x} MiME" }

        # First crack at finding the Handoff Header....
: $insert^Received: from ([-a-z0-9\.]) \([-a-z0-9\.]) \[([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\]\) { $helo=$1; $rdns=$2; $ip=$3+"."+$4+"."+$5+"."+$6; $rev=$6+"."+$5+"."+$4+"."+$3; }

        # Test the IP found against SpamCop.
        : assert (nslookup ($rev + ".bl.spamcop.net."), "127.0.0.2")
         { x="${x:+$x} SpamCop" }

        # Tag executible content as indicated by the MIME headers.
:MIME ?? name=.*\.(bat|ceo|cpl|cmd|com|exe|js|lnk|pif|scr|shs|vbs|zip)"?$
        { x="${x:+$x} Executible" }

        # Send all procmail list traffic to it's own folder, with Reply-To:.
        : 
^Return-Path:.*(procmail-admin|procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE)
{ formail (I, "Reply-To: <procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE>"); > $DEFAULT/.IN-procmail/ }

That's just a few minutes day-dreams, but ... methinks that Procmail is
overdue for an overhaul, and this is just my personal wishlist.

Comments?

Aloha mai Nai`a!
--
"Please have your Internet License             http://kapu.net/~mjwise/
  and Usenet Registration handy..."


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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