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!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s