Philip said I missed one part:
| He also wants to append the string ":2,S" to the filename.
Sigh; something to complicate things.
:0
* conditions
{
oldmaildir=$MAILDIR # save previous value
MAILDIR=name_of_maildir_for_this_message # make procmail cd to it
:0c:
./
:0ai
* LASTFOLDER ?? ()\/[^/]+^^
| mv $LASTFOLDER cur/$MATCH:2,S
MAILDIR=$oldmaildir # in case of fall-through, procmail should cd back
}
Alternatively, assuming $SHELL is not of the csh family, just put this near
the top of the rcfile and don't use the string "/new/" in any paths except
as added by maildir saves:
TRAP='case "$LASTFOLDER" in ; \
*/new/*) mv $LASTFOLDER $LASTFOLDER,2:S ; \
mv $LASTFOLDER,2:S `expr "$LASTFOLDER" : "\(.*/\)new/.*"`cur ;; ; \
esac'
and if that works, it should automatically move all messages saved to qmail-
style maildirs to the cur/ subdirectory with the ",2:S" suffix.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail