In this tutorial, we will explain how to configure email in HestiaCP so that the emails you send reach the inboxes of email services such as Gmail or Outlook.
First, review our tutorial Getting started with HestiaCP to configure four important settings so that everything works correctly.
DNS configuration
First, configure the records in your DNS zone. To do this, review our article Configuring DNS zones for your server, where you will need to add the email records.
Once the records are configured, wait for them to propagate. You can check their propagation using the online tool IntoDNS by entering your domain and checking the MX fields, and use MxToolBox SPF to check that your SPF is correct.
You can also check this from the console by running the following:
# nslookup -q=mx midominio.com
Servidor: google-public-dns-b.google.com
Address: 8.8.4.4
Respuesta no autoritativa:
midominio.com MX preference = 10, mail exchanger = mail.midominio.com
And for SPF:
# nslookup -q=txt midominio.com
Servidor: google-public-dns-b.google.com
Address: 8.8.4.4
Respuesta no autoritativa:
midominio.com text = "v=spf1 a mx ip4:46.183.XXX.XXX ~all"
Server configuration
Next, go to the Panel de Clouding and click the name of the server hosting your website and email. Go to the "Red" tab and check that the ports for SMTP, IMAP and POP are open in your Firewall profile. If you use the Perfil Default, they will already be open.
Next, check that the Permite el tráfico SMTP de salida option is enabled. If you cannot enable it, contact our Support team.
Adding a website
When adding a website, you can choose whether to enable email service for that domain. Remember to select the email option. If you have already created your domain without email, you will need to add the domain in the email section.
Configuring email in HestiaCP
Go to Correo (1) and, above the domain you want to configure, click Editar. First, disable the Soportar DKIM (2) option to avoid problems when sending emails:
Additionally, to secure your mail server with Let's Encrypt, enable "Enable SSL for this domain". Keep in mind that your DNS zone configuration must include the "mail" and "webmail" records pointing to the server in order to create the certificate.
Creating email accounts
After making these changes, you can create your email accounts and test sending emails. These tests should succeed if you have followed the tutorial exactly.
Is something not working correctly?
If something is not working correctly, our first recommendation is to use the Mail-Tester service to check for configuration problems. The service is very simple to use: it gives you an email address to which you send an email from your email account. Once the service receives it, it gives you a score. The recommended score is 8 or 9 out of 10.
The website will show you what can be improved. If you prefer, you can send us the link so that our Support team can tell you what needs to be improved or still needs to be configured.