procmail
[Top] [All Lists]

Re: Procmail 4.0 WishList

2004-06-26 14:24:50
On Sat, 26 Jun 2004 09:39:21 -1000, Michael J Wise <mjwise(_at_)kapu(_dot_)net> 
wrote:
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.

You need to something to delineate where a recipe starts.  :0 is as
good as anything.  Maybe just a :

not sure what you mean by "Put the options after the thing it mods"

2) Replace "*" with ":"?

Change for the sake of change?

3) Support [0-9a-f]{12}

and [a-z]{5,}  [a-z]{,5}and other forms.  Agreed.

4) Support DNS lookups directly.

I don't think so.  procmail is not a dns lookup tool, and there are
ways to do dns lookups if needed.  No reason, I think, for it to be
builtin to procmail.

5) Maybe support some sort of "Function" definitions.
6) ">" indicates final delivery ("we're done").
7) "+" indicates non-final delivery (aka ":0 c").

Change for the sake of change again?  There's nothing wrong with the
current system, although I can see the logic of supporting multiple
actions with this:

# Message is copied to user(_at_)domain(_dot_)com and to Bob.mail mbox
::  # : to start recipe, : to indicate lock file
* From:(.*\<)?bob(_at_)aol\(_dot_)com
+user(_at_)domain(_dot_)com  # copy to email address
(formail -I "Status: RO") +Bob.mail # Copy to mbox via formail
$DEFAULT # deliver message to INBOX
;; # end of recipemarker (makes it easy to allow mutliple actions.

Support for multiple actions would be very useful.

8) put formail into the code so you don't need to spawn another shell.

This is probably a good idea.  I'm sure it wasn't done initially to
keep the size of procmail down.  However, it might mean procmail is
always consuming much more reesources than would be used with the
current split executables.

9) Use $1, etc. instead of "\" + "/".

full awk-like pattern matching would be very nice to have, agreed.

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.

No, I really disagree with that.  SOME start of recipe marker is
needed, and white space should not be required:

LOG="Log this"

YEAR=`date '+Y'`

* From:(.*\<)?bob(_at_)aol\(_dot_)com
bob.mail

where's the recipe start?  if you want to consider the * to be the
start of recipe that's fine, I suppose, but you still need some way of
limiting the scope of the recipe.  (you want the recipe to only look
at the header, or only the body, or only the MIME headers, etc)

Oh yeah, some obvious way of specifying "or" would be nice, too.
Just for the neophites. The rest of us know "|".

'|' is the standard way to specify or.  Someone who can't handle that
has no business in the shell, much less in procmail.

a minor addition, I would like to see two LOG commands, LOG and LOGN. 
LOGN would log with a NL (like echo) and LOG would log like LOG (echo
-n).  Also, basic understanding of MIME would be nice.

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

Well, who's going to write it?

It is open source, right?  Get cracking!



-- 
gkreme at gmail or kreme at kreme or syth at mac

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