Spam Filtering for Mail Exchangers

Total Page:16

File Type:pdf, Size:1020Kb

Spam Filtering for Mail Exchangers Spam Filtering for Mail Exchangers How to reject junk mail in incoming SMTP transactions. Tor Slettnes <[email protected]> Edited by Joost De Cock Devdas Bhagat Tom Wright Version 1.0 −− Release Edition Spam Filtering for Mail Exchangers Table of Contents Introduction.........................................................................................................................................................1 1. Purpose of this Document....................................................................................................................1 2. Audience..............................................................................................................................................1 3. New versions of this document............................................................................................................1 4. Revision History..................................................................................................................................1 5. Credits..................................................................................................................................................2 6. Feedback..............................................................................................................................................3 7. Translations..........................................................................................................................................3 8. Copyright information.........................................................................................................................3 9. What do you need?...............................................................................................................................4 10. Conventions used in this document...................................................................................................4 11. Organization of this document...........................................................................................................4 Chapter 1. Background......................................................................................................................................6 1.1. Why Filter Mail During the SMTP Transaction?.............................................................................6 1.1.1. Status Quo...............................................................................................................................6 1.1.2. The Cause................................................................................................................................6 1.1.3. The Solution............................................................................................................................7 1.2. The Good, The Bad, The Ugly..........................................................................................................8 1.3. The SMTP Transaction.....................................................................................................................8 Chapter 2. Techniques......................................................................................................................................11 2.1. SMTP Transaction Delays..............................................................................................................11 2.2. DNS Checks....................................................................................................................................12 2.2.1. DNS Blacklists......................................................................................................................12 2.2.2. DNS Integrity Check.............................................................................................................13 2.3. SMTP checks..................................................................................................................................13 2.3.1. Hello (HELO/EHLO) checks................................................................................................14 2.3.2. Sender Address Checks.........................................................................................................15 2.3.3. Recipient Address Checks.....................................................................................................17 2.4. Greylisting......................................................................................................................................19 2.4.1. How it works.........................................................................................................................19 2.4.2. Greylisting in Multiple Mail Exchangers..............................................................................19 2.4.3. Results...................................................................................................................................20 2.5. Sender Authorization Schemes.......................................................................................................20 2.5.1. Sender Policy Framework (SPF)...........................................................................................21 2.5.2. Microsoft Caller−ID for E−Mail...........................................................................................21 2.5.3. RMX++.................................................................................................................................22 2.6. Message data checks.......................................................................................................................22 2.6.1. Header checks........................................................................................................................23 2.6.2. Junk Mail Signature Repositories..........................................................................................23 2.6.3. Binary garbage checks...........................................................................................................24 2.6.4. MIME checks........................................................................................................................24 2.6.5. File Attachment Check..........................................................................................................24 2.6.6. Virus Scanners.......................................................................................................................24 2.6.7. Spam Scanners......................................................................................................................25 2.7. Blocking Collateral Spam...............................................................................................................25 2.7.1. Bogus Virus Warning Filter..................................................................................................25 i Spam Filtering for Mail Exchangers Table of Contents Chapter 2. Techniques 2.7.2. Publish SPF info for your domain.........................................................................................26 2.7.3. Enveloper Sender Signature..................................................................................................26 2.7.4. Accept Bounces Only for Real Users....................................................................................27 Chapter 3. Considerations................................................................................................................................28 3.1. Multiple Incoming Mail Exchangers..............................................................................................28 3.2. Blocking Access to Other SMTP Servers.......................................................................................28 3.3. Forwarded Mail...............................................................................................................................28 3.4. User Settings and Data....................................................................................................................29 When Spammers Adapt...................................................................................................................31 Chapter 4. Questions & Answers....................................................................................................................31 Appendix A. Exim Implementation.................................................................................................................33 A.1. Prerequisites...................................................................................................................................33 A.2. The Exim Configuration File.........................................................................................................33 A.2.1. Access Control Lists.............................................................................................................33 A.2.2. Expansions............................................................................................................................34 A.3. Options and Settings......................................................................................................................34 A.4. Building the ACLs − First Pass.....................................................................................................35 A.4.1. acl_connect...........................................................................................................................35 A.4.2. acl_helo.................................................................................................................................36
Recommended publications
  • Handling Unwanted Email What Are the Main Sources of Junk Email?
    Handling unwanted email Almost entirely based on a presentation by Brian Candler What are the main sources of junk email? · Spam Unsolicited, bulk email Often fraudulent ± penis enlargement, lottery scams, close relatives of African presidents, etc. Low response rate => high volume sent · Viruses, Trojan horses Infected machine sends out mails without the owner 's knowledge · Malicious bounces These are called ªcollateral spamº or ªJoe-jobsº Junk mail is sent with forged MAIL FROM Accepted by some intermediate MTA, but later it bounces Bounces go to innocent third party 1 What are the costs? · Important messages can be accidentally discarded The more junk, the higher the risk · Wasted time Deleting junk Setting up and maintaining ®lters Checking discarded mail for false positives · Wasted bandwidth and disk space Especially for users on modems Viruses and spam attachments can be large · Annoyance, offence, even fraud There are no easy answers! 2 Where can you ®lter? · At the end-user hosts ✓ Each client has full control and customization ✓ Distributes the processing cost ✗ Client must still download each message · On the ISP's mail server ✓ Easier for users ✓ Sometimes can be rejected before receiving the body ✓ Saves disk space on the server ✗ Hard to make ¯exible for users to customize The Joe-job problem · Don't accept a message and then bounce it later If its sender is forged, we are creating a Joe-job · Much better to reject at RCPT TO or DATA stages A real MTA sender will create a bounce Spamware will ignore the rejection · For
    [Show full text]
  • Fighting Spam
    Fighting Spam 2017-10-18 Dianne Skoll Roaring Penguin Software Inc. [email protected] www.roaringpenguin.com Approaches to Fighting Spam ● Reputation-Based (IP, Domain) ● Authentication (SPF, DKIM, DMARC) ● Behavior-Based (greylisting, botnet detection) ● Content-Based ● Defense in Depth www.roaringpenguin.com IP Reputation ● Typically implemented by DNSBLs. ● Reactive – IPs are listed only after they spam. ● Some DNSBLs are high-quality. Most are not. ● Few are transparent as to listing and delisting criteria. ● Few have good IPv6 coverage. ● Useful as a first pass to cut down on spam passing to the rest of the filtering stages. www.roaringpenguin.com Domain Reputation ● Also typically implemented by DNSBLs. ● Reactive. ● Low to moderate hit rate. ● May be applied to sending domain and/or to domains of URLs in the message body. www.roaringpenguin.com Domain Reputation - 2 ● Spammers often register throwaway domains as sending domains. ● Idea: Penalize messages from “newly-seen” domains. ● CanIt 10.1.7 tracks domains seen across all CanIt installations and permits you to (mildly) penalize mail from only-recently-seen domains. www.roaringpenguin.com Authentication: SPF ● SPF (Sender Policy Framework) is a mechanism whereby domain owners can declare which machines may send email on their domains’ behalf. ● For arbitrary domains, an SPF “pass” is a mild spam indicator! ● Spammers are better at setting up SPF than many legitimate administrators. www.roaringpenguin.com Authentication: SPF - 2 ● SPF is useful for trusted domains (banks, PayPal, eBay, etc.) ● Adding points on SPF “fail” or “softfail” is useful. ● Subtracting points on SPF “pass” for arbitrary domains is dangerous. ● Subtracting points on SPF “pass” for trusted domains is useful.
    [Show full text]
  • Sicherer Betrieb Von E-Mail-Servern (Isi-S)
    Sicherer Betrieb von E-Mail-Servern (ISi-Mail-Server) BSI-Studie zur Internet-Sicherheit (ISi-S) Version 1.0 ISi-Reihe ISi-S Sicherer Betrieb von E-Mail-Servern Vervielfältigung und Verbreitung Bitte beachten Sie, dass das Werk einschließlich aller Teile urheberrechtlich geschützt ist. Erlaubt sind die Vervielfältigung und Verbreitung zu nicht-kommerziellen Zwecken, insbesondere zu Zwecken der Ausbildung, Schulung, Information oder hausinternen Bekanntmachung, sofern sie unter Hinweis auf die ISi-Reihe des BSI als Quelle erfolgen. Dies ist ein Werk der ISi-Reihe. Ein vollständiges Verzeichnis der erschienenen Bände findet man auf den Internet-Seiten des BSI. http://www.bsi.bund.de oder http://www.isi-reihe.de Bundesamt für Sicherheit in der Informationstechnik ISi-Projektgruppe Postfach 20 03 63 53133 Bonn Tel. +49 (0) 228 99 9582-0 E-Mail: [email protected] Internet: http://www.bsi.bund.de © Bundesamt für Sicherheit in der Informationstechnik 2009 2 Bundesamt für Sicherheit in der Informationstechnik ISi-Reihe ISi-S Sicherer Betrieb von E-Mail-Servern Vorwort Liebe Leserinnen und Leser, immer mehr Prozesse verlagern sich in die virtuelle Welt des Internets: Kommunikation und Daten- austausch erfolgen per E-Mail, Bankgeschäfte und Einkäufe werden zunehmend online getätigt. Dabei müssen häufig persönliche und vertrauliche Daten über das Internet versendet werden. Diese sind ein attraktives und lukratives Ziel für Online-Kriminelle, die heute international organisiert und professionell strukturiert zusammen arbeiten. IT-Kriminalität ist für die Angreifer ein lohnenswertes Geschäft bei vergleichsweise niedrigem Risiko. Identitätsdiebstahl und Angriffe mit Schadprogram- men unterschiedlichster Art gehören bei der Nutzung des Internets zu den ernstzunehmenden Bedrohungen für alle Anwender.
    [Show full text]
  • Design and Management of Email Service
    Design and Management of Email Service Source : homepage.ntu.edu.tw/~jsc/2005-mail.ppt Outline Introduction to the architecture and operation of SMTP Design of a suitable email system – Webmail solutions Postfix and simple configuration samples Spam and virus filtering Conclusion 2 Overview Electronic mail service has already evolved into one of the major Internet applications. It is not only fundamental, but also a must. Users may become impatient when mails were delayed, not to mention failed to access their emails. – Imagine we meet the situation of power failure or cut of water supply 3 Architecture of a Simple Mail System Consists of the following components – MTA - Mail transfer agent Sending and forwarding emails Server end – MDA - Mail delivery agent Delivering emails to recipients’ mailbox Server end – Pop3/Imap4 Daemons For users to download their mailboxs Server end – MUA - Mail user agent Reading and composing emails 4 Client end Architecture of a Simple Mail System Protocols Used for Mail System Protocols – For computer programs to communicate with each other – Similar to languages that human beings speak SMTP – Simple Mail Transfer Protocol – Too simple to provide any “advanced features” Authentication Authorization POP3 – Post Office Protocol version 3 – Simple IMAP4 – Internet Message Access Protocol version 4 – Fully compatible with internet message standards, e.g. MIME. – Allow messages to be accessed from more than one computer. – Provide support for online, offline, and disconnected modes. 6 – Multiple and share folders. Mail Forwarding Between Servers How to Find the Way to the Destination? How do we find the way to [email protected]? 8 DNS: The Key to All Internet Services Query DNS server by the address part of email address.([email protected]) 1.
    [Show full text]
  • Address Munging: the Practice of Disguising, Or Munging, an E-Mail Address to Prevent It Being Automatically Collected and Used
    Address Munging: the practice of disguising, or munging, an e-mail address to prevent it being automatically collected and used as a target for people and organizations that send unsolicited bulk e-mail address. Adware: or advertising-supported software is any software package which automatically plays, displays, or downloads advertising material to a computer after the software is installed on it or while the application is being used. Some types of adware are also spyware and can be classified as privacy-invasive software. Adware is software designed to force pre-chosen ads to display on your system. Some adware is designed to be malicious and will pop up ads with such speed and frequency that they seem to be taking over everything, slowing down your system and tying up all of your system resources. When adware is coupled with spyware, it can be a frustrating ride, to say the least. Backdoor: in a computer system (or cryptosystem or algorithm) is a method of bypassing normal authentication, securing remote access to a computer, obtaining access to plaintext, and so on, while attempting to remain undetected. The backdoor may take the form of an installed program (e.g., Back Orifice), or could be a modification to an existing program or hardware device. A back door is a point of entry that circumvents normal security and can be used by a cracker to access a network or computer system. Usually back doors are created by system developers as shortcuts to speed access through security during the development stage and then are overlooked and never properly removed during final implementation.
    [Show full text]
  • Roskapostin Torjuntakeinot Suomalaisissa IT-Alan Yrityksissä
    Roskapostin torjuntakeinot suomalaisissa IT-alan yrityksissä Markus Pyhäranta Opinnäytetyö Tietojenkäsittelyn koulutusohjelma 2019 Tiivistelmä Tekijä(t) Markus Pyhäranta Koulutusohjelma Tietojenkäsittelyn koulutusohjelma Raportin/Opinnäytetyön nimi Sivu- ja liitesi- Roskapostin torjuntakeinot suomalaisissa IT-alan yrityksissä vumäärä 135 + 82 Tutkimus toteutettiin huhti-elokuussa 2019 ja siinä tutkittiin suomalaisten IT-alan yritysten käyttämiä roskapostin torjuntakeinoja. Päämääränä oli ymmärtää paremmin roskaposti- tusta ilmiönä sekä siihen vastauksena kehitettyjä teknologioita. Yksi tavoitteista oli kerätä kyselylomakkeen avulla laaja näyte yritysten käyttämistä roskapostin torjuntakeinoista. Tu- losten pohjalta kehitettiin vertailuarvo kullekin yrityskoolle, jota voidaan käyttää organisaa- tioiden sähköpostipalveluiden kehittämiseen. Opinnäytetyön tietoperustassa käsitellään sähköpostin toimintaa tutkimusosion aihepiirin ymmärtämiseen vaadittavalla tarkkuudella. Tietoperustassa kerrotaan sähköpostiviestin ra- kenteesta, sähköposti-infrastruktuurin komponenteista, roskapostista ja sen aiheuttamista turvallisuusuhista. Lopuksi esitetään yleisesti käytettyjä roskapostin torjuntakeinoja. Tietoperustan jälkeen esitellään tutkimuksessa käytetyt aineistot ja tutkimusmenetelmät. Roskapostin torjuntaa käsiteltiin yritysten sähköpostipalvelimien ylläpitäjien näkökulmasta. 310 yritykselle lähetettiin tutkimuksessa kyselylomake, jolla kartoitettiin käytettyjä sähkö- postipalveluratkaisuja, tyytyväisyyttä palvelujen roskapostin torjuntaan ja yritysten
    [Show full text]
  • Set up Mail Server Documentation 1.0
    Set Up Mail Server Documentation 1.0 Nosy 2014 01 23 Contents 1 1 1.1......................................................1 1.2......................................................2 2 11 3 13 3.1...................................................... 13 3.2...................................................... 13 3.3...................................................... 13 4 15 5 17 5.1...................................................... 17 5.2...................................................... 17 5.3...................................................... 17 5.4...................................................... 18 6 19 6.1...................................................... 19 6.2...................................................... 28 6.3...................................................... 32 6.4 Webmail................................................. 36 6.5...................................................... 37 6.6...................................................... 38 7 39 7.1...................................................... 39 7.2 SQL.................................................... 41 8 43 8.1...................................................... 43 8.2 strategy.................................................. 43 8.3...................................................... 44 8.4...................................................... 45 8.5...................................................... 45 8.6 Telnet................................................... 46 8.7 Can postfix receive?..........................................
    [Show full text]
  • IFIP AICT 394, Pp
    A Scalable Spam Filtering Architecture Nuno Ferreira1, Gracinda Carvalho1, and Paulo Rogério Pereira2 1 Universidade Aberta, Portugal 2 INESC-ID, Instituto Superior Técnico, Technical University of Lisbon, Portugal [email protected], [email protected], [email protected] Abstract. The proposed spam filtering architecture for MTA1 servers is a component based architecture that allows distributed processing and centralized knowledge. This architecture allows heterogeneous systems to coexist and benefit from a centralized knowledge source and filtering rules. MTA servers in the infrastructure contribute to a common knowledge, allowing for a more rational resource usage. The architecture is fully scalable, ranging from all-in- one system with minimal components instances, to multiple components instances distributed across multiple systems. Filtering rules can be implemented as independent modules that can be added, removed or modified without impact on MTA servers operation. A proof-of-concept solution was developed. Most of spam is filtered due to a grey-listing effect from the architecture itself. Using simple filters as Domain Name System black and white lists, and Sender Policy Framework validation, it is possible to guarantee a spam filtering effective, efficient and virtually without false positives. Keywords: spam filtering, distributed architecture, component based, centralized knowledge, heterogeneous system, scalable deployment, dynamic rules, modular implementation. 1 Introduction Internet mail spam2 is a problem for most organizations and individuals. Receiving spam on mobile devices, and on other connected appliances, is yet a bigger problem, as these platforms are not the most appropriate for spam filtering. Spam can be seen as belonging to one of two major categories: Fraud and Commercial.
    [Show full text]
  • Glossary of Spam Terms
    white paper Glossary of Spam terms The jargon of The spam indusTry table of Contents A Acceptable Use Policy (AUP) . 5 Alias . 5 Autoresponder . 5 B Ban on Spam . 5 Bayesian Filtering . 5 C CAN-SPAM . 5 Catch Rate . 5 CAUSe . 5 Challenge Response Authentication . 6 Checksum Database . 6 Click-through . 6 Content Filtering . 6 Crawler . 6 D Denial of Service (DoS) . 6 Dictionary Attack . 6 DNSBL . 6 e eC Directive . 7 e-mail Bomb . 7 exploits Block List (XBL) (from Spamhaus org). 7 F False Negative . 7 False Positive . 7 Filter Scripting . 7 Fingerprinting . 7 Flood . 7 h hacker . 8 header . 8 heuristic Filtering . 8 honeypot . 8 horizontal Spam . 8 i internet Death Penalty . 8 internet Service Provider (iSP) . 8 J Joe Job . 8 K Keyword Filtering . 9 Landing Page . 9 LDAP . 9 Listwashing . 9 M Machine-learning . 9 Mailing List . 9 Mainsleaze . 9 Malware . 9 Mung . 9 N Nigerian 419 Scam . 10 Nuke . 10 O Open Proxy . 10 Open Relay . 10 Opt-in . 10 Opt-out . 10 P Pagejacking . 10 Phishing . 10 POP3 . 11 Pump and Dump . 11 Q Quarantine . 11 R RBLs . 11 Reverse DNS . 11 ROKSO . 11 S SBL . 11 Scam . 11 Segmentation . 11 SMtP . 12 Spam . 12 Spambot . 12 Spamhaus . 12 Spamming . 12 Spamware . 12 SPewS . 12 Spider . 12 Spim . 12 Spoof . 12 Spyware . 12 t training Set . 13 trojan horse . 13 trusted Senders List . 13 U UCe . 13 w whack-A-Mole . 13 worm . 13 V Vertical Spam . 13 Z Zombie . 13 Glossary of Spam terms A acceptable use policy (AUP) A policy statement, made by an iSP, whereby the company outlines its rules and guidelines for use of the account .
    [Show full text]
  • Abkürzungs-Liste ABKLEX
    Abkürzungs-Liste ABKLEX (Informatik, Telekommunikation) W. Alex 1. Juli 2021 Karlsruhe Copyright W. Alex, Karlsruhe, 1994 – 2018. Die Liste darf unentgeltlich benutzt und weitergegeben werden. The list may be used or copied free of any charge. Original Point of Distribution: http://www.abklex.de/abklex/ An authorized Czechian version is published on: http://www.sochorek.cz/archiv/slovniky/abklex.htm Author’s Email address: [email protected] 2 Kapitel 1 Abkürzungen Gehen wir von 30 Zeichen aus, aus denen Abkürzungen gebildet werden, und nehmen wir eine größte Länge von 5 Zeichen an, so lassen sich 25.137.930 verschiedene Abkür- zungen bilden (Kombinationen mit Wiederholung und Berücksichtigung der Reihenfol- ge). Es folgt eine Auswahl von rund 16000 Abkürzungen aus den Bereichen Informatik und Telekommunikation. Die Abkürzungen werden hier durchgehend groß geschrieben, Akzente, Bindestriche und dergleichen wurden weggelassen. Einige Abkürzungen sind geschützte Namen; diese sind nicht gekennzeichnet. Die Liste beschreibt nur den Ge- brauch, sie legt nicht eine Definition fest. 100GE 100 GBit/s Ethernet 16CIF 16 times Common Intermediate Format (Picture Format) 16QAM 16-state Quadrature Amplitude Modulation 1GFC 1 Gigabaud Fiber Channel (2, 4, 8, 10, 20GFC) 1GL 1st Generation Language (Maschinencode) 1TBS One True Brace Style (C) 1TR6 (ISDN-Protokoll D-Kanal, national) 247 24/7: 24 hours per day, 7 days per week 2D 2-dimensional 2FA Zwei-Faktor-Authentifizierung 2GL 2nd Generation Language (Assembler) 2L8 Too Late (Slang) 2MS Strukturierte
    [Show full text]
  • Administrator's Guide for Synology Mailplus Server
    Administrator's Guide for Synology MailPlus Server Based on Synology MailPlus Server 2.2 1 Table of Contents Introduction 01 Chapter 1: Deployment Guidelines 02 Select a Synology NAS Estimate RAM and Storage Requirements Running Multiple I/O Intensive Packages on the Same NAS Chapter 2: Getting Started with MailPlus Server 06 Connect Synology NAS to the Internet Set up DNS Set up MailPlus Server Set up MailPlus Client Run MailPlus Third-Party Email Clients Troubleshoot Chapter 3: Mail Migration 19 Create a Mail Migration Task in MailPlus Server Import System Configurations from Microsoft Exchange to MailPlus Server Chapter 4: User Licenses 27 Purchase Licenses Install Licenses Use Licenses Chapter 5: Account Settings 31 Account System Activate Accounts Manage Privileges Chapter 6: Protocol Settings 46 SMTPI MAP/POP3 Network Interface Chapter 7: SMTP Settings 50 Service Settings SMTP Secure Connection Mail Relay Chapter 8: Domain Settings 66 Domain Domain Management Chapter 9: Security Settings 83 Spam Antivirus Scan Authentication Content Protection Chapter 10: Monitor Settings 107 Monitor Server Status Monitor Mail Queue Monitor Mail Log Chapter 11: Disaster Recovery 127 High-Availability Cluster Back up and Restore Email Chapter 12: MailPlus Navigation 140 Basic Operations Advanced Settings Introduction Introduction The Synology MailPlus suite provides advanced and secure mail service with high usability. This suite consists of two packages: MailPlus Server and MailPlus. MailPlus Server is an administration console that offers diverse settings, while MailPlus is an email platform for client users. This administrator's guide will guide you through the MailPlus Server setup and give detailed configuration instructions including DNS settings, mail service migration, and other security adjustments.
    [Show full text]
  • Canit-PRO User's Guide
    CanIt-PRO User’s Guide for Version 10.2.5 AppRiver, LLC 13 September 2018 2 CanIt-PRO — AppRiver, LLC Contents 1 Introduction 13 1.1 Organization of this Manual.............................. 13 1.2 Definitions........................................ 14 2 The Simplified Interface 19 3 The My Filter Page 21 3.1 Sender Rules...................................... 21 3.2 The Quarantine..................................... 22 3.3 Online Documentation................................. 22 4 The CanIt-PRO Quarantine 23 4.1 Viewing the Quarantine................................. 23 4.1.1 Message Summary Display........................... 23 4.1.2 Sort Order.................................... 24 4.1.3 Message Body Display............................. 25 4.1.4 Summary of Links............................... 25 4.2 Message Disposition.................................. 25 4.2.1 Quick Spam Disposal.............................. 26 4.3 Reporting Phishing URLs................................ 27 4.4 Viewing Incident Details................................ 27 4.4.1 Basic Details.................................. 28 4.4.2 Address Information.............................. 29 4.4.3 History..................................... 29 4.4.4 Spam Analysis Report............................. 29 4.5 Viewing Other Messages................................ 30 4.6 Viewing Specific Incidents............................... 30 CanIt-PRO — AppRiver, LLC 3 4 CONTENTS 4.7 Searching the Quarantine................................ 30 4.8 Closed Incidents....................................
    [Show full text]