Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to flag (mark) an email which matches a rule as important (press F in mutt will flag email as important). So how to write this in procmail recipe ? If procmail can not flag email as important, then is there any other solution to do this with a rule automatically ?

share|improve this question
up vote 2 down vote accepted

no worries with procmail you can do almost everything:-)

to have emails flagged with ! they must be tagged by X-Status: F

this can be achieved by piping the email through formail with proper args as shown in this .procmailrc snippet:

:0 fh
* ^TOsome@email.address
| formail -I"X-Status: F"
share|improve this answer
For efficiency, you probably want to change the flags to :0 fh i.e. only pipe the headers to formail. – tripleee Jan 14 '13 at 11:55
thanks, I've looked at the man page. it appears 'Feed the body to the pipe' ist default. I changed it above according to your suggestion. – sparkie Jan 14 '13 at 12:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.