SpamAssassin is, as the name would suggest, a tool for weeding out spam. The general idea is to define several tests, give each test a positive or negative score and then filter based on that score. It comes with a wide variety of tests that make it extremely difficult for a spammer to get through. These include regular tests (such as queries against the subject line) and advanced tests such as checking forged headers and black-lists. The ability to give tests a negative score help prevent it from accidentally weeding out non-spam. (In either case, it only tags an email as spam, it doesn't actually delete it, your email program does that if you want it to)
One of spam assassins features is the ability to add additional plugins, this page section is about one of those plugins I've written to give it some more context.
PublicCheck::To is a perl plugin for Spam Assassin that can be used to give a higher "spam level" to vulnerable email addresses, such as email addresses used for mailing lists or usenet.
It works by adding a public_check_to_address public@example.com in
your spam assassin preferences file.
After you tell it which public addresses you have, (and load the plugin) you can do tests against email addressed to those addresses, it's great if you've given out your email address or had to place it on a web site. Individual users can set these addresses so you can deploy it site-wide and allow users to set their public addresses.
Optionally, the plugin can become even more powerful by conducting tests against an "In-Reply-To" header.
This is a good test to reverse the public address test, with it you can say "Email addressed to foo@example.com is probably spam, unless it is a reply".
When you send someone an email, your email system generates something known as a
Message-ID, this is supposed to be a unique string which uniquely
identifies your message.
When someone replies to your message, their email client sets another header, called "In-Reply-To", this header contains the original message ID. Typically, email software uses this information to perform threading but we can use it for other things...
If someone replies to your message with this In-Reply-To header, we can test it against message ID's that we've sent out. If the strings match, there is a high probability that the message is NOT spam. (It is most likely someone responding to your email message, that is what In-Reply-To is for.)
It has one downside, in order for this to work, you need a database of each ID you've sent out. It is most convenient to do this via your SMTP server, (or your ISP's SMTP server) by way of a system wide filter.
Because of this downside, the plugin uses something called a MidStore package,
which is a way of obtaining this information from various sources. (Included are flatfile
and mysql based modules) It shouldn't be too difficult to write one for a DBM, LDAP, etc.. as
we only need read access to the information. (Does the message ID exist? and optionally,
does the message ID exist and was it sent from the same email address?)
As a starting point... it has an insert_mid.pl
script for filtering outbound email, it's a starting point for collecting these message ID's, you
may wish to season it to taste.
We will provide support and installation services for a fee. Also, we're available for other custom perl projects.
Questions, comments or requests? Contact us