Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Evolution + SpamAssassin = less spam in your mailbox
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7214
Location: Pelotas, BR

PostPosted: Thu Dec 12, 2002 2:22 am    Post subject: Evolution + SpamAssassin = less spam in your mailbox Reply with quote

I've seen some tutorials about how to setup SpamAssassin in the client using Kmail, but not with Evolution. This method does not need server support. People with SpamAssassin installed in their servers may use the X-Spam-Flag to filter email, but those who do not have SpamAssassin installed in their mail servers and don't want to setup all the fetchmail/procmail stuff, can use the following procedure (considering that Evolution is already installed):

1. emerge Mail-SpamAssassin

2. In Evolution,
2.1 create a folder called SPAM
2.2 go to Tools, Filters, incoming filter rules, add a new Rule.
2.3 name it with something meaningfull (like SPAM 8))

2.4 In the If box,
2.4.1 select Pipe Message to Shell Command
2.4.2 Enter the command (I use also the --local to reduce bandwidth, see man spamassassin for more info)
Code:

spamassassin -e

2.4.3 select returns greater than and 0 (zero).
The -e option means that it will return a value different of zero if it finds a SPAM.

2.5 In the Then box,
2.5.1 Select Move to Folder
2.5.2 Select "SPAM" in "Local Folders"

And that's all. For more effective use of SpamAssassin, please read the man. You can add addresses to blacklist, whitelist, etc. using the command line. There is also a daemon that can be used, but I haven't tried that. For the last two days, it has got 9 SPAMs, missed 2 and had zero false SPAMs.
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Thu Dec 12, 2002 8:42 pm    Post subject: Re: Evolution + SpamAssassin = less spam in your mailbox Reply with quote

Bloody Bastard wrote:
I've seen some tutorials about how to setup SpamAssassin in the client using Kmail, but not with Evolution. This method does not need server support. People with SpamAssassin installed in their servers may use the X-Spam-Flag to filter email, but those who do not have SpamAssassin installed in their mail servers and don't want to setup all the fetchmail/procmail stuff, can use the following procedure (considering that Evolution is already installed):

1. emerge Mail-SpamAssassin

2. In Evolution,
2.1 create a folder called SPAM
2.2 go to Tools, Filters, incoming filter rules, add a new Rule.
2.3 name it with something meaningfull (like SPAM 8))

2.4 In the If box,
2.4.1 select Pipe Message to Shell Command
2.4.2 Enter the command (I use also the --local to reduce bandwidth, see man spamassassin for more info)
Code:

spamassassin -e

2.4.3 select returns greater than and 0 (zero).
The -e option means that it will return a value different of zero if it finds a SPAM.

2.5 In the Then box,
2.5.1 Select Move to Folder
2.5.2 Select "SPAM" in "Local Folders"

And that's all. For more effective use of SpamAssassin, please read the man. You can add addresses to blacklist, whitelist, etc. using the command line. There is also a daemon that can be used, but I haven't tried that. For the last two days, it has got 9 SPAMs, missed 2 and had zero false SPAMs.


hmm.. I don't have "pipe message to shell command". Did I compile Evolution wrong?
_________________
Postcount ++
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7214
Location: Pelotas, BR

PostPosted: Thu Dec 12, 2002 8:43 pm    Post subject: Reply with quote

I am running 1.2.0....
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Fri Dec 13, 2002 4:36 pm    Post subject: Reply with quote

Bloody Bastard wrote:
I am running 1.2.0....


Could be the problem. I'm using 1.0.8. I'll try again once I've emerged the newer version.
_________________
Postcount ++
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Sun Dec 15, 2002 2:44 pm    Post subject: Reply with quote

Thanks for the tip. This works quite well.
_________________
Postcount ++
Back to top
View user's profile Send private message
DesertFox
n00b
n00b


Joined: 14 Nov 2002
Posts: 53

PostPosted: Mon Dec 16, 2002 9:17 pm    Post subject: Reply with quote

Thanks for the info. Once I upgraded to 1.2.0, it worked like a charm. I did notice that the ebuild for Mail-SpamAssassin-2.43-r2.ebuild is broken, and I had to install the masked Mail-SpamAssassin-2.43-r3.ebuild to get Spam Assassin to work, but once I did that, it worked great.
Back to top
View user's profile Send private message
absinthe
Retired Dev
Retired Dev


Joined: 06 Oct 2002
Posts: 111
Location: San Francisco, CA, USA

PostPosted: Tue Dec 17, 2002 3:30 am    Post subject: Reply with quote

Now, if only SpamAssassin was faster... I'm not sure which takes more time... me sorting through my spam, or SA's cpu time doing it for me.
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7214
Location: Pelotas, BR

PostPosted: Tue Dec 17, 2002 4:03 am    Post subject: Reply with quote

There is an option for leaving a spamd running on the background and using a spamc to access it. It may help your performance problem, which I haven't experiencied.

absinthe wrote:
Now, if only SpamAssassin was faster... I'm not sure which takes more time... me sorting through my spam, or SA's cpu time doing it for me.
Back to top
View user's profile Send private message
absinthe
Retired Dev
Retired Dev


Joined: 06 Oct 2002
Posts: 111
Location: San Francisco, CA, USA

PostPosted: Fri Dec 20, 2002 7:09 am    Post subject: Reply with quote

Bloody Bastard wrote:
There is an option for leaving a spamd running on the background and using a spamc to access it. It may help your performance problem, which I haven't experiencied.

absinthe wrote:
Now, if only SpamAssassin was faster... I'm not sure which takes more time... me sorting through my spam, or SA's cpu time doing it for me.


Yeah, that's what I've been using... spamd.
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7214
Location: Pelotas, BR

PostPosted: Mon Dec 23, 2002 4:10 am    Post subject: Reply with quote

You could try spamassassin instead of spamc. I don't see major performance slowdowns, and I am running it in a laptop P3 1.2 GHz (the disk is 4x slower than a desktop disk)

absinthe wrote:
Bloody Bastard wrote:
There is an option for leaving a spamd running on the background and using a spamc to access it. It may help your performance problem, which I haven't experiencied.

absinthe wrote:
Now, if only SpamAssassin was faster... I'm not sure which takes more time... me sorting through my spam, or SA's cpu time doing it for me.


Yeah, that's what I've been using... spamd.
Back to top
View user's profile Send private message
absinthe
Retired Dev
Retired Dev


Joined: 06 Oct 2002
Posts: 111
Location: San Francisco, CA, USA

PostPosted: Thu Dec 26, 2002 1:30 pm    Post subject: Reply with quote

Bloody Bastard wrote:
You could try spamassassin instead of spamc. I don't see major performance slowdowns, and I am running it in a laptop P3 1.2 GHz (the disk is 4x slower than a desktop disk)


I tried it both ways, the former is slower than the latter. I think the parting shot is that you might not get as much mail as I do on a daily basis. I normally get about 600-650 emails a day... across a few accounts. It sounds excessive but most of it is necessary. Much of that is spam... which is why I continue to run spamc even though it slows things down quite a bit.

Before my email even gets to spamc, (depending on the account) it's had to pass at least one external spam filters (provided by the ISP or whatever) -- sometimes two or three ... so the mere fact that spam still constitutes a double-digit percentage of my inbound mail by the time it hits spamc is saying something.
Back to top
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 617
Location: Hasselt, Belgium

PostPosted: Tue Jan 07, 2003 1:12 pm    Post subject: Reply with quote

I was having problems with my mails and finally found that it was spamassassin that was causing them. Mails would keep coming in again and again. First I thought it was my ISP, but then it started to happen with other accounts too, so I started looking. I deleted all my filters et voila, no more double mails. I added them again and started deleting one by one, and yes it was spamassassin. I guess it was taking spamassassin that long to process that the connection timed out and evolution couldn't send the DELE command to the POP. I added the --local option and now it runs much faster. Could it be that it can't find my proxy settings or something like that?
_________________
Life is like a box of chocolates... Before you know it, it's empty...
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7214
Location: Pelotas, BR

PostPosted: Tue Jan 07, 2003 2:38 pm    Post subject: Reply with quote

SpamAssassin tries to access some sites to gather and distribute information about your spam mail. I use --local to reduce bandwidth (see my first post, 2.4.2).
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Matje
l33t
l33t


Joined: 29 Oct 2002
Posts: 617
Location: Hasselt, Belgium

PostPosted: Tue Jan 07, 2003 4:12 pm    Post subject: Reply with quote

I know that, but I thought it might be so slow because it can't find my proxy. And surfing without it is impossible :)
_________________
Life is like a box of chocolates... Before you know it, it's empty...
Back to top
View user's profile Send private message
bier
n00b
n00b


Joined: 10 Dec 2002
Posts: 1

PostPosted: Tue Jan 07, 2003 5:24 pm    Post subject: Reply with quote

I tried this too but it doesn't work for me .. :-(

When I do a "spamassassin -e < mail" with "mail" being a saved mail it returns a whole report on found tags and a spam-score. That seems all allright to me, except it's more then just a number that evolution might be expecting.

I use evolution 1.2.0 and spamassassin 2.43. My filter in evolution is the same as the example. What can be the problem?
Back to top
View user's profile Send private message
cbrese
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jul 2002
Posts: 126
Location: San Diego, CA

PostPosted: Wed Jan 08, 2003 12:26 am    Post subject: Reply with quote

I just set this up and it works great if I leave Evolution running, but if I shut Evolution down and then open it up a few hours latter it really seams to choak on 30 or 40 emails.

I've tried both spamassassin -e and spamc -c. I think I will try to setup spamassassin directly in postfix and then just filter on the X-Spam-Flag header.
Back to top
View user's profile Send private message
cbrese
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jul 2002
Posts: 126
Location: San Diego, CA

PostPosted: Wed Jan 08, 2003 12:32 am    Post subject: Reply with quote

Ignore my last comment. I just tried the --local option and now it is much faster. I guess there is a long timeout for the DNS checks.
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Mon Apr 07, 2003 1:09 am    Post subject: Reply with quote

Yes, my mail checking is also much faster with --local on (I get about 150 a day). I have a nice connection, so I think it may have something to do with long DNS timers or something, as suggested in one of the above replies. That's a real shame, because I am all for contributing to a spam database, because I hate this crap.

Heheh I get about 20 letters a day from some prince, or king's window or whateverr in African offering to split some 20$ million account with me if I will only lend my bank account info. Must be a lot of political turnover over there ;-) Some of the spammers are absolute morons; of course a program like this would never work if everyone else is doing it. I think computer noobs buy packages off tv or something, one of those "work from home" schemes that turns their computer into a spam center.
_________________
-Phil Crosby
Back to top
View user's profile Send private message
nouse66
Apprentice
Apprentice


Joined: 09 Jan 2003
Posts: 194

PostPosted: Mon Jul 21, 2003 1:00 am    Post subject: Reply with quote

i got spamassassin and razor installed yesterday and they seemed to work fine.
i read this post and decided to switch to using spamd +spamc instead of calling the full spamassassin script from evolution.
since i switched there have been no additions to my razor log file which previously logged every piece of spam i got.
is there something i need to do to re-enable razor or check to see if it's doing anything?

thanks,
aaron
Back to top
View user's profile Send private message
nouse66
Apprentice
Apprentice


Joined: 09 Jan 2003
Posts: 194

PostPosted: Mon Jul 21, 2003 4:46 am    Post subject: Reply with quote

ok, well i did some more research and found the answer on the spamassassin mailing list archive.

if anyone is interested ...

all you do is edit your /etc/init.d/spamd adding the -H option to the /usr/bin/spamd in the start function.

i ended up with this:
start() {
ebegin "Starting spamd"
start-stop-daemon --start --quiet \
--exec /usr/bin/spamd -- -d -H -r /var/run/spamd.pid \
${SPAMD_OPTS}
eend $? "Failed to start spamd"
}

i guess that ensures that your home directory path will make it's away to the razor script.
i'm not sure if razor was working or not before i changed that but now my log file is showing activity so it looks like razor is doing it's job.
Back to top
View user's profile Send private message
pmatos
Veteran
Veteran


Joined: 06 Jun 2003
Posts: 1220
Location: Cambridge, UK

PostPosted: Thu Sep 04, 2003 9:59 am    Post subject: Reply with quote

Won't this work when using SMTP? Why? I'm using SMTP and I tried it but my spam still arrives from server in to my inbox. :(

Any ideas?

Best regards,

Paulo J. Matos
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Fri Dec 05, 2003 5:34 pm    Post subject: Reply with quote

This is handy but it would be nice if there were a way to 'train' spamassassin at the same time...

Perhaps an entry in the context menu or a flag like with Mozilla's mail client.
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Sat Dec 06, 2003 8:16 pm    Post subject: Reply with quote

You can train spamassassin at the same time.

Refer to this post regarding sa-learn usage in general,
http://lists.ximian.com/archives/public/evolution/2003-October/033588.html

When something is determined to be spam, instead of just moving it to a spam folder or deleting it, first run it through"sa-learn --spam" and then move it or delete it.

Works great for me, although I usually just accumulate a lot of spam and then run sa-learn on the entire spam folder.
_________________
-Phil Crosby
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Sun Dec 07, 2003 1:35 am    Post subject: Reply with quote

Reformist wrote:
You can train spamassassin at the same time.

Refer to this post regarding sa-learn usage in general,
http://lists.ximian.com/archives/public/evolution/2003-October/033588.html


Good link, but it's still a little contorted...

There should, and may, be a way to add a context menu entry in saying 'This is spam' or 'This is not spam' so you can can simply click away rather than messing around moving mail between folders, running cron jobs, then deleting or moving the mail back at a later date.
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
mallchin
l33t
l33t


Joined: 21 Jan 2003
Posts: 655
Location: United Kingdom

PostPosted: Thu Feb 05, 2004 9:48 pm    Post subject: amavisd-new Reply with quote

I using fetchmail, gotmail, courier, amavisd-new, clamav & spamassassin; took some time to configure but it works great :D

Firstly courier is proper mail suite including POP3 and SMTP servers, I connect to those to send & recieve mail using evolution. I have courier installed on a spare box, and use fetchmail & gotmail to check my ISP's POP3, and HoTMaiL. They are downloaded and delivered locally via SMTP.

Incoming SMTP traffic is filtered via amavisd-new for spam and virii, the advantage being spamassassin's vigourous scanning has already taken place when I pickup mail via POP3 with evolution. Infected or unwanted mail is forwarded to quarantine mail accounts. Many more options are available to warn the sender, recipient, admin or other about the infection.
_________________
6700 @ 2.66GHz, 4Gb RAM, 2 x 500Gb, 8800 GTX, PhysX, X-Fi, 24" Widescreen, Tux mascot
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum