diff options
author | Robert de Bath <rdebath@poboxes.com> | 1998-02-12 22:41:49 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:40:21 +0200 |
commit | 2f828530e36a02c5b4c534e42ab812370c2bf7d9 (patch) | |
tree | c26ea035d122f5374ed4c9ef39c6748742541ef5 /libc/msdos/xxx/mailfilter-mh.html | |
parent | 48f0b3eb836162d41622cedc1eb5f5168168fb8e (diff) | |
download | dev86-2f828530e36a02c5b4c534e42ab812370c2bf7d9.tar.gz |
Import Dev86src-0.14.0.tar.gzv0.14.0
Diffstat (limited to 'libc/msdos/xxx/mailfilter-mh.html')
-rw-r--r-- | libc/msdos/xxx/mailfilter-mh.html | 86 |
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 < "$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> |