SUMMARY: Filters for Mailtool

From: Carsten Moll (moll@transtec.de)
Date: Tue Jul 26 1994 - 21:11:40 CDT


Original Message:

> Hello,
>
> I'm looking for a way of filtering incoming mail messages and launching
> different tasks.
>
> The usage should be for an 'intelligent' vacation programm:
>
> mailing lists should generate no response,
> personal mails 'inhouse' should generate message 1 for inhouse use,
> personal mails 'out-of-house' should generate message 2,
> messages of user 'boss' should be deleted... ;-))
>
>
> How can that be achived ???

Thank you to:

Linn Stanton <lstanton@sten.lehman.com>
Kurt Radtke <criterion1!kurt@nuchat.sccsi.com>
Peter Samuel <Peter.Samuel@nms.otc.com.au>
John Stanley <stanley@oce.orst.edu>
Garrett D'Amore <garrett@athena.SDSU.Edu>

Nearly everyone suggested the programm 'procmail'.

It was posted in 'comp.sources.misc' in Net-News:

The procmail mail processing program. (v3.03 1994/06/30)

Can be used to create mail-servers, mailing lists, sort your incoming mail
into separate folders/files (real convenient when subscribing to one or more
mailing lists or for prioritising your mail), preprocess your mail, start
any programs upon mail arrival (e.g. to generate different chimes on your
workstation for different types of mail) or selectively forward certain
incoming mail automatically to someone.

Procmail can be used:
        - and installed by an unprivileged user (for himself only).
        - as a drop in replacement for the local delivery agent /bin/mail
          (with biff/comsat support).
        - as a general mailfilter for whole groups of messages (e.g. when
          called from within sendmail.cf rules).

The accompanying formail program enables you to generate autoreplies, split up
digests/mailboxes into the original messages, do some very simple
header-munging/extraction, or force mail into mail-format (with leading From
line).

 ----------------------
A recent version can be picked up at various comp.sources.misc archives.
The latest version can be obtained directly from the ftp-archive at:

        ftp.informatik.rwth-aachen.de (137.226.225.3)

as (g)zipped tar file: /pub/packages/procmail/procmail.tar.gz <160KB
as compressed tar file: /pub/packages/procmail/procmail.tar.Z <224KB
 ----------------------

Feature summary for procmail:
        + It's less filling (i.e. small)
        + Very easy to install (rated PG6 :-)
        + Simple to maintain and configure because
          all you need is actually only ONE executable (procmail)
          and ONE configuration file (.procmailrc)
        + Is event driven (i.e. gets invoked automagically when mail arrives)
        + Does not use *any* temporary files
        + Uses standard egrep regular expressions
        + It poses a very low impact on your system's resources
          (it's 1.4 times faster than the average /bin/mail in user-cpu
           time)
        + Allows for very-easy-to-use yes-no decisions on where the mail
          should go (can take the size of the mail into consideration)
        + Also allows for neural-net-type weighted scoring of mails
        + Filters, delivers and forwards mail *reliably*
        + Provides a reliable hook (you might even say anchor :-) for any
          programs or shell scripts you may wish to start upon mail arrival
        + Performs heroically under even the worst conditions
          (file system full, out of swap space, process table full,
          file table full, missing support files, unavailable executables,
          denied permissions) and tries to deliver the mail somehow anyway
        + Absolutely undeliverable mail (after trying every trick in the book)
          will bounce back to the sender (or not, your choice)
        + Is one of the few mailers to perform reliable mailbox locking across
          NFS as well (DON'T use NFS mounted mailboxes WITHOUT installing
          procmail; you may lose valuable mail one day)
        + Supports four mailfolder standards: single file folders (standard
          and nonstandard VNIX format), directory folders that contain one file
          per message, or the similar MH directory folders (numbered files)
        + Variable assignment and substitution is an extremely complete subset
          of the standard /bin/sh syntax
        + Provides a mail log file, which logs all mail arrival, shows
          in summary whence it came, what it was about, where it went (what
          folder) and how long (in bytes) it was
        + Uses this log file to display a wide range of diagnostic and error
          messages (if something went wrong)
        + Does not impose *any* limits on line lengths, mail length (as long
          as memory permits), or the use of any character (any 8-bit character,
          including '\0' is allowed) in the mail
        + It has man pages (boy, does *it* have man pages)
        + Procmail can be used as a local delivery agent with comsat/biff
          support (*fully* downwards compatible with /bin/mail); in which case
          it can heal your system mailbox, if something messes up the
          permissions
        + Secure system mailbox handling (contrary to several well known
          /bin/mail implementations)
        + Provides for a controlled execution of programs and scripts from
          the aliases file (i.e. under defined user ids)
        + Allows you to painlessly shift the system mailboxes into the
          user's home directories
        + It runs on virtually all (old and future) operating systems which
          names start with a 'U' or end in an 'X' :-) (i.e. extremely portable
          code; POSIX, ANSI C and K&R conforming)
        + Is clock skew immune (e.g. in the case of NFS mounted mailboxes)
        + Can be used as a general mailfilter for whole groups of messages
          (e.g. when called from within sendmail.cf rules).
        + Works with (among others?) sendmail, smail, MMDF and mailsurr

Feature summary for formail:
        + Can generate auto-reply headers
        + Can convert mail into standard mailbox format (so that you can
          process it with standard mail programs)
        + Can split up mailboxes into the individual messages
        + Can split up digests into the individual messages
        + Can split up saved articles into the individual articles
        + Can do simple header munging/extraction
        + Can extract messages from mailboxes
        + Can recognise duplicate messages

Feature summary for lockfile:
        + Provides NFS-secure lockfiles to shell script programmers
        + Gives normal users the ability to lock their system mailbox,
          regardless of the permissions on the mail-spool directory

another suggestion was with elm-filters or with Slocal (part of MH).

Thank you everyone for helping me.

Regards

Carsten...

PS: I got it working with procmail

---
                                  _\\|//_ 
                                 (` 0-0 ')
+------------------------------o00--(_)--00o----------------------------------+
! Carsten Moll                               email: carsten.moll@hamilton.de  !
! hamilton GmbH                              Tel:   (+49)7071/7002-39         !
! Waldhoernlestr. 18                         Fax:   (+49)7071/7002-49         !
! 72072 Tuebingen, Germany                                                    !
+-----------------------------------------------------------------------------+



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:06 CDT