Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Filtering Spam With Evolution And Spamassassin, How to filter SPAM with your client.
hughesjr
post Nov 23 2003, 02:08 PM
Post #1


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



This covers how to filter SPAM using Ximian Evolution and Spam Assassin on a GNU/Linux Distro. It is for users who retrieve their E-mail from their ISP (using Ximian Evolution as their e-mail client) and don't have the ability to setup their E-mail server to use Spam Assassin.

(Administrator's who run a Linux e-mail solution should see the Spam Assassin website to setup SpamAssassin with an MTA.)
----------------------------------------------------------------------------------------
First, you need to have Ximian Evolution installed on your system. Almost every recent distrubution of GNU/Linux has a copy of Evolution included. Install the version for your distro. These instructions should work for any version of Evolution greater than 1.2. Set up your mail account using the instructions provided by Ximian.

Next, you need to download the latest version of SpamAssassin and install it. Most recent distributions of GNU/Linux also contain Spam Assassin.

Once you have good install of SpamAssassin, use this Configuration Tool to make a new /etc/mail/spamassassin/local.cf for system wide mail ... you can also use the file generated by the configuration tool in your ~user/.spamassassin/user_prefs file (where user is your login ID for the linux system) if you don't have write access to /etc/mail/spamassassin/.

Once you have a good configuration for Spam Assassin, we need to figure out where the execuable is on your system by using the command (in a terminal window):

which spamassassin

The result on my Debian SID intallation was:

/usr/bin/spamassassin

Your location may be different....

Now we need to create text file using your favorite editor ... and add the following line in the file:

/usr/bin/spamassassin -e

(you will need to substitute your actual path obtained above for /usr/bin/spamassassin)

Now, save the file to a location where you can execute it. If you want other users to execute this as well, place it into a location that they also have access to. As the root user, I saved my file as /usr/local/bin/spam-filter.sh.

Now we need to change the mode of the file so it can be executed .... use this command:

chmod 755 /usr/local/bin/spam-filter.sh

(if you choose another path, substitute it for /usr/local/bin/spam-filter.sh)

Now, open Evolution and select Tools from the menu then select Filters. Now click the Add button.

In the name block, type what you would like to name the filter ... I used FilterSpam.

In the If block, click the first dropdown box (usually it defaults to sender) and select Pipe Message to Shell Command. Enter the full path to your spam-filter.sh file (in my case /usr/local/bin/spam-filter.sh) for the shell command .

In the second box (default is normally contains) select Does Not Return.

In the third block (a text box) type the number 0.

Now, in the Then block, select the option you want ... I picked Move to Folder and clicked on <click here to select folder> and created a new folder called SPAM.

(you could also select delete instead of move to folder ... I just move the e-mails and delete them later ... sometimes a mail I want to keep gets in there...).

Now you should be filtering SPAM...

You may have some items that get filtered that you want to keep...or some that stay in your inbox that you want removed. In the file ~user/.spamassassin/user_prefs (substitute your login ID for user) you can add a blacklist_from entry to filter mail that stayed in your inbox and a whitelist_from entry to allow mail that was accidentially filtered.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st November 2017 - 07:15 AM