procmail
[Top] [All Lists]

Re: Better Recipe?

2001-07-25 23:25:14
On 2001.07.24 19:21 Ashley M. Kirchner wrote:

    This from one of my users:

    ----------

    Hey Ash,

    Can you help me and optimize my procmail rc file?  Check it out,
it's getting kinda long and there has to be a better way to do that kind
of stuff.  What do you think?

    .procmailrc

    FORMAIL = "/usr/bin/formail"
    TAG = ""
    to_ = '^((Apparently-)?To|Cc):(.*\<)?'


    :0
    *$ $to_()magick-user(_at_)imagemagick(_dot_)org
    {
        TAG = "[IMagick]"
    }

    :0E
    *$ $to_()imap(_at_)u(_dot_)washington(_dot_)edu
    {
        TAG = "[IMAP]"
    }

    :0E
    *$ $to_()info-cvs(_at_)gnu(_dot_)org
    {
        TAG = "[InfoCVS]"
    }

----------

    I snipped this, it really *IS* long - and all he's doing is matching
mailing lists and inserting the tag on the subject line.  And as he
said, the file is long - way long.  So, is there a better way to do
this?

--
H | Hi, I'm currently out of my mind.  Please leave a message.  BEEEEP!
  +--------------------------------------------------------------------
  Ashley M. Kirchner <mailto:ashley(_at_)pcraft(_dot_)com>   .   303.442.6410 
x130
  Director of Internet Operations / SysAdmin    .     800.441.3873 x130
  Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave, #6
  http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


Have you tried pgen--an m4 processor to take a procmail.m4 and produce a
.procmailrc.  For simple, but repetitive stuff, it makes things easier to
maintain.

You can find it at:

http://www.myrddin.demon.co.uk/dist/

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