nmh-workers
[Top] [All Lists]

Re: information about filtering mail and exmh/nmh

1998-02-16 11:26:58
On 13 February 1998 at 17:18, Richard Coleman 
<coleman(_at_)math(_dot_)gatech(_dot_)edu> wrote:
The following is a copy of the file MAIL.FILTERING that I'm
adding to the next nmh distribution.

Thanks for doing this, Richard.  (Adding info about procmail to the
online "MH & nmh" book has been on my list for years, but I've never
gotten around to it.)  I've made some minor tweaks in the comments
and I've changed one egrep pattern to show more of what procmail can do.
I'll attach a diff.

Jerry
--- /tmp/orig   Sat Feb 14 09:48:21 1998
+++ /tmp/edited Sat Feb 14 10:03:01 1998
@@ -1,6 +1,6 @@
 It is a common practice when using nmh to filter your inbound mail
 directly into nmh folders.  There are several programs which allow you
-to do this, of which two commons ones are procmail and slocal.
+to do this, of which two common ones are procmail and slocal.
 
 The slocal command is part of the nmh distribution.  It is a fairly
 simple mail filtering program.  Check the slocal man page for an example
@@ -37,14 +37,17 @@
 are not the same as the originals.
 
 Here is a typical .procmailrc file for using procmail in conjunction
-with nmh.
+with nmh.  For more information, see the manual pages for procmail,
+procmailrc and procmailex.
 
 ###################################################################
 # .procmailrc
 ###################################################################
-# To use procmail, put the next line in .forward
-# "|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #coleman"
-# The double quotes should not be removed.
+# To use procmail, put the next line in your .forward file:
+# "|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #XXX"
+# Do not remove the double quotes.  Change XXX to your username.
+# Edit path to procmail above, and the VARIABLES below, as needed.
+# Adapt the MAILING LIST section below for lists you subscribe to.
 # Your .forward needs to be world-readable, but not world-writable.
 ###################################################################
 # This .procmailrc is written for use with nmh/mh/exmh/mh-e
@@ -79,7 +82,7 @@
 * ^TOexmh
 | rcvstore +exmh
 
-# Don't add junk to "unseen" sequence
+# Catch junk.  Don't add it to "unseen" sequence (nmh only)
 :0 w: junk/$LOCKEXT
-* ^TOjunk
+* ^(reply-to|from|sender):.*(spammer|flamer|evil-host)
 | rcvstore -nounseen +junk
Jerry Peek, jpeek(_at_)jpeek(_dot_)com, http://www.jpeek.com/~jpeek/
  [NOTE: If jpeek.com refuses your email (sorry!), use 
jpeek(_at_)ix(_dot_)netcom(_dot_)com]
<Prev in Thread] Current Thread [Next in Thread>