procmail
[Top] [All Lists]

procmail regex style using Or construct

2009-02-19 10:04:17
Dear all,
as an infrequent procmailer I would appreciate a little help with this.

I want to filter message based on Dete: header so that
in any month:
days 1-7 go in one file
days 8-15 go in another etc ...

This egrep expression does the trick but does not translate to procmail.
egrep ^Date:.*\ \(1\|2\|3\|4\|5\|6\|7\)\ $MNTH\ $YR sent-mail

Without resorting to separatwe rules like:-
MNTH=$1
YR=$2
:0 c
* $ ^Date:\ .*\ 1\ $MNTH\ $YR
/mailbackup/$YR/$MNTH/sent-mail
:0 c
* $ ^Date:\ .*\ 2\ $MNTH\ $YR
/mailbackup/$YR/$MNTH/sent-mail

I am using formail to call procmail with this type of recipe.

any help much appreciated
--
Oliver

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