Self Hosted Mail Server Lessons Learned

Sharing some lessons learned from hosting a Mail-in-a-box server on Linode during 2021.

Ian Cleary

Posted: Friday, December 24, 2021

2 min read

Table of Contents

Article Content

Here are some of lessons learned after self hosting my personal email for the last 8 months.

  • Use a mail-tester to evaluate the "spamminess" of your outbound emails
  • SPF records to let receiving mail servers verify where the mail is coming from
  • Optionally, use a service like Mail Route to add compliance, quarantine rules to allow and deny domains and specific email addresses, and to hold mail while performing server maintenance

Test and Verify

Send an outbound email to a testing service, such as https://www.mail-tester.com/.

This helped me determine several DNS records were not set, that Spam Assassin would filter out on some email providers. An example was that I needed to set some SPF records to increase the score (to be less like spam).

Once that was done, the score increased and I was able to send email to GMail once again.

SPF Records

Open SPF Description of SPF Record Syntax

For my email server, I chose the following:

v=spf1 mx ip4:74.207.249.157 a:iancleary.me a:box.iancleary.me \~all

My email server is hosted at box.iancleary.me, but all email addresses are sent from iancleary.me. It is likely then that only the ip4 and a:iancleary.me sections are needed, but I wanted to cover my bases.

MailRoute

MailRoute is a great service for adding an additional layer of security onto your email hosting.

Active cybersecurity for email Stop ransomware, other attacks, and spam. Office 365, GCC High and G Suite custom integrations. Protect hardware and productivity with our suite of security services.

Conclusion

That's all for now! Let me know if you have any tips by commenting below.