Redirect mail from a domain

The mail is one of those services in which you usually have a main account and the rest of the domains end up forwarding everything to your account. And if that’s your usual situation, here’s an optimal way to do it.

And even if you have to redirect the mail, it may be that your mail or hosting provider requires some configurations or has an extra cost. How to get this easily and for free?

There are several services like the one I’m going to explain, but this one is simple, has an unlimited free version that allows you the main goal, and is easy to set up. In addition, if you set up a website on a site that does not have mail, it is the ideal solution.

Registration and Registration

Let’s use the Forward Email tool for this. So, the first thing is to enter Forward Email and register for free.

Once inside, it will ask you to add the domain to which you want it to collect all the mail. By default, you can disable the premium option (theoretically it is not necessary), although it is an interesting option, especially for privacy.

Agregar el dominio y continuar.

Basic configuration

Once added, we will have to add some configurations in the DNS of the domain to validate that it is us.

The first is to include two MX entries that are the ones that will allow the mail to arrive:

example.com 86400 MX 10 mx1.forwardemail.net
example.com 86400 MX 10 mx2.forwardemail.net

The cache time can be the one you want. If it is something that you do not plan to change, the optimal would be to put 86400 (one day), or you can reduce it to 3600 (one hour). The higher, the better (but without going over a day).

This service, by default, allows any email sent to you to lo_que_sea@example.com be forwarded to an address that you decide. For this, we will include a TXT entry like this:

example.com 300 TXT forward-email=micorreo@dominio.es

In this case, if we want to make changes (which we will) it is best to reduce the time to 300 seconds (5 minutes) in case we want to modify the emails.

Although the initial documentation does not indicate it, if we want to avoid problems in receiving the mail, we should include the SPF entry. With this we will give that the IP list of the provider are in the whitelist to be able to forward the mail.

example.com 3600 TXT v=spf1 a mx include:spf.forwardemail.net -all

Once we have added these entries to the DNS, we must press the button and verify.

Los registros están pendientes de verificación.

And if you’ve done your homework right…

Los registros se han validado.

Operation

At this time, if we send an email to prueba1@example.com, the mail will reach us, in a few seconds, to the main email address.

By default the system is a “catch-all”, which means that any email that is sent to that domain, will reach the main account.

Other free options

There are several combinations that can be configured at the domain level and that can be very interesting.

Catch-All

This is the option we have configured. All the mail de lo_que_sea@dominio.com will reach us to a single email account.

example.com 300 TXT forward-email=micorreo@dominio.es

In case you want the complete receipt of the mail to go to several accounts, you can also.

example.com 300 TXT forward-email=micorreo1@dominio.es,micorreo2@dominio.es

Only one account

It is possible that not all the mail reaches the same account, and that you really only need a single account. For example, that the account wordpress@example.com is the only one that exists.

example.com 300 TXT forward-email=wordpress:micorreo@dominio.es

Multiple accounts

If you have a few accounts, you can use a similar setting, separating the accounts by commas.

example.com 300 TXT forward-email=wordpress:micorreo@dominio.es,soporte:misoporte@dominio.es

TXT text fields in DNS should in principle contain no more than 255 characters, so if you want to create infinite email accounts, you can do so by adding multiple DNS entries.

example.com 300 TXT forward-email=wordpress:micorreo@dominio.es,soporte:misoporte@dominio.es
example.com 300 TXT forward-email=ayuda:miayuda@dominio.es,tecnixo:mitecnico@dominio.es

Multiple recipients

Another common possibility is to have a user to forward to multiple recipients. We can do this too.

Even so, in principle there is a maximum limit of 10 recipients.

example.com 300 TXT forward-email=wordpress:micorreo1@dominio.es,wordpress:micorreo2@dominio.es

Global aliases

Probably this is the entry that makes the most sense when configuring, and that is that the system, already by default, has a 1:1 ratio of email accounts. This way each account will be sent to the same account in the destination domain. In this case the domain example.com will be forwarded, account by account, to dominio.es.

example.com 300 TXT forward-email=dominio.es

Block a user

If we want to block a user, we can do so by telling them which user to block.

example.com 300 TXT forward-email=!usuario

Premium service

There is a paid version of this service in which, paying 3 dollars per month, you can manage all these changes, aliases and settings through its own control panel.


About this document

This document is regulated by the EUPL v1.2 license, published in WP SysAdmin and created by Javier Casares. Please, if you use this content in your website, your presentation or any material you distribute, remember to mention this site or its author, and having to put the material you create under EUPL license.