Recipe flags

There are several flags that make procmail behave differently.
c - Carbon Copy (continue)
How many times have you deleted a piece of mail only to wish you still had it a week later? With procmail you can create a backup folder of all your incoming mail.

# [..other recipies..]

# I put this at the end of my .procmailrc so that only the messages that would
# normally end up in my inbox get saved to the backup folder.

# the "c" flag tells procmail to make a carbon copy (or continue)
# if the recipe matches. This will let me safe a copy in $MAIL/backup as well
# as putting it into my mailbox when the procmailrc continues
# Note: There are no conditions since I want this to always match

:0c
backup
a (A) - If the preceding recipe matched then do this one
ACM membership mail is very important so we not only want to store a copy in our ACM mailbox but we want to also forward it to our friend at another university who also thinks ACM is cool. We denote a forward action with a bang (!)

NOTE: a and A are very similar, see the man page for details.


# Part of the trick of filtering list mail is to find a unique header. ACM membership
# mail happens to have an "X-loop: membership@acm.uiuc.edu" header so we'll use that

:0c
* ^X-loop: membership@acm.uiuc.edu
!friend@other.uni.edu

# notice that we don't have to specify a condition for the next rule

:0a
acm
! - invert the condition
Let's say we want to filter all our ACM membership mail EXCEPT if it has "job" in the subject. We don't want to miss all those ACM job opportunities.


# this will filter any mail from the ACM membership list that
# does not contain "job" anywhere in the Subject
# The ".*" is a regular expression that matches any number of characters
# We will cover some simple regular exprssions later

:0
* ^X-loop: membership@acm.uiuc.edu
* !^Subject: .*job.*
acm
NOTE: A ! in the condition means negate while a ! in the action means forward.

There are a lot of other flags but the above are probably the most important

Back: Simple Filtering Top Next: Matching on Regular Expressions

j g r o s s @ s t i m p y . n e t