summaryrefslogtreecommitdiff
path: root/libc/msdos/xxx/mailfilter-mh.html
diff options
context:
space:
mode:
Diffstat (limited to 'libc/msdos/xxx/mailfilter-mh.html')
-rw-r--r--libc/msdos/xxx/mailfilter-mh.html86
1 files changed, 0 insertions, 86 deletions
diff --git a/libc/msdos/xxx/mailfilter-mh.html b/libc/msdos/xxx/mailfilter-mh.html
deleted file mode 100644
index f7d4fb9..0000000
--- a/libc/msdos/xxx/mailfilter-mh.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!-- X-URL: http://www.cs.helsinki.fi/~wirzeniu/mailfilter-mh.html -->
-<BASE HREF="http://www.cs.helsinki.fi/~wirzeniu/mailfilter-mh.html">
-
-<html>
-<head>
-<title>Saving the outgoing addresses automatically</title>
-</head>
-<body>
-
-<h1>Saving the outgoing addresses automatically</h1>
-
-<p>I have a <a href="mailfilter.html">anti-junk mail filter</a>, which
-uses a whitelist of people I know and want mail from. Maintaining this
-list by hand is tiresome, so I have automated it.
-
-<p>I have configured MH to run a small script for each letter that I
-send. This is easy to do: edit <code>~/.mh_profile</code> to include
-a line like the following:
-
-<blockquote><pre>
-postproc: /home/liw/bin/xtract-to-and-post
-</pre></blockquote>
-
-This instructs MH to run the specified command for each outgoing letter.
-The letter will be given as input to it.
-
-<p><code>xtract-to-and-post</code> is a simple shell script:
-
-<blockquote><pre>
-#!/bin/sh
-
-PATH=$PATH:$HOME/bin
-
-greylist=$HOME/.procmail/greylist
-whitelist=$HOME/.procmail/whitelist
-lock=$greylist.lock
-
-x=''
-for i in "$@"
-do
- x="$i"
-done
-
-if test -r "$x"
-then
- if lockfile $lock
- then
- xtract-to-cc &lt; "$x" | sort -fu -o $greylist $greylist -
- rm -f $lock
- fi
-fi
-
-/usr/lib/mh/post "$@"
-</pre></blockquote>
-
-It looks more complicated than it is. Essentially it only uses
-<code>xtract-to-cc</code> to get all addresses from the To and Cc
-headers and adds them to the greylist file. There's some locking
-added to avoid concurrent updates.
-
-<p><code>xtract-to-cc</code> is a small <a
-href="http://www.python.org/">Python</a> script that prints
-out all addresses in the To and Cc headers of a mail message:
-
-<blockquote><pre>
-#!/usr/bin/python
-
-import sys
-from rfc822 import Message
-
-x = Message(sys.stdin)
-for i in x.getaddrlist('to'):
- print i[1]
-for i in x.getaddrlist('cc'):
- print i[1]
-</pre></blockquote>
-
-<p>Similar hacks can be done for other systems. If nothing else
-works, have your mailer send a copy of each sent message, and
-periodically run a suitable program to extract the addresses.
-
-<p>(9 September 1996,
-<a href="mail-to-lasu.html">Lars Wirzenius</a>)
-
-</body>
-</html>