Stopping Spam with Procmail & SpamAssassin.

Written by Niall Donegan

Like any email account your skynet email account can (if you're not careful) recieve a lot of spam ie. Unsolicited Email. It is possible to stop the majority of this quite simply using two programmes called Procmail and Spam-Assassion

Create a file called .procmailrc in /mailconfig/$your_username. In this file you put in the following lines.

PATH=/bin:/usr/bin:
VERBOSE=off
MAILDIR=/var/mail/$LOGNAME/
:0fw
| /usr/bin/spamc
:0:
* ^X-Spam-Status: Yes
.SPAM/

Spam-Assassin (spamc) is a program installed on skynet which will process all your email. If the email satisfies certain criteria, the X-Spam-Flag will be set to 'Yes'. All these emails will then be sent to an email folder called SPAM.

To view what is put into this folder, open pine and go to "FolderList" and press Enter. Use you arrow keys to go to SPAM and press enter. This folder will contain all the email that has been marked as spam.

Of course procmail can be used for a lot more than this. For more examples type "man procmailex" at the command prompt.

Links:
Further procmail examples for Skynet's setup
Procmail Homepage

 



Skynet - University of Limerick Computer Society
XHTML 1.1 :: CSS 2 :: 508 :: © 2009
Disclaimer: Neither Skynet administration nor University of Limerick accept responsibility for users site content.