In this tutorial, we will explain how to configure email in VestaCP so that the emails you send arrive in the inboxes of email services such as Gmail or Outlook.
The first thing we need to do is review this tutorial on Getting started with VestaCP to configure four important details so that everything works correctly.
DNS configuration
The first thing we will do is configure the records in our DNS zone. To do this, you will need to review our article Configuring DNS zones for our server, where you will need to add the records listed in the ‘Records for email’ section.
Once the records are configured, we will need to wait for them to propagate. We can check their propagation using the web tool IntoDNS, entering the domain and checking the MX fields, and MxToolBox SPF to check that our SPF is correct.
We 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, we will need to go to the Clouding panel and click the name of the server hosting our website and email. We will go to the Red tab and check that the ports for SMTP, IMAP and POP are open in our Firewall profile. If we use the Perfil Default, they will already be open.
Next, we will need to check that the option Permite el tráfico SMTP de salida is enabled. If you cannot enable it, you will need to contact our Support team.
Add a website
When adding a website, you can specify whether you want that domain to have email service. Make sure to select the email option, or if you have already created your domain without email, you will need to add the domain in the email section.
Configure email in VestaCP
We will need to go to Correo (1) and, above the domain we want to configure, click Editar. The first thing we need to do is disable the option Soportar DKIM (2) to avoid problems when sending emails:
Create email accounts
After these changes, we can create our email accounts and run sending tests, which should be successful if the tutorial has been followed exactly.
Is something not working properly?
If something is not working properly, the first thing we recommend is using the service Mail-Tester to see if there is a problem with the configuration. The service works very simply: it gives you an email address to which you need to send an email from your email account. Once the service receives it, it will give you a score. The recommended score is 8 or 9 out of 10.
The website will show you what can be improved. Or, if you prefer, you can send us the website link so that our Support team can tell you what needs to be improved or still needs to be configured.