390 likes | 404 Views
HOW-TO: Improve Email Deliverability with your cPanel Server. by Kevin A. McGrail aka KAM. Introduction. Kevin A. McGrail aka KAM. linkedin.com/in/kmcgrail. My Oddest Resume Entry. Some Definitions. What is Spam?. CAN-SPAM and similar laws don’t matter. “Bulk” Status doesn’t matter.
E N D
HOW-TO: Improve Email Deliverability with your cPanelServer by Kevin A. McGrail aka KAM
Kevin A. McGrail aka KAM linkedin.com/in/kmcgrail
What is Spam? CAN-SPAM and similar laws don’t matter. “Bulk” Status doesn’t matter. GDPR doesn’t matter.
Chris Santerre What is Spam? “Consent vs Content”
What is Spam? #1 Source of Cursing #1 Support Ticket #1 Security Vector
What is Not Spam? Transactional emails are an Automatic form of Consent. They are NOT Spam.
What is Apache SpamAssassin? A Scoring Framework An API & a Program Used by cPanel
Some SMTP & Spam Basics Response Codes: 2xx/4xx/5xx Greylisting Pros & Cons SMTP Greet Pause & Ratware
Acronyms to Know FPs – False Positives FNs – False Negatives RBL – RealtimeBlockLists
UnPC Terms to Know Whitelisting Blacklisting Ham/Yam
What is Email Deliverability Getting to the Inbox Reliability “Fire and Forget”
Quiz >^..^<
Quiz _______
Quiz 8-)[>-=/ / / >
How to improve Email Deliverability Step 1 Use Static IPs Use Fully Qualified Reverse Pointers (rPTRs) Policies & Guidelines: https://postmaster.aol.com/ & https://gmail.com/postmaster/
SPF Records Step 2 Setup SPF (openspf.org) Try and get to a “-all”. DO NOT USE +all or ?all. Use Includes include:raptor.pccc.com is short for “v=spf1 ip4:69.171.29.0/25 ip6:2604:9100:7:9::/64 ip4:38.124.232.0/24 ip6:2001:550:2A00:1::/64 -all” Lots of tools to help but none of them will magically know your network setup.
DKIM & DMARC Step 3 Setup DKIM https://documentation.cpanel.net/display/68Docs/Authentication Setup DMARC Dmarcian.com
Troubleshooting Tips Review Mail Logs Review Email Headers Email Culpability
Troubleshooting Tips MXToolBox(monitoring, checking config, blacklisted) cpanelloop@pccc.com
No, hits=-16.7 required=5.8 tests=ENV_AND_HDR_SPF_MATCH,HTML_MESSAGE,KAM_RPTR_PASSED, RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_PASS,TXREP, USER_IN_DEF_SPF_WL cpanelloop@pccc.com No, hits=-16.7 required=5.8 tests=ENV_AND_HDR_SPF_MATCH,HTML_MESSAGE,KAM_RPTR_PASSED, RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_PASS,TXREP, USER_IN_DEF_SPF_WL No, hits=-16.7 required=5.8 tests=ENV_AND_HDR_SPF_MATCH,HTML_MESSAGE,KAM_RPTR_PASSED, RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_PASS,TXREP, USER_IN_DEF_SPF_WL No, hits=-1.1 required=5.8 tests=DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HTML_MESSAGE,KAM_NUMSUBJECT,KAM_RPTR_PASSED, MIME_HTML_MOSTLY,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_PASS,TXREP
RBLs and Beyond What is an RBL & How to Add MoreURIBL/SURBL/Invaluement Free for Some / Disable Rbldnsd ZetaScan Using Redis (No More DNS Kludges)
How to improve email deliverability Centralize your outbound SMTP using Smarthosts https://documentation.cpanel.net/display/68Docs/Exim+Configuration+Manager Pros: Easier to Manage & Track Issues Cons: Might not support DKIM out of the box! One spammer / compromised box can cause issues for all
Stay Off Blacklists Stay off real-time blacklists Consider your customer base carefully Monitor things with https://mxtoolbox.com/
Feedback Loops AOL Postmaster Feedback: https://postmaster.aol.com/fbl-request JMRP/Hotmail/live/msn/microsoft: https://mail.live.com/mail/services.aspx https://sendersupport.olc.protection.outlook.com/pm/Services.aspx Yahoo Complaint Feedback Loop: https://help.yahoo.com/kb/SLN3438.html Gmail Postmaster Tools: (Their feedback loop requires MAAWG membership) https://gmail.com/postmaster/ Return Path: (Comcast, Cox, Rackspace and several other ISPs use them - 18 in total) https://fbl.returnpath.net/ Even More: https://sendgrid.com/blog/email-feedback-loops-101/ Mailing lists are #1 cause of false reports
Next Steps ARC shows Promise https://www.dmarcanalyzer.com/arc-is-here/ Brand Indicators for Message Identification (BIMI)http://www.brandindicators.org/
Apache SpamAssassin tweaks for cPanel Latest KAM, deadweight & heavyweight 40% increase in performance with a negligible impact on effectiveness Use your own DNS server. Do NOT use 8.8.8.8!
Write Your Own Rules Meta Rules cause the least FPs Regular Expressions Test your Syntax: spamassassin --lint
Write Your Own Rules Rules only affect YOUR installation! Think about Custom Rules for your Firm Pfizer Story
Example Meta Rule #HEART ATTACK SPAM body __KAM_HEARTPROD1 /heart ?attack/i body __KAM_HEARTPROD2 /enzyme/i header __KAM_HEARTPROD3 Subject =~ /heart attack|healthy.{4,10}cells/i header __KAM_HEARTPROD4 From =~ /clear 7/i meta KAM_HEARTPROD (__KAM_HEARTPROD1 + __KAM_HEARTPROD2 + __KAM_HEARTPROD3 + __KAM_HEARTPROD4 >= 4) describe KAM_HEARTPROD Snake Oil Heart Health du Jour score KAM_HEARTPROD 7.0
Writing Rules https://wiki.apache.org/spamassassin/WritingRules
cPanel Specific Gotchas #Add More RAM free –h #Make sure you have spare children ready to go cat /etc/cpspamd.conf maxspare=1maxchildren=3 #Disable the dormant services for spamd WHM > Server Configuration > Tweak Settings > Dormant Services
Or, without the app: http://events.bizzabo.com/polls/011731
Image Credits: KAM - Photo by Ted King Cow - Keith Weller/USDAApache SpamAssassin Logo – Apache.orgVoodoo Doll - https://pixabay.com/en/doll-voodoo-magic-1264034/NOTE: VT Logo & BIMI images used under fair use guidelines.