Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus...

18

Transcript of Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus...

Page 1: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,
Page 2: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

EmailGatewaysKevinChege

Page 3: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

WhatisaMailGateway?

• Asoftware/service/appliancethatisabletoreceiveandfilteremailsbeforetheyreachtheemailboxes• Typically,amailgatewaywillnotcontainmailboxaccountsandwillonlyreceiveemails,filterthembasedonconfiguredparameters,andthenforwardthemtothemailserverthatcontainsthemailboxes• Thepurposeistoremovedangerousorharmfulcontent(likespamandviruses)onemailbeforetheyreachuserboxes• Amailfiltercanprocessincomingemailsandoroutgoingemails

Page 4: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

Howitflows

SomeMTAEmailfromtheInternet

MailGatewayreceivesEmailandfiltersoutbasedoncriteria.Forwardstheclean

emailtothemailserver

MailServerwithmailboxesdelivers

theemailstothemailboxes.

Page 5: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

Advantages

• Removeharmfulemailbeforeitreachesmailboxes• Phishingemails,malware,virusesetc

• Removetheworkoffilteringemailfromtheserverthatishandlingemailboxes• Highlyconfigurableandcanblockemailsbasedonanumberofcriteriaincludingcontentthatisinthebodyoftheemail• Ifhostedoutsidethenetwork,canreduceloadonthenetworkconnection/link(alsoknownasfarsidescrubbing)

Page 6: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

Disadvantages

• Mistakesinconfigurationmaymeanmailisnotdelivered.Theyarehighlycustomisablewithhundredsofoptionsandparameterswhichyoumustbecarefulwith• Increasethenumberofemailserverstobemanaged

Page 7: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

CommontoolsusedinMailGateways• Spamassassin – No.1OpenSourceanti-spamplatformgivingsystemadministratorsafiltertoclassifyemailandblockspam(unsolicitedbulkemail)• ClamAV – Virusscanningsoftware.Canbeusedforemailscanning andwebscanning• Amavisd – interfacebetweentheMTAandtheabovetools.AcommonmailfilteringinstallationwithAmavis consistsofanMTA,ClamAV andSpamassassin• MailScanner - opensourceemailsecuritysystemdesignforLinux-basedemailgateways

Page 8: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

MailGatewayAppliancesThesearesolutionsthatcanbeinstalledonserversandprovideMailGatewayservices• Software:

• AntiSpamSMTPProxy- http://en.wikipedia.org/wiki/Anti-Spam_SMTP_Proxy• MailBorder- http://www.mailborder.com/• ScrolloutF1- http://www.scrolloutf1.com/• Xeams - http://www.xeams.com/

• Hardware(Blackbox):• Barracuda-https://www.barracuda.com/products/emailsecuritygateway

Page 9: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

MailScanner• MailScanner isahighlyrespectedopensourceemailsecuritysystemdesignforLinux-basedemailgateways.• Itisusedatover30,000sitesaroundtheworld• HasfastbecomethestandardemailsolutionatmanyISPsitesforvirusprotectionandspamfiltering.

• MailScanner scansemailforviruses,spam,phishing,malware,andotherattacksagainstsecurityvulnerabilitiesandplaysamajorpartinthesecurityofanetwork.• MailScanner supportsawiderangeofMTAsandvirusscannerstoincludethepopularopensourceClamAV.SpamdetectionisaccomplishedviaSpamassassin,whichisbyfarthemostpopularandstandardizedspamdetectionengine.• WrittenandFoundedby:JulianField

Page 10: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,
Page 11: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

Abitsimpler…

Page 12: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

MailScanner asanAppliance

• MailScannercanbecombinedwithafrontendtobecomeaMailGatewayappliance• Twofrontendsareavailable:

• Baruwa – http://baruwa.org• Mailwatch - http://mailwatch.org/

• WhenproperlymanagedandconfiguredwithPostfixorEximastheMTA,onecanbuildapowerfulmailgateway

Page 13: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

MailScanner hashundredsofKnobs

• https://www.mailscanner.info/MailScanner.conf.index.html• Thedefaultsmostlyworkbutforaproductionenvironment,pleasereadthemanual!• Wewillinstallwithbasicfeaturesof

• ProcessemailandcheckforSPAMandviruses• LogallemailstoMySQL(SPAMandNotSPAM)• Storeallemailsinthequarantine

Page 14: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,
Page 15: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,
Page 16: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

MailScanner Reports

Page 17: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

LetusbuildourMailGateway

• Wewillnowsetupamailgateway• Configuringamailfilterisnoteasy.Youmustbeawareofwhatyouareenablingordisabling.Preconfiguredfileswillbeprovidedduetotimelimitation• SettingthecorrectDNSentriesiskey• Youwillfilteremailforyourneighborandhewillfilteryouremail• Attheend,youshouldhaveafairlystrongandworkingmailfilter

Page 18: Email Gateways - GitHub Pagesafnog.github.io/sse/postfix/mailfilter_preso.pdf · for virus protection and spam filtering. • MailScannerscans email for viruses, spam, phishing, malware,

References

• https://www.mailscanner.info• https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail• http://postfix.org• https://www.safaribooksonline.com/library/view/postfix-the-definitive/0596002122/ch04s05.html