ignore-spam v1.1 ================ (C) Christian Alice Scarborough (ccs95@aber.ac.uk) 1996 (Yes, Christian is a girl's name, too) Released under the GNU punlic licence - see file COPYING for details Abstract -------- ignore-spam is a program that prevents you from receiving email from sites known to harbour Internet spammers. It seems that those who send unsolicited email are not concerned about whether it is actually wanted or not. Sadly it's impossible to know beforehand whether any piece of email consititutes spam without actually reading it, but once you do know, there's now a way to prevent yourself ever receiving mail from that machine again. Hopefully if enough people do this, the spammers will understand that their mail is never seen, so the whole exercise becomes counter-productive and hopefully stops. Prerequisites ------------- ignore-spam requires Perl 5 and sendmail to be installed on your mailserver. It expects to run in a UNIX environment, but may work in other systems. A mail filtering program is also required, and you will need a text editor to alter the configuration files. If you need to know more about mail filtering and how it works, please look at Nacy McGough's Mail Filtering FAQ at http://www.jazzie.com/ii/faqs/archive/mail/filtering-faq/ Disclaimer ---------- ignore-spam is provided completely free of charge for use within commericial and non-comercial organisations as a service to the Internet community. It is provided AS IS, without any warranties implicit or otherwise, It should be considered UNSUPPORTED, and I am unlikely to be doing any further development on it. Installation ------------ Installation is a three stage process. First edit the ignore-spam program, and change the variables at the top of the script to suit your personal environment. In particular, you should change the password that people can use to contact you. To disable the password option, you should put the names of spamming hosts in the spam-reject file rather than the spam-hosts file (see below for details). Next edit the config files so that they reflect the sites/people you do / do not wish to hear from. The four files contain the following spam-hosts hostnames of sites that have sent you spam email, one per line. The file distributed with ignore-spam contains examples of sites known to send out spam. spam-approved email addresses of people you don't mind hearing from. For example, suppose you had xxx.yyy.com in your spam-hosts file, since you have received spam from them in the past, but your friend Fred happens to send you mail from the site from time to time. You would then put his email address (fred@xxx.yyy.com, say) on one line of this file, and his mail will get through. spam-reject Like spam-accept, but in reverse. Any email address (or site) that you put on a line of this file will NEVER be able to send you mail, even if they include the password in the subject field. Use this file with extreme caution. spam-ignore This is the email message that people will be sent if you are ignoring them to tell them that they are being ignored. The same file gets sent whether they are on the hosts list or the reject list. You should include any password that you are using in here if you want people to be able to contact you. The final stage is to install the script. To do this, you need to be using some kind of filtering software. ignore-spam works by returning a 0 to the filter program (to indicate successful delivery) if it has intercepted the mail. Otherwise it returns a 1 (to indicate failure to deliver) which hands back control to the filtering program, which will hopefully go on to deliver the mail. Here are recipes for two popular filtering programs. If you use a different program, then you should consult your manual pages for details of how to set this up. 1) procmail Add these lines to the bottom of your .procmailrc file, replacing with the location of the program. :0:? * . | /ignore-spam 2) PP (untested) Add the following to the bottom of your .mailfilter file, replacing with the location of the program. should be the command that you normally use to deliver mail to you. For example, mine might be `unixfile "/aber/ccs95/Mail/INBOX"` but it will depend on what method you are using to read your mail. Contact your system administrator for advice if you are unsure what command to use. Note that if there is another line containing only the text "if (!delivered) {" in your .mailfilter, then this is probably the command that I'm talking about, and you should just insert the first three lines below into the .mailfilter file above this line. if (!delivered) { pipe "/ignore-spam"; } if (!delivered) { ; } Usage ----- That's all there is to it, mail will now be filtered automatically without you having to manually edit any filtering files. If you receive spam from the address user@xxx.yyy.com, then simply go to the directory where ignore-spam is stored, and type ./ignore-spam yyy.com This will add yyy.com to the spam-hosts file, and you will no longer receive email from that site (unless it's from a user in the approved file, or they supply the password). The other files need to be edited by hand if you want to change them. Mail loops ---------- ignore-spam should not cause mail loops, since it will not send replies to the same address more than three times in any one day. Keeping your hosts file updated ------------------------------- Scott Hazen Mueller maintains a list of sites known to be spamming which is compatible with ignore-spam. If you download this list from time to time, and copy it on top of your spam-hosts file, then the banning of rogue sites becomes an automatic business. The file is available from the anti-spam site at http://www.vix.com/spam Revision History ---------------- v1.1 - December 10th 1996 o ignore-spam now searches more aggressively for spam addresses o slightly better detection of reply addresses o It's now possible to use substrings in the approved and reject files, so if you wanted to never receive mail from anyone at xxx.net, unless it was from anyone using yyy.xxx.net then you could add the line xxx.net to your spam-reject file, but place yyy.xxx.net in your spam-approved file. v1.0 - November 23rd 1996 o Initial release Legal Gibberish --------------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.