Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jul 27, 2010 12:06 pm 
Offline
Newbie

Joined: Thu Jan 08, 2009 10:18 pm
Posts: 4
Hi folks -

I've been running my Linode for a couple years now with:

Postfix
MySQL
Dovecot
Squirrelmail & Roundcube
DSpam

I've got multiple domains and virtual users, and everything is looked up in the MySQL database. DSpam is running as a service (incoming mail goes into DSpam on port 10026, then spam is delivered to a spam folder and ham is delivered to the inbox via Maildrop) ... I also have per-user DSpam retraining via a Dovecot plugin that does drag and drop retraining (drag it into the spam folder = false negative, drag it out of the spam folder = false positive.)

This setup is pretty nice, but also relies on having to build several things from source rather than using packages (I use Arch linux.) So when Arch updates, which is fairly often, if I want to keep up to date at times I may have to rebuild DSpam, Dovecot, the Dovecot spam plugin and/or Maildrop due to various dependencies on packaged libmysql or other things.

What are the current thoughts on spam filtering? I'd like to simplify the whole setup and make it easy to keep the system as a whole up to date, while keeping the ease of use (drag/drop retraining) as well as the awesome accuracy of DSpam (I get a lot of spam and I'm typically at about 98-99% accuracy.) Is spamassassin a viable replacement? What other spam server-side tools are there? Client-side filtering (even just having rules to move tagged spam vs. the server side Maildrop/Procmail action) isn't acceptable to me, nor especially my users.

Just looking for any thoughts, recent ideas, etc. that I can investigate since I haven't really kept up. Any suggestions are most appreciated!


Top
   
 Post subject:
PostPosted: Tue Jul 27, 2010 4:12 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
I have a number of rules to reject mail that I know is bad (i.e., HELOing as me, and so forth), and that kicks off most of it. Only then do I consult Spamhaus Zen, and that gets enough of the rest that I haven't seen spam in months. All you need, really, depending on how bad spammers want to get to you.

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject:
PostPosted: Tue Jul 27, 2010 4:47 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
jed wrote:
I have a number of rules to reject mail that I know is bad

Would you care to share (unless of course it's patent pending)?


Top
   
 Post subject:
PostPosted: Tue Jul 27, 2010 5:11 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
vonskippy wrote:
jed wrote:
I have a number of rules to reject mail that I know is bad

Would you care to share (unless of course it's patent pending)?

I myself stole it from someone on a mailing list, so...sure! I actually removed some of theirs, but this is just the stuff Postfix can do.

Code:
smtpd_recipient_restrictions = 
   permit_mynetworks,
   permit_sasl_authenticated,
   reject_invalid_hostname,
   reject_non_fqdn_hostname,
   reject_non_fqdn_sender,
   reject_non_fqdn_recipient,
   reject_unknown_sender_domain,
   reject_unknown_recipient_domain,
   reject_rbl_client zen.spamhaus.org,
   reject_rbl_client dnsbl.njabl.org,
   reject_unauth_destination

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject:
PostPosted: Tue Jul 27, 2010 6:07 pm 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
I've got exim configured similarly to Jed's configuration, so that it rejects invalid email before involving a lot of resources.

Passing that, mail goes through spamassassin. Way back in the day, I used to run bogofilter, and have multiple folders for training. When I switched to spamassassin I was worried about leaving that behind, but it has been 100% successful. I have no complaints about the filtering, and it's just so much easier to not have to deal with training. spamassassin does have built-in Bayesian learning which works a treat.

Of course exim also runs everything through ClamAV. And any time a mail is going to be rejected, the connection is "tarpitted" for a good long while first. Really slows the spammers down.

Recently I've also implemented Nolisting, as well as a modified version of Unlisting. (Modified in that a failure isn't an automatic rejection, just a tightening of the spam score leash.)

Also, incidentally, I don't believe in having a Spam folder at all. When you implement a Spam folder, you're treating outright, blatant spam with more courtesy (a rejection notice) than you are the borderline stuff (which is effectively a delivery failure with no notice to anybody). I either accept mail or reject it, none of this limbo business.


Top
   
 Post subject:
PostPosted: Tue Jul 27, 2010 7:25 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
Mine is close to Jed's.

Code:
smtpd_recipient_restrictions =
        reject_unknown_sender_domain,
        reject_unauth_pipelining,
        check_sender_access hash:/etc/postfix/sender,
        reject_unknown_sender_domain,
        reject_non_fqdn_sender,
        reject_unknown_client,
        reject_non_fqdn_hostname,
        reject_unverified_sender,
        reject_unauth_destination,
        permit


The "sender" map allows me to whitelist/blacklist domains or addresses
Code:
fortunoff@news.fortunoff.com 554 Fuck off spammers - see if I spend money with you again!
money88.com                     554 Spam not welcome here
amtrak.com                      reject_unauth_destination,permit


The "reject_unauth_sender" tries to do remote address verification. This is... contentious. It sometimes fails, hence the need for close monitoring and the sender whitelist.

I don't do local submission via smtp so I don't need permit_mynetworks.

On top of this I have an automatic firewall which blocks senders that have failed 25 times in a day to send a message via my machine, and I use spamassassin on the results.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group