Procmail recipe to star (flag) IMAP mail
Looking for a simple way to star (flag) a mail via my procmail script turned out to be trickier than i expected. In the end i based my solution on a recipe to mark messages as read and came up with the following:
:0
* conditions
{
:0c
.destination_folder/
:0
{
TRAP="mv $LASTFOLDER $LASTFOLDER:2,F"
HOST
}
}
Note: This will only work for Maildir based mailboxes!
January 18, 2010 at 8:42 pm