procmail
[Top] [All Lists]

ANNOUNCE: pointer to Procmail tips page

1998-08-31 17:15:14
        This is a regular posting twice a month: approx. 1st and 16th day

        In addition to Era's procmail pages at

            <URL:http://www.iki.fi/~era/procmail/>
            <URL:http://www.iki.fi/~era/procmail/links.html>

        there is document that evolved when I joined the world of procmail.
        I wanted to know all about it and learn all the features that were
        not so well documented before. thanks to all the helpfull people and
        past articles, the procmail tips page was born. It contains tons of
        examples from the procmail archive that I waded through many weeks
        before I found those shining gems that makes your procmail a little
        bit easier.

        You can read the document (+500K .txt) from my University's ftp
        server; but the connection may be slow and you may get busy signal
        "connection refused". I suggest that you print the html page
        to printer and read it with coffee pan near you.

            <URL:ftp://cs.uta.fi/pub/ssjaaa/pm-tips.html>
            <URL:ftp://cs.uta.fi/pub/ssjaaa/pm-tips.txt>

        Alternatively, you can get it by sending email message to
        File Server:

            mailto:<jari(_dot_)aalto(_at_)poboxes(_dot_)com>
            Subject: send pm-tips.txt           Try "send help" too

        You can convert the .txt file to .html file with the Perl script
        t2html.pl which is also available from the File Server or at
        the ftp dir

           <URL:ftp://cs.uta.fi/pub/ssjaaa/t2html.html>

        May your journey with procmail be easier now on :-) All my sincere
        thanks goes to people that helped me to understand procmail when I
        was a real green:

        .[aaron]    Aaron Schrab        <aaron+procmail(_at_)schrab(_dot_)com>
        .[alan]     Alan K. Stebbens    
<aks(_at_)anywhere(_dot_)engr(_dot_)sgi(_dot_)com>
        .[dan]      Daniel Smith        <dan(_at_)bristol(_dot_)com>
        .[david]    David W. Tamkin     <dattier(_at_)msc(_dot_)net>
        .[ed]       Edward J. Sabol     
<sabol(_at_)alderaan(_dot_)gsfc(_dot_)nasa(_dot_)gov>
        .[elijah]   Eli the Bearded     
<process(_at_)qz(_dot_)little-neck(_dot_)ny(_dot_)us>
        .[hal]      Hal Wine            <hal(_at_)dtor(_dot_)com>
        .[phil]     Philip Guenther     <guenther(_at_)gac(_dot_)edu>
        .[sean]     Sean B. Straw       
<PSE-L(_at_)mail(_dot_)professional(_dot_)org>
        .[timothy]  Timothy J Luoma     
<luomat+procmail(_at_)luomat(_dot_)peak(_dot_)org>
        .[walter]   Walter Dnes         <waltdnes(_at_)interlog(_dot_)com>

pm-tips.txt Table of contents 1998-08-20 v1.51


        1.0 Document id
            1.1 General
            1.2 Abbreviations and thanks
            1.3 Version information
            1.4 Document layout
            1.5 About presented recipes
            1.6 Variables used in recipes
            1.7 About "useless use of cat award"
            1.8 Sending improvements
            1.9 What is Procmail?

        2.0 UBE in Internet
            2.1 Terms used and foreword
            2.2 UBE strategies
            2.3 UBE and bouncing message back
            2.4 UBE and "I don't mind" attitude
            2.5 We need a law against UBE

        3.0 Anti-UBE pointers
            3.1 NoCEM, CAUCE and others
            3.2 General Filtering pages (more than procmail)
            3.3 Junk email and spam
            3.4 Comprehensive list of spammers
            3.5 Misc pointers
            3.6 Questionable UBE stop services
            3.7 UBE related newsgroups or mailing lists
            3.8 Software: yell -- perl
            3.9 Software: RBL lookup tool -- C
            3.10 Software, mapSoN
            3.11 Software: spamgard
            3.12 Software: Spam Be Gone
            3.13 Software: ifile - Perl

        4.0 Procmail pointers
            4.1 Procmail discussion list
            4.2 To get off the procmail discussion list
            4.3 Procmail Lint service (code check)
            4.4 Procmail module list
            4.5 General procmail pointers
            4.6 Where to get Procmail code and libraries
            4.7 Procmail code to filter UBE
            4.8 SmartList code (mailing list implementation with procmail)

        5.0 Dry run testing
            5.1 What is dry run testing
            5.2 Why the From field is not okay after dry run
            5.3 Getting default value of a procmail variable

        6.0 Things to remember
            6.1 Get the newest procmail
            6.2 Csh's tilde is not supported
            6.3 Be sure to write the recipe start right
            6.4 Always set SHELL
            6.5 Check and set PATH
            6.6 Keep the log on all the time
            6.7 Never add a trailing slash for directories
            6.8 Remember what term DELIVERED means
            6.9 Beware putting comment in wrong place
            6.10 Brace placement
            6.11 Local lockfile usage
            6.12 Global lockfile
            6.13 Gee, where do I put all those ! * $ ??
            6.14 Sending automatic reply, use X-loop header
            6.15 Avoid extra shell layer (check command for SHELLMETAS)
            6.16 Think what shell commands you use
            6.17 Using absolute path when calling a shell program
            6.18 Disabling recipe temporarily

        7.0 Procmail flags
            7.1 The order of the flags
            7.2 Flag w and recipe with |
            7.3 Flag w, lockfile and recipe with |
            7.4 Flag f and w together
            7.5 Flags h and b
            7.6 Flag h and sinking to /dev/null
            7.7 Flag i and pipe flag f
            7.8 Flag r
            7.9 Flag c's background
            7.10 Flag c before nested block forks a child
            7.11 Flags before nested block
            7.12 Flags aAeE tutorial

        8.0 Matching and regexps
            8.1 Matches are not case sensitive
            8.2 Procmail uses multiline matches
            8.3 Headers are folded before matching
            8.4 Improving Space-Tab syndrome
            8.5 Rules for generating a character class
            8.6 Matching space at the end of condition
            8.7 Beware leading backslash
            8.8 Correct use of TO Macro
            8.9 Procmail's regexp engine
            8.10 Procmail and egrep differences
            8.11 Undesrtanding procmail's minimal matching (stingy vs. greedy)
            8.12 Explaining \/ and ()\/
            8.13 Explaning  ^^ and ^
            8.14 ANDing traditionally
            8.15 ORing traditionally
            8.16 ORing and score recipe
            8.17 ORing by using De Morgan rules

        9.0 Variables
            9.1 Setting and unsetting variables
            9.2 Variable initialisation and sh syntax
            9.3 Testing variables
            9.4 What is construct $\VAR in procmail 3.11
            9.5 Common pitfalls when using variables
            9.6 Quoting: Using single or double quotes
            9.7 Quoting: Passing values to an external program
            9.8 Passing values from an external program
            9.9 Incrementing a variable by a value N
            9.10 Comparing values
            9.11 Strings: How many characters are there in a given string?
            9.12 Strings: How to strip trailing newline.
            9.13 Strings: deriving the last N characters of a string.
            9.14 Strings: Getting partial matches from a string.
            9.15 Strings: Procmail string manipulation example
            9.16 How to raise a flag if the message was filed
            9.17 Dollar sign in condition lines.
            9.18 Finding mysterious foo variable
            9.19 Storing code to variable
            9.20 Getting headers into a variable.
            9.21 Converting value to lowercase

        10.0 Suggestions and miscellaneous
            10.1 Speeding up procmail
            10.2 See the procmail installation's examples
            10.3 Printing statistics of your incoming mail
            10.4 Storing UBE mailboxes outside of quota
            10.5 Gzipping messages
            10.6 Using first 5-30 lines from the message
            10.7 Using cat or echo in scripts?
            10.8 How to run an extra shell command as a side effect?
            10.9 Forcing "ok" return status from shell script
            10.10 Make your own .procmailrc available to others
            10.11 Using dates efficiently
            10.12 Keep message backup, no matter what
            10.13 Keep simple header log
            10.14 Emergency stop for your .procmailrc

        11.0 Scoring
            11.1 Using scores by an example
            11.2 Brief Score tutorial
            11.3 Score's scope
            11.4 Counting length of a string
            11.5 Counting lines in a message (Adding Lines: header)
            11.6 Determining if body is longer than header
            11.7 Matching last Received header
            11.8 How to add Content-Length header
            11.9 Processing messages shorter than N lines
            11.10 Counting commas with recursive includerc

        12.0 Formail usage
            12.1 Always use formail's -rt switch
            12.2 Using -rt and rewriting the From address
            12.3 Formail -rt and Resent-From header
            12.4 Quoting the message
            12.5 Without quoting the message
            12.6 How to include headers and body to the reply message
            12.7 Adding text to the beginning of message
            12.8 Adding text to the end of message
            12.9 How to truncate headers (save filing space)
            12.10 Adding extra headers from file
            12.11 Extracting all From addresses from mailbox
            12.12 Applying procmail recipe on whole mailbox
            12.13 Splitting digest
            12.14 Making formail to run series of commands for each mail
            12.15 Option -D and cache
            12.16 Option -D and message-id in the body
            12.17 Reducing formail calls (conditionally adding fields)
            12.18 Formail -A -a options
            12.19 Formail -e -s options

        13.0 Saving mailing list messages
            13.1 Using subroutine pm-jalist.rc to detect mailing lists
            13.2 Using plus addressing foo+bar(_at_)address(_dot_)com
            13.3 Using RFC comment trick for additional information
            13.4 Simple mailing list handling
            13.5 Archiving according to TO
            13.6 Using Return-Path to detect mailing lists

        14.0 Procmail, MIME and HTML
            14.1 Mime Bibliography
            14.2 Mime notes
            14.3 Software to deal with mime or html
            14.4 Mime content type application/ms-tnef
            14.5 Trapping html mime messages
            14.6 Complaining about html messages
            14.7 Getting rid of unwanted mime attachements (html, vcard)
            14.8 Sending contents of a html page in plain text to someone

        15.0 Simple recipe examples
            15.1 Saving: MH folders -- numbered messages
            15.2 Saving: to monthly folders
            15.3 Modifying: Filtering basics
            15.4 Modifying: Squeezing empty lines around message body
            15.5 Service: Auto answerer to empty messages
            15.6 Service: Ping responder
            15.7 Service: simple vacation with procmail
            15.8 Service: vacation code example
            15.9 Service: Auto-forwarding
            15.10 Service: forward only specific messages
            15.11 Service: Making digests
            15.12 15.12: Kill: killing advertisement headers and footers
            15.13 Kill: simple killfile recipe with procmail
            15.14 Kill: duplicate messages
            15.15 Kill: spam filter with simple recipes
            15.16 Kill: (un)subscribe messages
            15.17 Time: Once a day cron-like job
            15.18 Time: Running a recipe at a given time
            15.19 Time: Triggering email and using cron
            15.20 Decoding: Uudecode
            15.21 Decoding: MIME
            15.22 How to send commands in the message's body
            15.23 Matching two words on a line, but not one
            15.24 How to define personal XX macros?
            15.25 How to change subject by body match
            15.26 How to change Subject according to some other header
            15.27 How to call program with parameters

        16.0 Miscellaneous recipes
            16.1 Sending two files in a message
            16.2 Excessive quoting of message
            16.3 Sending message to pager in chunks
            16.4 Playing particular sound when message arrives
            16.5 Combining multiple Original-Cc and Original-To headers
            16.6 Forwarding sensitive messages in encrypted format

        17.0 Procmail and PGP
            17.1 Decrypt pgp messages automatically
            17.2 Getkeys from keyserver
            17.3 Auto grab incoming pgp keys

        18.0 Includerc usage
            18.1 Using: multiple rc files
            18.2 Using: You can call rc file conditionally
            18.3 Making: naming of the rc file
            18.4 Making: Using namespace when saving procmail variables
            18.5 Making: Public and private variables in rc file
            18.6 The rules of thumb for constructing general purpose rc file
            18.7 An includerc skeleton

        19.0 Mailing list server
            19.1 Mailing list server pointers
            19.2 Simple Mailing list server

        20.0 Common troubles
            20.1 Procmail as mail filtering device
            20.2 My ISP isn't very interested in installing procmail
            20.3 My ISP has systemwide procmailrc; is this a good idea?
            20.4 Procmail changes mailbox and directory permissions
            20.5 Changing mbox permission during compilation to 660
            20.6 The .forward file must be real file
            20.7 Mail should be put in the mailqueue if write fails
            20.8 Qmail: Procmail looks file from /var/spool/mail only
            20.9 Qmail: patch to procmail 3.11pre7 to work with Maildirs
            20.10 AFS: How to use Procmail when HOME is in AFS cell
            20.11 Help, some idiot sent my address to 30 mailing lists
            20.12 Help, Procmail beeps and prints to my console
            20.13 Help, procmail dumps mail to console
            20.14 Help, corrupted From_ line in mailbox
            20.15 Directing user's mail to HOME instead of /var/spool/
            20.16 NFS mounting /var/mail is a good way to get bad performance
            20.17 I can't see the sendmail's response in LOGFILE
            20.18 Compiling procmail and choosing locking scheme
            20.19 Forwarding lot of mail causes heavy load
            20.20 What happens to mail if MDA Procmail fails
            20.21 Procmail reads entire 90Mb message into memory
            20.22 Help, procmail uses occasionally huge chunk of memory
            20.23 Variables DEFAULT and ORGMAIL
            20.24 When DEFAULT cannot be mailed to
            20.25 Variable DROPPRIVS
            20.26 Variable HOME
            20.27 Variable HOST
            20.28 Variable LINEBUF
            20.29 Variable LOG and LOGFILE
            20.30 Variable TRAP
            20.31 Variable UMASK
            20.32 Performance difference between backtick and "|" recipe
            20.33 Procmail's temporary file names while writing file out
            20.34 Parameter $@
            20.35 Procmail variables are null terminated (detecting null string)
            20.36 FROM_DAEMON TO and TO_ and case-sensitiveness
            20.37 TO_ macro deciphered
            20.38 TO_ macro and RFC 822
            20.39 FROM_DAEMON deciphered

        21.0 Technical matters
            21.1 List of exit codes
            21.2 List of precedence codes
            21.3 Sendmail and -t
            21.4 RFC22 Reply-To and formail problem with multiple recipients
            21.5 Procmail and IMAP server
            21.6 Machine which processes mail
            21.7 Compiling procmail and MAILSPOOLHOME

        22.0 Procmail version notes: features and bugs, patches
            22.1 Procmail doesn't allow filing to multiple mboxes
            22.2 No multiple swithes in SENDMAILFLAGS
            22.3 TIMEOUT has its pecularities
            22.4 Variable capture |= is unreliable
            22.5 Forwarding with ! token and -t switch
            22.6 V3.10 regexps bug
            22.7 V3.10-3.11pre7: FROM_MAILER has changed
            22.8 V3.11pre5-pre6 are dangerous
            22.9 V3.11pre7 has different flag c handling
            22.10 V3.11pre7 and MATCH strips all leading blank lines in body
            22.11 V3.11pre7 has a MATCH bug
            22.12 V3.11pre7 has stingy-greedy MATCH bug
            22.13 Patch: limit what binaries can be executed by procmail
            22.14 Patch: correcting mailspoolhash
            22.15 Patch: formail -rtzxTo and tab character trouble

        23.0 Smartlist
            23.1 Installation trouble: getparams

        24.0 Additional procmail or MUA software
            24.1 Comstat to handle multiple mailboxes
            24.2 Elm and pgp support (Mutt)
            24.3 MH sites

        25.0 Additional procmail software for Emacs
            25.1 What is Emacs
            25.2 Emacs and procmail mode and Lint
            25.3 Emacs and lining up backslashes
            25.4 Emacs and browsing mailbox files
            25.5 Emacs and live-find-file.el
            25.6 Emacs and font-lock.el

        26.0 Procmail, Emacs and Gnus
            26.1 Gnus pointers
            26.2 Why use procmail with Gnus
            26.3 Setting up gnus for procmail - Basics
            26.4 Gnus for procmail - More gnus
            26.5 Emacs and Gnus -- Fiddling with spool files
            26.6 Gnus and article snippets
            26.7 Emacs GNUS - POP - Procmail

        27.0 RFC, Request for comments
            27.1 RFCs and their jurisdiction (munged Addresses)
            27.2 Comments about addresses munging
            27.3 RFC and valid email address characters
            27.4 RFC and login-name(_at_)fdqn
            27.5 RFCs and message's signature
            27.6 Some RFC Pointers

        28.0 Introduction to E-mail Headers
            28.1 To find out more about email (Resources)
            28.2 Lecture by Alan Stebbens
            28.3 Applied to received messages
            28.4 Bcc lecture by Alan Stebbens
            28.5 Bcc lecture by Philip Guenther

        29.0 Message's headers
            29.1 What is correct From address syntax
            29.2 What's that X-UIDL header?
            29.3 From_ is the envelope sender
            29.4 Message-Id
            29.5 Received header
            29.6 X-Subscription-Info
            29.7 Reply-To header
            29.8 Mail-Copies-To header
            29.9 Mail-Followup-To and Reply-To-Personal headers
            29.10 Content-Length header and From_ specification

        30.0 Other interesting code
            30.1 Misc email related pointers
            30.2 Expire mail pointers
            30.3 Usenet News related pointers
            30.4 Html layout of the Code sections
            30.5 Code: Perl Extract procmail man pages from 
procmail-3.11pre7.tar.gz
            30.6 Code: Sh remove matching lines from file

<Prev in Thread] Current Thread [Next in Thread>
  • ANNOUNCE: pointer to Procmail tips page, jari.aalto <=