LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-22-2008, 12:27 PM   #1
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Rep: Reputation: 30
Postfix & Spamassassin, post queue filter without amavis


Hello,

If you are looking for an effective spam filter where you don't waste your users' time and you don't worry about false positives, try this:

smtpd_client_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
# I removed this because of too many false positives with lazy admins
# reject_unknown_client,
permit
smtpd_sender_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
permit

smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination,
# Surprisingly got false positives with this :
# check_policy_service unixrivate/spfpolicy,
reject_non_fqdn_recipient,
# Read spamhaus terms of use before using their service!
reject_rbl_client zen.spamhaus.org,
reject_rbl_client list.dsbl.org,
permit
# This is used , see further down
header_checks = regexp:/etc/postfix/header_checks

I find that these restrictions cut out a decent percentage of spam. I have tried postgrey, but I don't like having my messages delayed. I found that using spamassassin as a proxy works well.

I installed spampd and spamassassin and added this to master.cf :

smtp inet n y n - 10 smtpd
-o smtpd_client_connection_count_limit=2
-o smtpd_proxy_filter=127.0.0.1:10025
10026 inet n - - - - smtpd

and finally in header_checks I added this :
/^X-Spam-Status: Yes/ reject

This setup is to me the perfect setup.

No Spam folder, users don't waste time rechecking spam.
No false positives, if a email is rejected the sender will know immediatly ( or very quickly depending on his/her server setup )
No back scatter, we bounce the message before accepting it, so we are not sending back scatter.

There will still be some spam that gets passed this, but little enough that I am ok with it.

David

Last edited by dlublink; 03-22-2008 at 01:23 PM.
 
Old 03-23-2008, 03:11 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
You can stop the backscatter with before queue milters as well.
 
Old 03-23-2008, 03:35 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
No false positives, if a email is rejected the sender will know immediatly ( or very quickly depending on his/her server setup )
How does this equate to no false positives and not potentially create backscatter? Perhaps I'm reading it wrong
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Spamassassin Filter gr0undz3r0 Linux - Server 5 10-21-2006 01:44 AM
Relay Server<-> GatewayServer<->filtering server: PostFix, amavis,spamassassin, cyrus admore Linux - General 0 11-02-2004 08:46 AM
mysql, postfix, dovecot & spamassassin dadams Fedora 1 10-18-2004 08:40 PM
Spamassassin and Postfix: Filter only incoming mails? Fonk Linux - Software 0 10-07-2004 12:43 PM
Fedora & Postfix & SpamAssassin bigdogg Linux - Software 20 09-16-2004 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration