procmail
[Top] [All Lists]

Re: Tag recipe

2002-06-17 12:22:35
On Mon, 17 Jun 2002, Ashley M. Kirchner wrote:


    I have the following recipe:

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

:0E
*$ $to_()openldap-software(_at_)OpenLDAP(_dot_)com
{
    TAG = "[OpenLDAP]"
}

MATCH

:0 fhw
* ! TAG ?? ^^^^
*  ^Subject: *\/[^ ].*
| $FORMAIL -I "Subject: $TAG ${MATCH:-<no subject>}"
----------


    And I have two questions:

    a) how can I make it so that it's case INsensitive?

        The flag "D" for Distinguish between upper and lower case.

    b) Occasionally someone will send a message without a subject, and
       I would like those messages to still be tagged, however that's
       not happening.  What'd I miss?

        Try "+" instead of "*"

*  ^Subject: *\/[^ ].+

        It means (in the right side of the matching) one not space and
        at least one char more.


Bye,
 Udi

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