Mailgw for FJFI Petr Vokáč April 2006 previous presentations and configuration info

Slides:



Advertisements
Similar presentations
TrustPort Net Gateway traffic protection. Keep It Secure Entry point protection –Clear separation of the risky internet and secured.
Advertisements

Securing Bruce Maggs. Separate Suites of Protocols Protocols for retrieving POP, IMAP, MAPI (Microsoft Exchange) Protocols for sending
Module 6 Implementing Messaging Security. Module Overview Deploying Edge Transport Servers Deploying an Antivirus Solution Configuring an Anti-Spam Solution.
Protocols and Troubleshooting Brandon Checketts.
Exchange 2003 and SPAM Fighting Emmanuel Ormancey, Rafal Otto Internet Services Group Department of Information Technology CERN 3 June 2015.
Handling Spam in Postfix. Computer Center, CS, NCTU 2 Nature of Spam  Spam UBE – Unsolicited Bulk UCE – Unsolicited Commercial  Spam There.
Introduction To Windows NT ® Server And Internet Information Server.
2440: 141 Web Site Administration Services Instructor: Enoch E. Damson.
23 October 2002Emmanuel Ormancey1 Spam Filtering at CERN Emmanuel Ormancey - 23 October 2002.
Spam Reduction Techniques Using greylisting and SpamAssassin.
TrustPort Net Gateway traffic protection. Keep It Secure Entry point protection –Clear separation of the risky internet and secured.
Belnet Antispam Pro A practical example Belnet – Aris Adamantiadis BNC – 24 November 2011.
Hands-On Microsoft Windows Server 2008 Chapter 8 Managing Windows Server 2008 Network Services.
Update Unix Users Feb 2006 Kevin Hill. Update Spam Cop (We’ve been busted!) Greylisting- Next Generation Spam Fighting.
1 SMTP Transport Configuration SMTP Configurations and Virtual Servers Customizing the SMTP Service.
Login Screen This is the Sign In page for the Dashboard Enter Id and Password to sign In New User Registration.
CensorNet Ltd An introduction to CensorNet Mailsafe Presented by: XXXXXXXX Product Manager Tel: XXXXXXXXXXXXX.
Combating Abuse Brian Nisbet NOC Manager HEAnet.
Mail Services.
SMTP PROTOCOL CONFIGURATION AND MANAGEMENT Chapter 8.
Login Screen This is the Sign In page for the Dashboard New User Registration Enter Id and Password to sign In.
1 Module 5 Securing SCOoffice Server. 2 3 Outlook 21 * 25 80/443* 110/ / /636 * Not used by Outlook Express External Firewall Configuration.
Sending and Receiving Mails
© Toronto Area Security Klatch 2007 A drop-in anti-spam solution A 15 minute speed talk by Paul Wouters.
Client X CronLab Spam Filter Technical Training Presentation 19/09/2015.
Microsoft Internet Information Services 5.0 (IIS) By: Edik Magardomyan Fozi Abdurhman Bassem Albaiady Vince Serobyan.
Erik Kangas -
1 Electronic Messaging Module - Electronic Messaging ♦ Overview Electronic messaging helps you exchange messages with other computer users anywhere in.
1 SMTP - Simple Mail Transfer Protocol –RFC 821 POP - Post Office Protocol –RFC 1939 Also: –RFC 822 Standard for the Format of ARPA Internet Text.
Module 5 Managing Message Transport. Module Overview Overview of Message Transport Configuring Message Transport.
Module 7: Managing Message Transport. Overview Introduction to Message Transport Implementing Message Transport.
Module 2: Overview of IIS 7.0 Application Server.
Silicon & Software Systems (S3)‏ Copyright © Silicon & Software Systems Limited Antispam protection IT Department 20/03/2008 Ondrej Valousek.
GATEWAY WITH PER-USER SPAM BLOCKING AND VIRUS SCANNING Greg Woods National Center for Atmospheric Research Scientific Computing Division Boulder,
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
Homework 04 Hint Mail System. Computer Center, CS, NCTU 2 Software  Postfix mail/postfix  POP/IMAP mail/dovecot  MTA filter security/amavisd-new 
Homework 04 Mail System. Computer Center, CS, NCTU 2 Architecture SMTP POP3/IMAP domain.tld Internet Users sub.domain.tld Mail Server.
SMTP Tapu Ahmed Jeremy Nunn. Basics Responsible for electronic mail delivery. Responsible for electronic mail delivery. Simple ASCII protocol that runs.
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter One Introduction to Exchange Server 2003.
554 Access Denied Fermilab’s Experiences with Spamcop.net Kevin Hill Ray Pasetes Jack Schmidt.
Troubleshooting Exchange Transport Service Miha Pihler MVP – Enterprise Security Microsoft Certified Master | Exchange 2010.
[1] Control Spam by the Use of Greylisting Torgny Hallenmark LDC - Computing Center Lund University, Sweden TERENA Networking.
Anti-Spam Updates Activity Coordination Meeting March 2006 Kevin Hill.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
concepts & protocols
Anti-Spam Managing Spam with Kerio Connect
Securing Bruce Maggs.
VP, Software Development
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Module 3: Enabling Access to Internet Resources
Network Administration Practice Homework4 – Mail System
Securing Bruce Maggs.
Unix System Administration
Securing Bruce Maggs.
Simple Mail Transfer Protocol (SMTP)
IIS.
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
06 | Planning Exchange Online and Configuring DNS Records
William Stallings Data and Computer Communications
This is the Sign In page for the Dashboard
Management Suite v2.0 DoubleCheck Manager Management Suite v2.0.
Firewalls Chapter 8.
Pavel Dobrý Engineering Director
Chapter 7 Network Applications
Windows Name Resolution
Designing IIS Security (IIS – Internet Information Service)
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Slides Credit: Sogand Sadrhaghighi
Securing Bruce Maggs.
Securing Bruce Maggs.
Presentation transcript:

Mailgw for FJFI Petr Vokáč April previous presentations and configuration info

Content ● Data flow ● Postfix ● PPolicy ● Amavis ● DKIM, OpenLDAP,... ● Links

Mailgw for FJFI – data flow Internet FJFI Mailgw mail routing -> <- smart host Local mailserver mailgw1 mailgw2 PDA PDA

Mailgw for FJFI – Postfix default restrictions ppolicy amavis-new Queue SMTP send data Queue (mynetworks, SMTP AUTH) antivir antispam dkimproxy (DKIM signing) Queue SMTP communication with remote server incomming mail smtp:25,smtps:465,s mtp:587 :10024 :10026 :10025 :10027:10028 :10030 name canonization :10029 SMTP AUTH

Default restrictions I 1) ~]$ telnet mailgw1.fjfi.cvut.cz 25 2) Trying ) Connected to mailgw1.fjfi.cvut.cz ( ). 4) Escape character is '^]'. 5) 220 mailgw1.fjfi.cvut.cz ESMTP CTU FNSPE 1st MX NO UCE NO SPAM 6) EHLO kmlinux.fjfi.cvut.cz 7) 250-mailgw1.fjfi.cvut.cz 8) 250-PIPELINING 9) 250-SIZE ) 250-VRFY 11) 250-ETRN 12) 250-STARTTLS 13) 250 8BITMIME 14) MAIL FROM: 15) 250 Ok 16) RCPT TO: 17) 250 Ok 18) DATA 19) 354 End data with. 20) From: 21) To: 22) Subject: SMTP test 23) This is SMTP conversation. 24). 25) 250 Ok: queued as 4ED6843DAB smtpd_client_restrictions smtpd_helo_restrictions smtpd_sender_restrictions smtpd_recipient_restrictions smtpd_data_restrictions smtpd_end_of_data_restrictions

Default restrictions II ● smtpd_client_restrictions – none – all rules stop a lot of legal mails ● reject_unknown_client is too restrictive (A->PTR-A) ● reject_rbl_client – blacklists – reject_unknown_reverse_client_hostname (A->PTR) ● smtpd_helo_restrictions – none for FJFI domain – reject invalid hello (554) ● fjfi.cvut.cz, , , localhost – reject_invalid_hostname (501) ● invalid HELO/EHLO syntax (illegal characters,...) – other restriction could stop legal mail (1/3 smtpd) ● reject_non_fqdn_hostname ● reject_unknown_hostname

Default restrictions III ● smtpd_sender_restrictions – none for FJFI domain and sasl authenticated – reject_unknown_sender_domain (450) ● – reject_non_fqdn_sender (504) ● apply this rule also for FJFI domain? – mailgw append its name (mailgwX.fjfi.cvut.cz) – illegal FROM address – check_sender_mx_access (554) ● reject mail with incorrect MX records (private net,...) – check_sender_access (554) ● reject mail – dangerous – not used ● reject_unverified_sender (use for selected domains?) – used only sender from IP outside CTU FNSPE range

Default restrictions IV ● smtpd_recipient_restrictions – none for FJFI domain and sasl authenticated ● allow only from – reject_unauth_destination (554) ● “open-relay” rule (allow only forwarded and local mails) – reject_unknown_recipient_domain (450) ● recipient domain must exist – reject_unverified_recipient (550) ● only if recipient is in FJFI domain ● require correct configuration of local mail servers – check_recipient_mx_access (554) ● Reject mail with incorrect MX – otherwise they stay in queue – check_policy_service ● ppolicy daemon – see next slides ● smtpd_data_restriction – pipelining, multibounce

ppolicy daemon I ● Postfix SMTP Access Policy Delegation – – checking mail during SMTP connection ✔ rejecting mail early stage of mail reception – use less resources (bandwidth, cpu – antivir/antispam,...) ✔ we don't send any bounce mail (backscatter mail) ✔ it is up to sender mail server to generate correct delivery failure message (using information from our reject code) ✗ less informations – client ip/name, sender, recipient, hello name, sasl info,... ✗ short time to check (otherwise SMTP conn. can timeout) ✗ problems in case of fatal error – temporary rejecting mail (mailing lists, incorr. conf. servers ) – depends on correct configuration of ppolicy daemon ✗ rejecting mail with code 450 => it will come again, again,... – any ideas what to check/reject? Stat. analysis.

ppolicy daemon II ● ppolicy daemon – ● RPM package, /etc/postfix/{main.cf,ppolicy.conf) – modular multi threaded daemon ● python + python-twisted (+dnspython+MySQL+GeoIP+...) ● flexible configuration (python code, combining res. of mod.) – Modules ● simple interface – easy to write own modules ● implemented – List, ListBW, ListMailDomain, ListDyn – Dnsbl, DnsblDynamic, DnsblScore, Resolve, SPF – Greylist, Verification – Country, DOS, Trap – DumpDataDB, DumpDataFile – User configurations (similar to Amavis)? – Discuss ppolicy.conf for FNSPE, modules,... CERN.CH rules ● Forbidden attachments ● No reverse DNS configured for IP ● Reverse SMTP Connect ● Flood stopper ● IP blacklist ● Hostname blacklist ● Sender blacklist ● Recipient blacklist FNAL.GOV rules ● Don't from outside

ppolicy daemon III ● Configuration (~70% rejected) – accept/reject mail from blacklist/whitelist ● client_address, client_name, sender mail/domain ● ● – score request ● use DNSBL and spamassassin score ● incorrect mailserver configuration (DNS PTR, HELO,...) ● average amavis score, auto-whitelist for sender, *.biz,... – requests with hight score ● apply “reject rules”, slowdown mail processing?! ● e.q. mailserver verification, greylist, DNS, HELO,...

Amavis daemon ● Antivirus – KAV – drop all infected mail – don't send any info – use database to log these events? ● Spamfilter – spamassassin (3.1) – sa-update+SARE rules (including adult,oem,drug,...) – my custom rules (geocity, vesmirni-lide,...) ● allow other administrators to create new rules? – learn bayes – ● User configuration – – LDAP amavisAccount, for all addresses (mail, mla) – multiple fjfiMailRoutingAddress, amavisSpamTag* – mail/domain blacklist/whitelist remove or change mime type of executable attachements?

DKIM daemon ● DomainKeys Identified Mail x SPF – signing mail headers by outgoing mail server ● we can verify this signature (public key in DNS) ● these headers can't be faked – it doesn't mean, that such mail is not spam – can be only used as one of spam decision criteria – still in process of standardization (IETF WG) – ● Supported by many big companies – AOL, Cisco, IBM, Sendmail, Yahoo,... – and used by many other ● Google, CERN,... ● Implementation – ● not yet mature, but Mail-DKIM is now part of spamassassin

OpenLDAP daemon ● data synchronization – automatic – Users ● require correct GAN in data source (NDS, ADS)!!! ● expired accounts? (ou=Odpad, entryStatus=K,...) – groups, special – required only for user conf. for mail – synchronization interval?, online (access) ● user configurations – mail address rewriting/canonization rules – mail routing, user configurations for amavis – see: ● addressbook – access restriction? (usermap from cvut.cz) – phone numbers and rooms in Usermap?

Other daemons ● SMTP AUTH – TLS (25, 578), SSL (465) – plain text login – global authentication source ● ● require secure connection to LDAP service (TLS, SSL) ✔ Usermap, Novell NDS, OpenLDAP ✗ Windows ADS ● MySQL – persistent cache for results of ppolicy modules – amavis quarantine info ● DNS – named (cache for faster DNS lookup – rbl, mx,...) ● SMTP unrelated daemons – RADIUS (eduroam), racoon (VPN), snmpd (monitoring), watchdog

Admin info ● User mail configuration, user whitelist – – ● Log & summary information accessible – – – – – rrd.cgi/?cfg=mailgw1.fjfi.cvut.cz_comp rrd.cgi/?cfg=mailgw1.fjfi.cvut.cz_comp – – ● Service status (SMTP, LDAP,...) – ?