E-MAIL GATEWAY WITH PER-USER SPAM BLOCKING AND VIRUS SCANNING Greg Woods National Center for Atmospheric Research Scientific Computing Division Boulder,

Slides:



Advertisements
Similar presentations
Static Routing Exercise AFNOG 2003/ Track 2 # 1 Static Routing Exercise u Unix network interface configuration u Cisco network interface configuration.
Advertisements

1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP Forwarding Relates to Lab 3.
Static Routing Exercise. What will the exercise involve?  Unix network interface configuration  Cisco network interface configuration  Static routes.
Exchange 2003 and SPAM Fighting Emmanuel Ormancey, Rafal Otto Internet Services Group Department of Information Technology CERN 3 June 2015.
How do Networks work – Really The purposes of set of slides is to show networks really work. Most people (including technical people) don’t know Many people.
Dr. Zahid Anwar. Simplified Architecture of Linux Cluster Simplified Architecture of a Single Computer Simplified architecture of an enterprise cluster.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
What’s New in WatchGuard XCS 10.0 Update 3 WatchGuard Training.
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
Chapter 30 Electronic Mail Representation & Transfer
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Internet Basics.
Pro Exchange SPAM Filter An Exchange 2000 based spam filtering solution.
-I CS-3505 Wb_ -I.ppt. 4 The most useful feature of the internet 4 Lots of different programs, but most of them can talk to each.
ABC Co. Network Implementation High reliability is primary concern – near 100% uptime required –Customer SLA has stiff penalty clauses –Everything is designed.
CT NIKHEF Nov Mail NIKHEF CT system support.
Hands-On Microsoft Windows Server 2008 Chapter 8 Managing Windows Server 2008 Network Services.
Norman SecureTide Powerful cloud solution to stop spam and threats before it reaches your network.
CP476 Internet ComputingCh.1 # 1 Lecture 2. A Brief Introduction to the Internet The objective is to understand The history of Internet What the Internet.
CEN Network Fundamentals Chapter 19 Binding Protocol Addresses (ARP) To insert your company logo on this slide From the Insert Menu Select “Picture”
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
Mail Services.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
SMTP PROTOCOL CONFIGURATION AND MANAGEMENT Chapter 8.
Module 6: Manage and Configure Messaging. Configuring Internet Mail Using Small Business Server (SBS) 2008 Console Configuring Protection Configuring.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
FTP (File Transfer Protocol) & Telnet
WXET1143 Lecture7: , Chat and Messaging. Introduction  Electronic mail is everywhere.  Now many people in business, government, and education use.
Simple Mail Transfer Protocol (SMTP)
© Toronto Area Security Klatch 2007 A drop-in anti-spam solution A 15 minute speed talk by Paul Wouters.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Copyright MCL-Technologies v MCL-Collection MCL-Link.
IP Forwarding.
10/8/2015CST Computer Networks1 IP Routing CST 415.
Postfix Mail Server Postfix is used frequently and handle thousands of messages. compatible with sendmail at command level. high performance program easier-
Data and Computer Communications Circuit Switching and Packet Switching.
Network Monitoring System for the UNIX Lab Bradley Kita Capstone Project Mentor: Dr C. David Shaffer Fall 2004/Spring 2005.
1 Electronic Messaging Module - Electronic Messaging ♦ Overview Electronic messaging helps you exchange messages with other computer users anywhere in.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 7 Internet Protocol (IP) Routing.
Delivery, Forwarding, and Routing of IP Packets
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Module 5 Managing Message Transport. Module Overview Overview of Message Transport Configuring Message Transport.
Application Block Diagram III. SOFTWARE PLATFORM Figure above shows a network protocol stack for a computer that connects to an Ethernet network and.
CIS 450 – Network Security Chapter 4 - Spoofing. Definition - To fool. In networking, the term is used to describe a variety of ways in which hardware.
Chapter 19 Binding Protocol Addresses (ARP) A frame transmitted across a physical network must contain the hardware address of the destination. Before.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
Chapter 2 The Internet Underlying Architecture. How the DNS works? DNS: Domain Name System Visiting a website: - Write the address - IP will use the address.
Internet Protocol: Routing IP Datagrams Chapter 8.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
SMTP Tapu Ahmed Jeremy Nunn. Basics Responsible for electronic mail delivery. Responsible for electronic mail delivery. Simple ASCII protocol that runs.
Mapping IP Addresses to Hardware Addresses Chapter 5.
Cisco Confidential © 2013 Cisco and/or its affiliates. All rights reserved. 1 Cisco Networking Training (CCENT/CCT/CCNA R&S) Rick Rowe Ron Giannetti.
1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
Address Resolution Protocol Yasir Jan 20 th March 2008 Future Internet.
[1] Control Spam by the Use of Greylisting Torgny Hallenmark LDC - Computing Center Lund University, Sweden TERENA Networking.
Communication Networks NETW 501 Tutorial 2
Fighting Spam in an Exchange Environment Tzahi Kolber IT Supervisor - Polycom Israel.
FNAL Central Systems Jack Schmidt, Al Lilianstrom, Ray Pasetes, and Kevin Hill (Fermi National Accelerator Laboratory) Introduction The FNAL .
Anti-Spam Updates Activity Coordination Meeting March 2006 Kevin Hill.
IP: Addressing, ARP, Routing
Unix System Administration
Lec 5 Layers Computer Networks Al-Mustansiryah University
CS580 Special Project: IOS Firewall Setup using CISCO 1600 router
Routing and the Network Layer (ref: Interconnections by Perlman
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Presentation transcript:

GATEWAY WITH PER-USER SPAM BLOCKING AND VIRUS SCANNING Greg Woods National Center for Atmospheric Research Scientific Computing Division Boulder, CO Postfix Guru: Rich Johnson

OVERVIEW ● Goals ● Choice of hardware and software ● Cluster design ● Mail system design ● User interface ● Effectiveness ● Technical details

GOALS ● Low cost ● Scalability ● Reliability ● Flexibility – Virus Scanning – Centralized Alias Database – PER-USER spam blocking

SYSTEM CHOICE ● PC cluster ● Linux Virtual Server (LVS) ● Heartbeat ● Postfix ● DNS-based blocklists ● SpamAssassin ● F-PROT ● LDAP

Director LINUX VIRTUAL SERVER Heartbeat Backup Director Node1Node2Node3Node4

MAIL PATH Postfix Recipient/ Blocklist check Port 25 Receiver (smtpd) Localhost Receiver Alias Expansion Scanner Input Queue Attscand Cluster Node Scanner Output Queue Quarantine Reinjectd LDAP Server In Out smapq

DNS BLOCKLISTS ● Occurs while SMTP connection still open, after RCPT is given ● User spam block class looked up in LDAP ● Determines which DNS blocklists to use ● Originating IP address checked against blocklists ● Match results in a 550 refused message error ● If message refused, never receive message content! ● Passed messages placed in scanner input queue

BLOCKLISTS (2) ● Level 0: no blocking, all IP's OK ● Level 1: Block only misconfigured hosts (open relays and proxies) ● Default: Almost level 2, applied to any address not specifically listed in LDAP database ● Level 2: Block misconfigured hosts plus known spam sources ● Level 3, or “internal only”: block entire Internet outside of our IP space

SMAPQ ● Called by Postfix smptd once message passes blocklist check ● Writes queue file which contains original message plus SMTP envelope information ● Uses “x” bit lock protocol

QUEUE FILE LOCKING ● Uses “x” permission bit ● Explicitly set when done writing queue file ● Daemons ignore files in queue without “x” set ● Daemons remove “x” bit first thing, before processing file ● Used by smapq, attscand, and reinjectd

ATTACHMENT SCANNER ● Use F-PROT to scan for known viruses/worms – Can even examine files within ZIP archive ● Use grep to scan for executable MIME attachment types – This addition kept out Sobig.F ● Add SpamAssassin headers – No quarantining based on SpamAssassin; headers are there if end user wants to use them; again avoid content filtering

REINJECT DAEMON ● Takes messages from scanner output queue ● Send back to localhost listener, which is programmed for normal delivery ● Localhost listener does alias expansion via LDAP, then sends message on to next hop

USER INTERFACE ● 15-year-old ASCII screen-based interface ● Sends to database maintainers ● Flat files sent out twice daily; scripts update LDAP database from these ● Forwarding address updated immediately, anything else takes ½ a working day ● Development of direct web-to-LDAP interface in progress

EFFECTIVENESS ● Very few false positives – One major incident: Osirusoft DoS ● Filter effectiveness generally good, but varied – Some users report little reduction in spam – Others report total or near elimination of spam – Personal godsend: from hundreds of spams daily down to less than half a dozen

TECHNICAL DETAILS ● How LVS director works ● Heartbeat ● Postfix main receiver and localhost receiver ● Postfix blocklists ● Postfix LDAP lookups ● Virus scanning script ● Reinjector daemon ● System monitoring

LINUX VIRTUAL SERVER Tricks with ARP DirectorNode1Node2 RS1 RS2 VS Router VS = Virtual Server RS = Real Server

HEARTBEAT ● Uses dedicated ethernet crossover AND serial links ● If primary server stops responding to heartbeat, secondary takes over ● Config files tell which IP addresses and which services to take over ● For LVS director, secondary takes over VS and the director function

POSTFIX BLOCKLISTS ● smtpd_restriction_classes = class_prospam_blocks, class_easynet,.... (declare classes) ● class_prospam_blocks = class_easynet,... ● lookup_easynet = blackholes.easynet.nl 554 \$client_address dnsbl listed by easynet Blackholes. See. See

POSTFIX RECEIVERS ● SMTP Port 25 – smtp inet n - n - - smtpd -o content_filter=smapq – smapq unix - n n - 5 pipe flags=q user=smap argv=/local/sbin/smapq ${sender} ${recipient} ● Localhost only, port 1075 – localhost:1075 inet n - n - - smtpd -o content_filter= – smtp inet n - n - - smtpd -o content_filter=smapq – smapq unix - n n - 5 pipe flags=q user=smap argv=/local/sbin/smapq ${sender} ${recipient} ● Localhost only, port 1075

POSTFIX LDAP SEARCHES smtpd_client_restrictions = permit_mynetworks,...., check_recipient_access ldap:spam spam_search_base = ou=spamblock,dc=ucar,dc=edu spam_server_host = spam_server_port = 389 spam_query_filter = (sn=%s) spam_result_attribute = spam alias_maps = ldap:alias alias_search_base = ou=aliases,dc=ucar,dc=edu alias_server_host = alias_server_port = 389 alias_query_filter = (sn=%s) alias_result_attribute = fwd

VIRUS SCANNER ● F-PROT run, exit status checked ● grep -f pattern-file message-file ● If virus or executable attachment found, write to quarantine directory and exit – No longer send warnings, sender is always forged ● Add SpamAssassin headers ● Write to output queue (using “x” bit locking) filename[ ]*=.*\.exe"*$ ^[ ]*name[ ]*=.*\.exe[ "]*$

REINJECTD ● Reads from virus scanner output queue (using “x” bit locking) ● Preserves original envelope FROM/RCPT ● Connects to localhost:1075 and initiates SMTP transaction ● Always passes permit_mynetworks ● Normal delivery now occurs

SYSTEM MONITORING ● Qmond script monitors queue directories ● Work in progress ● Reports when message has been in queue too long ● Needs to have a “memory” implemented of what has already been reported, to avoid an overwhelming number of reports when system is slow – Large numbers of reports add to problem