Yale University Library

 

Library Access Integration Services

Quick Links
Mail Filtering with Procmail

Very Important! This program is not supported by either ITS or WW&DCS. If you lose all of your mail, you are on your own!

Pine itself does not do mail filtering, but it is "filter friendly." I use procmail to filter my mail, but there are other programs like filter and slocal that you can use.

Procmail is a mail processing utility that matches text based on regular expressions and then drops mail into folders based on recipes that you have written.

You need to set Pine to recognize multiple incoming mailboxes by flagging the []enable-incoming-folders option in the configuration dialog. This will give you a "pseudo-collection" called "incoming message folders" when you start Pine. Adding to this "collection" is slightly confusing, so follow these directions carefully.

  1. With the cursor on the INBOX, press A and you will be prompted for the "Name of Server to Contain Added Folder"
  2. Press Return since you want it to be on this server.
  3. You will be prompted for "Name of Folder to Add." This is confusing. You want to type mail/xxx. You are being asked not for the name of the folder in Pine, but the location on the file system. Pine stores your mail in a subdirectory of your home directory called mail/.
  4. Press Return
  5. You will be prompted for a nickname. This is what you will see in Pine. So, you could name the folder mail/IN.letters_from_mom and give it the nickname IN.letters_from_mom.
  6. Technically, these folders could be anywhere in your home directory, but leave them in mail/ to start.

You need to set up a configuration file in your home directory with the name .procmailrc

You should also read the man pages and other resources mentioned below to get started.

Infinite Ink's Processing Mail with Procmail.

ACM Procmail Workshop. Includes HTML versions of the man pages for procmail.

To get the man pages on Pantheon, man command at the shell prompt. Procmail, procmailrc, and procmailex are the most important man files. There are html versions on Pantheon help that work erratically.

 

john.coleman@yale.edu Revised 5/16/97