Spam fighting with Postfix



Similar documents
Enhanced Spam Defence

Postfix. by Rod Roark

PostfixAdmin 3.0. Mailserver administration made easy. Christian Boltz

Devdas Bhagat Spam Control

Postfix Anti-Spam Workshop

Controlling mail message flow by content analysis

THE DEFINITIVE GUIDE TO SETTING UP A LINUX RELAY SERVER FOR MICROSOFT EXCHANGE SERVER

Configure a Mail Server

Postfix: Status Quo current development an overview

POP3 Connector for Exchange - Configuration

Postfix Configuration and Administration

How To Configure Forefront Threat Management Gateway (Forefront) For An Server

Fighting Spam: Tools, Tips, and Techniques

eprism Security Appliance 6.0 Intercept Anti-Spam Quick Start Guide

CipherMail Gateway Quick Setup Guide

policyd-weight and some unorthodox approaches to eliminating spam

USHA. Notification Setting. User Manual

Introduction of the S25R anti-spam system

Envelope (SMTP) Journaling for Microsoft Exchange 2007 and 2010

SESA Securing with Cisco Security Appliance Parts 1 and 2

Antispam Security Best Practices

eprism Security Appliance 6.0 Release Notes What's New in 6.0

Implementing a SPAM and virus scanning mail server using RedHat Linux 8.0

Government of Canada Managed Security Service (GCMSS) Annex A-5: Statement of Work - Antispam

Analysis of Spam Filter Methods on SMTP Servers Category: Trends in Anti-Spam Development

Implementing a SPAM and virus scanning mail server using RedHat Linux 8.0

A D M I N I S T R A T O R V 1. 0

Objective This howto demonstrates and explains the different mechanisms for fending off unwanted spam .

What is a Mail Gateway?... 1 Mail Gateway Setup Peering... 3 Domain Forwarding... 4 External Address Verification... 4

XGENPLUS SECURITY FEATURES...

Guardian Digital Secure Mail Suite Quick Start Guide

Frequently Asked Questions for New Electric Mail Administrators 1 Domain Setup/Administration

Exim4U. Server Solution For Unix And Linux Systems

Intercept Anti-Spam Quick Start Guide

Configuration Guide for Exchange 2003, 2007 and 2010

Advanced Settings. Help Documentation

ETH Zürich - Mail Filtering Service

How to Build an Effective Mail Server Defense

Quick Start Policy Patrol Spam Filter 9

Collax Mail Server. Howto. This howto describes the setup of a Collax server as mail server.

FortiMail Filtering Course 221-v2.0. Course Overview. Course Objectives

Mail Avenger. David Mazières New York University

Quick Start Policy Patrol Mail Security 9

D3 TECHNOLOGIES SPAM FILTER

Configuration Examples for the D-Link NetDefend Firewall Series

Envelope (SMTP) Journaling for Microsoft Exchange 2007 and 2010

Spam DNA Filtering System

Anti Spam Best Practices

Configuring MDaemon for Centralized Spam Blocking and Filtering

Technical Note. FORTIMAIL Configuration For Enterprise Deployment. Rev 2.1

Instructions Microsoft Outlook Express Page 1

Managing Junk Mail. About the Junk Mail Filter

IceWarp Unified Communications. AntiVirus Reference. Version 10.4

Anti-spam filtering techniques

How To Block Ndr Spam

FortiMail Filtering Course 221-v2.2 Course Overview

Core Protection Suite

Mail Server Scenarios and Configurations

FaxCore Ev5 -To-Fax Setup Guide

Configuring Your Gateman Server

ORF ENTERPRISE EDITION 1. Getting the Most Out of ORF

TRU - SPAM FILTERING GATEWAY CASE STUDY

AntiSpam QuickStart Guide

Security. Help Documentation

Celframe - Easy Linux - Lesson 8 - Server

Implementing MDaemon as an Security Gateway to Exchange Server

MDaemon configuration recommendations for dealing with spam related issues

Microsoft Exchange 2003

Preparing an SMTP/IMAP/HTTP Server for mail with Raid partitions under Geom

Quick Start Policy Patrol Mail Security 10

Using Security to Protect Against Phishing, Spam, and Targeted Attacks: Combining Features for Higher Education

English Translation of SecurityGateway for Exchange/SMTP Servers

Content Scanning with Exim 4

ing from The E2 Shop System address Server Name Server Port, Encryption Protocol, Encryption Type, SMTP User ID SMTP Password

Basic Exchange Setup Guide

Using WinGate 6 . Concepts, Features, and Configurations.

How To Allow and Block s using White or Black List

IBM Express Managed Security Services for Security. Anti-Spam Administrator s Guide. Version 5.32

How to make sure you receive all s from the University of Edinburgh

How to configure Incoming Enabled Libraries in MOSS2007 RTM using Exchange 2003 in an Active Directory Domain.

An Overview of Spam Blocking Techniques

Basic Exchange Setup Guide

Frequently Asked Questions

Release Notes. for Kerio Connect 8.0.0

Log Analyzer Viewer Guide

EnterGroup offers multiple spam fighting technologies so that you can pick and choose one or more that are right for you.

Introduction Configuration & Spam Detection WinWare Webmail Accounts Account Notes Definitions...

Configuring Security for SMTP Traffic

HOWTO Virtual Mail Hosting on CentOS 6.x Postfix MySQL Dovecot PostfixAdmin Amavisd-new Spamassassin Clamav

AntiSpam Guide 8.3.8

Quick Start Policy Patrol Spam Filter 5

ESET Mail Security & Zarafa 7 infrastructure Integration

Collateral Damage. Consequences of Spam and Virus Filtering for the System. Peter Eisentraut 22C3. credativ GmbH.

Parallels Plesk Automation

How to Configure edgebox as an Server

Transcription:

Spam fighting with Postfix Using technology to fight a social problem Devdas Bhagat Postfix Antispam workshop: Apricot 2004 p. 1

Introduction Postfix in the anti spam war "If you think technology can solve your security problems, then you don t understand the problems and you don t understand the technology" Bruce Schneier Postfix Antispam workshop: Apricot 2004 p. 2

What Postfix can do Client IP address or reverse DNS checks. Client NS/MX checks. HELO/EHLO checks. Sender domain checks. Sender address checks. Recipient checks. Simple regular expression checks. Postfix Antispam workshop: Apricot 2004 p. 3

With Additional tools Complex multiline checks. Customized per recipient policies. Antivirus checks. SpamAssassin hooks. Postfix Antispam workshop: Apricot 2004 p. 4

What Postfix cannot do Bypass the simple regexp checks for specific cases. Do complex checks without using external filters. Limit the simultaneous number of connections from a single host. Stop spam completely. Postfix Antispam workshop: Apricot 2004 p. 5

Postfix configuration variables check_client_access check_helo_access check_sender_access check_recipient_access header_checks mime_header_checks body_checks content_filter Postfix Antispam workshop: Apricot 2004 p. 6

More configuration variables smtpd_helo_required strict_rfc821_envelopes smtpd_sender_login_maps relay_domains permit_mx_backup permit_mx_backup_networks smtpd_delay_reject reject_non_fqdn_recipient Postfix Antispam workshop: Apricot 2004 p. 7

More configuration variables local_recipient_maps check_sender_mx_access check_sender_ns_access reject_unknown_recipient_domain reject_unverified_recipient reject_unverified_sender smtpd_proxy_filter check_policy_service Postfix Antispam workshop: Apricot 2004 p. 8

Implementing UBE checks KISS smtpd_delay_reject = yes is default Put all restrictions in smtpd_recipient_restrictions for simplicity Order is important. First match wins. Postfix Antispam workshop: Apricot 2004 p. 9

Starting off Set mynetworks correctly. mynetworks = 127.0.0.0/8, 192.168.1.0/24 Set myhostname to a FQDN. myhostname = foo.example.com Require a proper SMTP transaction beginning. smtpd_helo_required = yes Disable user verification. disable_vrfy_command = yes Postfix Antispam workshop: Apricot 2004 p. 10

Actual restrictions We start by allowing mail from trusted systems. This is hosts in mynetworks and authenticated users. smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination Postfix Antispam workshop: Apricot 2004 p. 11

Simple tests with data format validation smtpd_recipient_restrictions = reject_invalid_hostname reject_non_fqdn_hostname reject_non_fqdn_sender reject_non_fqdn_recipient reject_unknown_sender_domain reject_unknown_recipient_domain reject_unauth_pipelining permit_mynetworks permit_sasl_authenticated reject_unauth_destination Postfix Antispam workshop: Apricot 2004 p. 12

DNSBL testing smtpd_recipient_restrictions = reject_invalid_hostname : reject_unauth_pipelining permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_rbl_client xbl.spamhaus.org reject_rhsbl_sender rhsbl.sorbs.net Postfix Antispam workshop: Apricot 2004 p. 13

Local access maps smtpd_recipient_restrictions = reject_invalid_hostname : reject_unauth_destination check_recipient_access hash:/etc/postfix/role-accounts check_client_access hash:/etc/postfix/all check_client_access hash:/etc/postfix/ban check_sender_access hash:/etc/postfix/all check_sender_access hash:/etc/postfix/ban reject_rbl_client xbl.spamhaus.org Postfix Antispam workshop: Apricot 2004 p. 14

Referenced files $cat /etc/postfix/role-accounts abuse@ OK $cat /etc/postfix/banned-clients comcast.net 554 Too much spam 12 554 Compromised machines. $cat /etc/postfix/allowed-clients 12.10.54.20 OK $cat /etc/postfix/allowed-senders @securityfocus.com OK $cat /etc/postfix/banned-senders @indiatimes.com REJECT Postfix Antispam workshop: Apricot 2004 p. 15

Content Filtering header_checks = regexp:/etc/postfix/header-regexp mime_header\_checks = regexp:/etc/postfix/mime-regexp body_checks = pcre:/etc/postfix/body-pcre content_filter = smtp-amavis:[127.0.0.1]:10024 Postfix Antispam workshop: Apricot 2004 p. 16

Simple content filtering Header checks check the message headers. Catch fake headers or spam software signatures with this. MIME header checks check for attachment and content-type and other MIME headers. These are useful for filtering out on attachments like file.jpg.vbs Body checks check the body of the message: Filter for lines with CAN SPAM or US.1618 or "remove me" links. Postfix Antispam workshop: Apricot 2004 p. 17

Complex content filters Body and header checks have one significant limitation: These checks are global and cannot be bypassed The content_filter is an external program. It recieves mail on standard input and sends it back to Postfix via standard output. Take care to avoid looping. Can be very flexible. Runs after accepting the mail. Postfix Antispam workshop: Apricot 2004 p. 18

Useful links http://www.postfix.org/ http://jimsun.linxnet.com/postfix_contrib.html http://www.securitysage.com/ http://www.ijs.si/software/amavisd/ http://www.spamassassin.org/ http://clamav.elektrapro.com/ Postfix Antispam workshop: Apricot 2004 p. 19