welcome: please sign in

The following 272 words could not be found in the dictionary of 7 words (including 7 LocalSpellingWords) and are highlighted below:
above   absolutely   activate   addressed   admins   already   also   although   an   and   another   appropriate   are   as   backup   based   be   been   before   best   bounces   bugs   Bugs   bugzilla   but   by   called   calls   can   Category   causes   Cc   central   cfp   checked   checking   client   code   coding   comment   comments   Contents   Coop   copy   create   created   cron   custom   daemon   debian   decided   Definitely   describes   devel   did   different   directory   do   document   domain   don   done   each   edu   eko   elsewhere   email   Example   example   examples   Family   familymember1   familymember2   Ff   field   file   files   filter   filtered   focus   folders   for   Force   From   from   Fujiyama   get   gets   had   have   hcoop   highly   home   how   However   if   If   Ignore   in   includes   infoworld   instead   instructions   into   Introduction   invoked   is   it   It   Justin   keep   kept   Leitgeb   Level   Life   liferea   like   Lists   lists   local   Local   log   logs   mail   Maildir   make   man   Manual   manually   me   means   Member   message   messages   Michael   mind   misses   Most   msn   mwolson   my   necessary   Needs   Neko   net   newsletter   nflug   Nn   not   Note   Occasionally   Of   of   Olson   on   once   one   options   or   order   org   out   owner   page   person   place   plone   Points   probably   Probably   process   procmail   Procmail   procmailex   procmailrc   program   purposes   put   putting   rather   re   Rea   receive   receives   recommend   remainder   rotate   Rr   rules   sample   sas   save   school   School   script   section   Sender   Sent   Separates   sers   set   setup   should   simply   Since   since   skills   smaller   so   somecollege   somehow   sourceforge   space   spam   Spam   spamassassin   specific   split   starting   Status   step   submit   sure   Table   task   Test   testing   than   that   The   the   these   This   this   those   thunderbird   to   To   took   touch   truncate   trust   twice   two   ujiyama   under   upenn   Use   use   used   users   Uu   values   vending   Vending   we   well   What   which   who   will   with   Work   works   would   write   yahoo   yahoogroups   Yes   You   you   your  

Clear message

MemberManual / Email / Procmail

This page describes how to use Procmail to filter mail. It includes HCoop-specific instructions and a sample .procmail.d/procmailrc file with comments.


Procmail instructions are kept in the ~/.procmail.d/procmailrc file. You should have a directory under your home AFS directory called .procmail.d. To activate procmail, simply create a file in that directory called procmailrc.

Since we like to document by means of an example, the remainder of these instructions focus on two specific example ~/.procmail.d/procmailrc files.

Points to keep in mind

What do these examples do?

What do these examples not do?

Example 1: MichaelOlson's setup

# Example procmailrc filters
# We use a maildir here at hcoop.net

# If you want to keep track of where mail has been delivered,
# uncomment this.  If enabled, be sure to trim this file once
# in a while (using cron is one way), because otherwise it can
# grow quite large.  It is strongly recommended to use the
# path given here, so that the logs gets placed in a writable
# location.

# See the manpages `procmailrc' and `procmailex' for explanations
# of the syntax involved.

# The following 2 rules come before the spam rules because we
# want to make sure that email from these people get through.
# It's a form of whitelisting.

# Stuff from the family
* ^From.*(familymember1@msn|familymember2@yahoo)

# Work-related
* ^From.*person@somecollege

# All mail tagged as spam (eg. with a score higher than the set
# threshold) is definitely spam.
* ^X-Spam-Status: Yes

# If it scores 3 or better, it's probably spam.
* ^X-Spam-Level: \*\*\*

# The Debian Bug-Tracking System forwards me a copy of each bug report
# I send in.  Since I don't already have a copy of this report, put it
# in my Sent box.
* ^From:.*me@hcoop\.net
* ^To:.*submit@bugs\.debian\.org

# Local mail (error messages and the like)
* ^(To:|From).*local\.domain\.org

# Vending stuff
* ^To:.*me(\+|_)vending@domain\.org

# School-related
* ^To:.*me\+school@domain\.org

# Crap sent to all students
* ^(To|Cc):.*[Rr]-[Uu]sers_

# Bug reports
* ^(From|To|C[c]):.*(bugs\.debian\.org|bugzilla\.)

# LifeReader mailing list
* ^(From|To|C[c]):.*liferea-devel@lists

# Neki_Fujiyama (Samurai Pizza Cats) list
* ^(From|To|C[c]):.*[Nn]eko_[Ff]ujiyama@yahoogroups

# Hcoop mailing list
* ^To:.*users@hcoop

# InfoWorld newsletters
* ^From.*@newsletter\.infoworld

# Other lists
* ^(From|To|C[c]):.*(@lists\.|@yahoogroups)

# Anything I've sent should go to Test
* ^From:.*(mwolson@|@mwolson\.org)

Example 2: JustinLeitgeb's setup

I based my .procmailrc on the file above. However, I don't trust my procmail coding skills, so I had procmail create a log file of the messages that it receives, as well as a backup copy of each message for testing purposes. I also decided that the "Sender:" field is the best one to use for the lists that I receive, so I filter on this field. I took code in my .procmailrc from the "procmailex" man page, which I highly recommend.

I created the directory "log" in my home directory for the log file before putting the .procmailrc in place. I also created the folders to which mail would be filtered in thunderbird, although I'm not absolutely sure if this step is necessary.

Note that you should probably comment out the "backup" section once you're sure that your code works in order to save space. You will also have to rotate or truncate the procmail log file manually, or write a script for cron to use.

## JustinLeitgeb .procmailrc
## Modified Sun Apr 15 01:41:34 EDT 2007

# We use a maildir here at hcoop.net

# Create a log file

# Make a backup of all mail that we'll wipe out when we're sure that 
# filtering is working correctly.
:0 c    

## Filter all of the mailing lists that we get into different
## folders.

# CFP (call for papers) list
* ^Sender.*owner-cfp@lists.sas.upenn.edu

# plone-users
* ^Sender.*plone-users-bounces@lists.sourceforge.net

# nflug
* ^Sender.*nflug-bounces@nflug.org

CategoryNeedsWork CategoryMemberManual

MemberManual/Email/Procmail (last edited 2013-01-14 09:11:02 by ClintonEbadi)