- Email DIY
How to Conduct a Comprehensive Email Deliverability Audit
This post was written by Jonathan Novak, Head of Engineering at UserVoice, where he just celebrated his 3rd year at the company. UserVoice is a complete solution for managing user engagement, feedback, helpdesk requests, and knowledge bases. Over 120,000+ organizations in over 170 countries use it to listen to their users’ voices.
About two years ago, we ran UserVoice’s ticketing system on our own Postfix servers. We’ve since swapped to Mailgun for both incoming mail and outgoing mail, and are really happy about it. Here’s our story and problems that we dealt with in regards to incoming email.
Our initial ticketing system used Postfix to handle incoming (and outgoing) email. Postfix is really solid software, but it’s a bit dated, and honestly, the documentation for it is a bit obtuse. This is compounded by the fact that we weren’t setting up Postfix in a ‘normal’ way. Most tutorials and examples show you how to configure discrete users and mailboxes within postfix, but we wanted to manage all of that within our Rails app.
After a lot of dorking around, we finally got it working. We got a shell script to execute for each incoming email, which added the email Redis via a Resque job.
Within the resque job, we then parsed the email using TMail. One issue we ran into was with encodings. Our Rails app is designed to work with UTF-8 and Ruby 1.9.3 encoding support, but TMail has legacy encoding support. We tried the new Mail gem, but it failed to parse a mail if it had anything ‘funny’ about it. Email is like the wild west: anything goes. Your parser should be extremely robust, and the Mail gem (~2 years ago) was not.
After we parse the email, we then need to parse the body to separate out the new portions of the email from the quoted thread/history of the email. Our first version was relatively naive, and basically just split on “On xx/xx/xxxx, Some One replied:”. We then considered the top part of that the new portion of the message. Our system did not handle ‘inline’ replies very well.
If there was ever an issue and we needed to find diagnostics, we had to ssh into our postfix box and grep our logs. This was ok, but our less-technical support staff couldn’t autonomously solve issues.
In terms of redundancy or scaling, we had one box. Luckily it never went down, and luckily we didn’t need to scale.
Mailgun addresses all of these issues.
First, we no longer need to wrestle with Postfix. By configuring a simple “catch_all” rule in Mailgun, all emails addressed to *@*.uservoice.com are posted to our servers via HTTP.
These emails come pre-parsed. Everything posted to our servers arrives in UTF-8. That alone is worth its weight in gold.
Beyond that, Mailgun automatically separates out the new portions of the message from the thread. They’re included as a parameter called “stripped-text” in the webhook, which is exactly what we need when we show a message in UserVoice. We no longer have to maintain a messy collection of regular expressions. Plus, it automatically handles inline replies.
Our support team has full searchable logs of all incoming and outgoing messages. No more grepping around for messages, and the interface Mailgun provides is completely accessible to our Support Team.
Finally, we no longer have to worry about scaling our servers, failover, and things of that nature. Mailgun handles all of that for us.
Mailgun’s technical team and their support are top notch. They’re always responsive and helpful. They’ve come through and implemented key features when we needed them to close certain customers. They proactively let us know about problems (like spamming customers) and possible configuration issues. They also help us track down issues when our customers are struggling to forward email. As a company that is completely focused on making customer support better, we like that!
Learn about our Deliverability Services
Looking to send a high volume of emails? Our email experts can supercharge your email performance. See how we've helped companies like Lyft, Shopify, Github increase their email delivery rates to an average of 97%.
Last updated on August 28, 2020
How to Conduct a Comprehensive Email Deliverability Audit
Meet Our Amazing Pathwire Mavericks!
International Women’s Day: How Pathwire’s Female Leaders Choose To Challenge
Mailpets: For The Love Of Animals
The Mailgun Maverick Program Is Here!
Force for Change: It's Time to Speak Out
HTTP Crash Course
How we built a Lucene-inspired parser in Go
Sending Email Using The Mailgun PHP API
Building Email Lists Of Contacts That (Actually) Want To Hear From You
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
Become an Email Pro With Our Templates API
Google Postmaster Tools: Understanding Sender Reputation
Navigating Your Career as a Woman in Tech
Implementing Dmarc – A Step-by-Step Guide
Email Bounces: What To Do About Them
Announcing InboxReady: The deliverability suite you need to hit the inbox
Black History Month in Tech: 7 Visionaries Who Shaped The Future
How To Create a Successful Triggered Email Program
Designing HTML Email Templates For Transactional Emails
InboxReady x Salesforce: The Key to a Stronger Email Deliverability
Implementing Dmarc – A Step-by-Step Guide
Announcing InboxReady: The deliverability suite you need to hit the inbox
Designing HTML Email Templates For Transactional Emails
Email Security Best Practices: How To Keep Your Email Program Safe
Mailgun’s Active Defense Against Log4j
Email Blasts: The Dos And Many Don’ts Of Mass Email Sending
Email's Best of 2021
5 Ideas For Better Developer-Designer Collaboration
Mailgun Joins Sinch: The Future of Customer Communications Is Here
Always be in the know and grab free email resources!
By sending this form, I agree that Mailgun may contact me and process my data in accordance with its Privacy Policy.