Hi All,
I wonder if anyone can help me with the following procmail recipe:
:0
* ^Subject:.*\[MYTAG: *\/.+\]
{
saved = $SHELLMETAS
SHELLMETAS
REALMATCH =`expr "$MATCH" : ' *\(.*\)\].*'`
SHELLMETAS = $saved
:0 w
* test ! -w $HOME/$REALMATCH
* ? mailutil create $REALMATCH
:0 w
| /usr/bin/dmail +$REALMATCH
}
What I'm trying to with this is:
For all email that contains a preformatted tag, [MYTAG: SomeText], move
the email to the SomeText MBX mail folder. Unfortunately, dmail will not
create a non-existent folder (unlike procmail with unix mail folders),
so I am trying to get procmail to check whether the folder exists first,
and if not, create it before filing the email.
It's doing this last step I'm having problems with - my last try, as you
can see was:
:0 w
* test ! -w $HOME/$REALMATCH
* ? mailutil create $REALMATCH
But this hasn't worked any better than my many previous attempts :p
Any help gratefully received.
Cheers,
James
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an intended
recipient then please promptly delete this e-mail and any attachment and all
copies and inform the sender. Thank you.
____________________________________________________________
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