summaryrefslogtreecommitdiff
path: root/libc/msdos/xxx/mailfilter.html
blob: 035c26e008912406301559fc5375392853715826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!-- X-URL: http://www.cs.helsinki.fi/~wirzeniu/mailfilter.html -->
<BASE HREF="http://www.cs.helsinki.fi/~wirzeniu/mailfilter.html">

<html>
<head>
<title>Lasu's mail filters</title>
</head>
<body>

<strong>Note: I've updated this page a little bit, but it still describes
the previous version of the filter. The new filter is quite similar to
the old one, but has easier configurability, and is (by default) rather
less aggressive.</strong>

<h1>Lasu's mail filters</h1>

<p>This page explains how I use procmail to filter
my mail. Perhaps the most interesting part is how I reject mail from
strangers in order to avoid getting spammed. This is not an introduction
to spam or why it's bad, or to procmail or mail filtering; see links at 
end for some suggestions, but I do assume you're able to implement the
filtering on your own.

<h2>The approach</h2>

<p>My filtering approach is like this:
<ol>
<li> If the sender is on the blacklist, delete the letter.
<li> Put mailing lists in their own folders. <em>This must be done
	correctly!</em> Otherwise the mailing list mail is treated as
	junk e-mail.
<li> Put local administrative e-mail in its own folder. I administrate my 
	own Linux
	box. This catches mail from system crontabs, news log summaries,
	and so on. (Maybe not relevant to you.)
<li> At this point, it should be personal mail. Check that the To or Cc
	headers address me. If not, delete the mail.
<li> Put bounce messages in their own mailbox.
<li> If the sender is on my whitelist:
	<ol> 
	<li> If I'm on vacation, send back automatic response.
	<li> Put the letter in inbox.
	</ol>
<li> If the subject includes password, put in special folder for 
	unknown people.
<li> Otherwise, autoreply with request to use password and delete the mail.
</ol>

<p>Instead of deleting the unwanted mail, it is also possible to just store
it in a special folder. You should do this while testing the setup, so that
you don't lose any important mail due to errors. It's best to use separate
folders for each case; I have folders no-password and new-OTHER, but feel
free to use other names.

<p>When using this scheme, it is imperative to put all addresses you send
mail to on your whitelist or else to put the password in the subject.
Otherwise, you will annoy people.  I have an automatic setup for the
MH mailer.

<h2>Problems</h2>

<p>My approach has some problems:
<ul>
<li> If someone sends you mail using the Bcc header, it will be treated as
	junk, since your address won't be visible in the To or Cc headers.
	The Bcc header is removed before the mail is sent, so there is
	no way to distinguish interesting Bcc'd messages and junk mail.
	This is not really a problem for me, because I almost never get
	Bcc'd mail, and when I do it is via one specific mailing list.
<li> Subscribing to mailing lists. You can't filter away the list until
	you know what the headers look like, so you have to turn off
	the check for personal mail until you can get the list filtering
	to work. (The new version of the filter attempts to put stuff from
	unknown mailing lists to a separate folder, but better safe than
	sorry.)
<li> Spam sent to mailing lists won't be filtered away. This is not too big 
	a problem, because many mailing lists
	now only allow subscribers to post to avoid spam.
<li> Not all bounce messages are filtered correctly. Unfortunately, there
	are about as many bounce message formats as there are mail
	transport programs. This is a real problem, because it's not
	really a good idea to not lose bounce messages. It also opens
	a glaring hole, because spammers can make their junk look like
	bounce messaages.
<li> If the filter starts acting up, you'd better know Procmail, or be
	prepared to drop it at once.
</ul>

<h2>Alternative methods</h2>

<p>Many ways to fight junk mail have been proposed. Below is a list of
a few of them and the reasons why I don't do that.

<ul>

<li><strong>Just delete them.</strong>
This is what I've been doing. It takes time to read enough of a letter
	to positively identify it as junk. Not a whole lot of time, but
	doing something unproductive several times a day is not fun.
	It is annoying and lowers my work morale. I do computers because
	it's fun, and junkmail makes it not fun.

<li><strong>Complain to sender or in public.</strong>
This takes time. I don't want to spend time on dealing with junk.
Using tools to automate most of the complaint process is not good
enough, since no tool is able to decode forged headers completely,
and sending the complaints to the wrong address is <em>wrong</em>.

<li><strong>Just filter away known baddies.</strong>
I won't know who they are, unless I get the mail, and by then it's too
	late. Actually, I could read suitable newsgroups and mailing lists
	and find reports of spammers, but again, it takes time I don't want
	to spend. It also never ends, since the most persistent spammers 
	change accounts often, and there are hordes of new spammers on
	the horizon.

<li><strong>Use a service that removes your address from spammers' lists.</strong>
Which one? How do I know they're reputable? What guarantee do I have that
	the spammers use the services? Also, many of them have
	been shown to be just another way to harvest e-mail addresses.

<li><strong>Use a munged mail address in public.</strong>
This causes postmasters (the people who keep the mail systems running)
extra work. Not polite, and counter-productive on the long run.

</ul>

<h2>Related links</h2>
<ul>
<li> <a href="mailfilter2.tar.gz">My mail filter</a>.
<li> <a href="mailfilter-mh.html">My MH setup to automatically put addresses
	I send to to the whitelist.</a>
<li> <a href="ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/procmail.tar.gz">Procmail source code</a>,
	if you system doesn't have procmail installed.
<li> <a href="http://www.jazzie.com/ii/faqs/archive/mail/filtering-faq/">Mail Filtering FAQ</a>,
	for more information about mail filtering in general.
</ul>

<h2>Feedback</h2>

<p>I'd be glad to hear any suggestions on how this filtering scheme
can be improved. Don't hesitate to tell me if you have ideas on solving
the above problems or if you can think of a new problem. I'd also be
grateful if tell me if you use this filtering scheme so that I can tell
you about important updates. I'd also like to hear of alternative filtering
schemes, especially for people using non-Unix systems. Follow the link
at the bottom before mailing, so you'll know how to avoid my filtering.

<p>(22 September 1997,
<a href="mail-to-lasu.html">Lars Wirzenius</a>)

</body>
</html>