procmail
[Top] [All Lists]

thwarting email spam with usenet origins

1997-04-07 05:34:00
I use Gnus to read newsgroups and mailing lists, and MH for everything
else.  I like the way the Gnus manual suggests dealing with spam, but
would like to use procmail to accomplish this instead of the Gnus mail
splitting functions.  I wonder if anyone has accomplished this or
something very similar with procmail already.  I think the approach
makes alot of sense.  The excerpt below is taken from the Gnus 5.4.42
manual at http://www.gnus.org/manual/gnus.html.

In summary, it shows how to filter all mail sent to a certain e-mail
address that doesn't have a Subject that starts with a `Re:' or a
References header to a `spam' file.  It also shows how to file
messages that don't explicitly include your e-mail address in the To
header into that same `spam' file.

[...]

Thwarting Email Spam

In these last days of the Usenet, commercial vultures are hanging about and
grepping through news like crazy to find email addresses they can foist off
their scams and products to. As a reaction to this, many people have started
putting nonsense addresses into their From lines. I think this is
counterproductive--it makes it difficult for people to send you legitimate
mail in response to things you write, as well as making it difficult to see
who wrote what. This rewriting may perhaps be a bigger menace than the
unsolicited commercial email itself in the end.

The biggest problem I have with email spam is that it comes in under false
pretenses. I press g and Gnus merrily informs me that I have 10 new emails.
I say "Golly gee! Happy is me!" and selects the mail group, only to find two
pyramid schemes, seven advertisements ("New! Miracle tonic for growing full,
lustrouos hair on your toes!") and one mail asking me to repent and find
some god.

This is annoying.

The way to deal with this is having Gnus split out all spam into a `spam'
mail group (see section Splitting Mail).

First, pick one (1) legal mail address that you can be reached at, and put
it in your From header of all your news articles. (I've chosen
`larsi(_at_)trym(_dot_)ifi(_dot_)uio(_dot_)no'.)

(setq message-default-news-headers
      "From: Lars Magne Ingebrigtsen 
<larsi(_at_)trym(_dot_)ifi(_dot_)uio(_dot_)no>\n")

Then put the following split rule in nnmail-split-fancy (see section Fancy
Mail Splitting):

(
 ...
 (to "larsi(_at_)trym(_dot_)ifi(_dot_)uio(_dot_)no"
      (| ("subject" "re:.*" "misc")
         ("references" "(_dot_)*(_at_)(_dot_)*" "misc")
         "spam"))
 ...
)

This says that all mail to this address is suspect, but if it has a Subject
that starts with a `Re:' or has a References header, it's probably ok. All
the rest goes to the `spam' group. (This idea probably comes from Tim
Pierce.)

In addition, many mail spammers talk directly to your smtp server and do not
include your email address explicitly in the To header. Why they do this is
unknown--perhaps it's to thwart this twarting scheme? In any case, this is
trivial to deal with--you just put anything not addressed to you in the
`spam' group by ending your fancy split rule in this way:

(
 ...
 (to "larsi" "misc")
 "spam")

In my experience, this will sort virtually everything into the right group.
You still have to check the `spam' group from time to time to check for
legitimate mail, though. If you feel like being a good net citizen, you can
even send off complaints to the proper authorities on each unsolicited
commercial email--at your leisure.

This works for me. It allows people an easy way to contact me (they can just
press r in the usual way), and I'm not bothered at all with spam. It's a
win-win situation. Forging From headers to point to non-existant domains is
yucky, in my opinion.

[...]

--
Jason R. Mastaler                                 jason(_at_)mastaler(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>
  • thwarting email spam with usenet origins, Jason R. Mastaler <=