Question

Best practice for mailserver setup

  • Posted on September 11, 2014
  • marcelAsked by marcel

Hi,

I followed an tutorial about setting up a mailserver.

I have setup the following DNS records for my domain in DO`s DNS manager: Mx 5 mail.mydomain.com. Txt @ “v=spf1 mx -all” A mail.mydomain.com. IP.AD.RE.SS

This should setup mail.mydomain as mailserver right? I am using virtualmin which has postfix mailserver running.

This is not (yet) working for this domain, but I got it working on another domain, so that does not really matter for now. What matters is that i`m wondering if this is the ideal configuration for a mailserver. Am I not missing a few backup TXT or Mx records?

What are the best practices, DNS records or postfix tips to setup mailserver for reliable e-mail sending and receiving? Also, what are the pitfalls of my setup? I use dovecot for IMAP mail sending and receiving.

I`m totally new on this so hopefully someone can help.

What is essential that I can setup a mailserver like mail.mydomain.com, or mail.myserverfqdn.nl , something like that.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

With this configuration you are able to send mail for all servers in the world :)

remember that your vps name need to be the same of your mx name: mail.mydomain.com. When you have your vps name as your mx record name, your PTR record on DO dns servers answer with “mail.mydomain.com”, this is essentials to your server work perfectly.