[Project Home] [Bayesian Antispam Filter]

PALS MAIL FILTER(1)                           PALS MAIL FILTER(1)

       palsfilter, palsharvest, palsextract - pals mail filter

       palsfilter [-q] [-v] [FILE]
       palsharvest [options] PATTERN
       palsextract [-q] [-v] [FILE]

       Pals  mail  filtering  maintains  a  set of mail addresses
       called  pals.   The  set  is  maintained   in   the   file
       $PALS_HOME/.pals, or if the environment variable PALS_HOME
       is not defined, $HOME/.pals.  Each  mail  address  in  the
       file  is  terminated with a newline.  Mail from an address
       that is not in the file is marked,  which  allows  further
       filtering based on the mark.  In particular, one can write
       rules such that only mail from a pal causes an  indication
       that  mail has arrived.  Pals mail filtering can make sure
       that spam never does the same.

       The palsfilter program adds a mark to mail from  non-pals.
       The  mark  it  adds  is  the following non-standard header

           X-Pals: marked

       When the palsfilter program is used as  a  filter,  it  is
       often  run in quiet mode using the command line switch -q.
       In quiet mode, errors are not printed to  standard  error.
       The  program  exits with a non-zero error code if the pals
       file cannot be read.

       The palsharvest script harvests mail addresses from a mail
       message  and  adds  the  addresses  to the pals file.  The
       addresses harvested are the ones in the To,  Cc,  and  Bcc
       fields.   The  command  line  arguments of palsharvest are
       passed to grep, which filters addresses  before  they  are
       added  to the pals file.  A natural way to use palsharvest
       is to apply it to messages from  the  owner  of  the  mail
       address.   In  this  usage,  a  pal  is  someone  that has
       received mail from the owner of the mail address.

       Given a mail message on standard input or a file, the pal-
       sextract  program prints each mail address it finds in the
       To, Cc, and Bcc fields on a separate line.   This  program
       is used by the palsharvest script.

       -q     Run  in quiet mode, where errors are not printed to
              standard error.

       -v     Prints version information and then exits.

              All palsharvest options are passed to grep(1).

       This is an excerpt of a procmail rcfile for a user with  a
       mail  address  of local@domain.  Mail from the same domain
       is not filtered.

       # Collect pals by harvesting headers from me.

       :0 hwc:
       * ^From:.*local@domain
       | palsharvest -v domain

       # Filter mail through the pals filter,
       # marking mail when not from a pal.

       :0 fhw
       * !^From:.*domain
       | palsfilter -q

       # Place marked mail into mbox for further filtering.

       * ^X-Pals: marked

       # Remaining mail goes into the default mailbox.

              The file containing a user's current  set  of  mail
              pals.  This file is read by palsfilter, and updated
              by  palsharvest.   When  the  environment  variable
              PALS_HOME  is not defined, the set is maintained in
              the file $HOME/.pals.

       John D. Ramsdell

       grep(1), procmail(1)

                            June 2003         PALS MAIL FILTER(1)


I am grateful to SourceForge for making this project space available to me.