Complete.Org: Mailing Lists: Archives: discussion: August 1999:
[aclug-L] procmail presentation summary
Home

[aclug-L] procmail presentation summary

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: [aclug-L] procmail presentation summary
From: Jeff <schaller@xxxxxxxxxxxxx>
Date: Sun, 8 Aug 1999 11:55:31 -0500 (CDT)
Reply-to: aclug-L@xxxxxxxxxxxx

Ok, the long-awaited (sorry) procmail presentation summary.

Procmail is a mail delivery agent (takes incoming mail, then possibly
performs some action on it, but by default puts it in your INBOX).  
This is as compared to a mail transfer agent (sendmail or qmail) or a
mail user agent (pine, mutt, elm, etc).

Typically, procmail is invoked either directly from sendmail as the local
delivery agent, or through a .forward mechanism.

Procmail uses a ~/.procmailrc file to specify actions for incoming email.
The actions are grouped into 'recipes'.  Each recipe consists of
- a colon line
- a condition line
- an action

The colon line is typically ":0", but often has a trailing ":" to
specify a lockfile. The colon line is also where various flags appear,
affecting procmail's behavior for that recipe.  See procmailrc(5) for
a description of them.

The condition lines (there may be none) are ANDed together. If they all
match, the action line is triggered, otherwise procmail continues on. The
condition line is basically a regular expression, but see procmailrc(5)
for some useful procmail extensions. If a recipe matches, procmail
stops processing the .procmailrc file and executes the action line
(subject to certain flags on the colon line).

The action 'line' can either be a line or an opening brace, signifying a
block.  The block is then treated like a nested .procmailrc file (it may
contain more recipes).  Typical action lines save the matching email to a
folder or forwarding it to another address.

For specific information, see procmail(1), procmailrc(5), procmailex(5),
and formail(1).

Random extras:
- the 'mailstat' program typically comes with procmail, and is useful for
  summarizing the procmail log file.
- setting VERBOSE=on either at the top of ~/.procmailrc or just before any
  suspicious recipes is helpful for debugging problems.

Examples:

Forward any and all mail coming to this account to another one (note, 
no condition lines):
:0
! new@address.domain

Save anything that is not directly addressed to me into a folder called
'spam' (change 'schaller@xxxxxxxxxxxxx' to your address):
:0:
* ! ^TOschaller@xxxxxxxxxxxxx
spam

Save all ACLUG mail to a separate aclug folder:
:0:
* ^TOaclug-(L|announce)@complete.org
aclug


-jeff
-- 
I find television very educational. Every time someone turns on the set,
I go into the other room and read a book.  --Groucho Marx


[Prev in Thread] Current Thread [Next in Thread]
  • [aclug-L] procmail presentation summary, Jeff <=