No se encontraron resultados...

Cómo fusionar registros SPF

Es posible que tengas que incluir varios valores SPF en la zona DNS de tu dominio si envías correos electrónicos a través de varios servicios. 

Solo es posible tener un registro SPF en la zona DNS de tu dominio. Tener más de un registro SPF hará que la autenticación sea imposible.


Si necesitas incluir más de un registro SPF en tu zona DNS, debes fusionarlos en un solo registro incluyendo todos los valores o mecanismos en el mismo registro.

Supongamos que tu dominio ya está autenticado a través de Outlook, por lo que tienes el registro

SPF v=spf1 a include:spf.protection.outlook.com -all.

Ahora, deseas autenticar tu dominio con MailerLite, por lo que debes agregar el segundo registro

SPF v=spf1 a mx include:_spf.mlsend.com ~alll

a tu página DNS.

Echemos un vistazo a las diferentes partes o mecanismos de un registro SPF para comprender mejor cómo funciona.

El prefijo "v"

La primera parte de un registro SPF comienza con v=spf1, que simplemente identifica el registro como la primera versión de SPF. Esta es la única versión que existe por el momento. Dado que puedes agregar varios registros TXT, esto básicamente le dice al DNS del dominio que trate este registro como SPF.

El mecanismo "a"

Ambos registros también contienen el mecanismo a posterior, que básicamente indica la dirección de tu dominio en un número IP. La IP de envío debe coincidir con el registro A del dominio de remitente que se va a autenticar.

El mecanismo "mx"

Solo el de MailerLite incluye el mecanismo mx que indica qué servidores de correo electrónico se deben utilizar cuando se retransmiten los correos electrónicos. La IP de envío debe coincidir con el registro MX del dominio del remitente que se va a autenticar.

El mecanismo de "inclusión"

La parte central de un registro SPF comienza con include, que básicamente le dice al DNS que incluya este dominio en particular en la configuración SPF de tu dominio. Permite autenticar los correos electrónicos a través de las mismas IP permitidas en el dominio incluido.

El mecanismo "todos"

La última parte de un registro SPF, el mecanismo all define cómo se debe tratar un correo electrónico. Siempre debe estar al final del registro, y se requiere que sea un registro SPF válido.

Este mecanismo incluirá uno de los siguientes calificativos:

  • +all : es el prefijo predeterminado, por lo que se puede omitir

  • ?all : agregar esta regla crea la impresión de que no hay SPF, por lo que no se recomienda

  • -all : será rechazado y no enviado y si el correo electrónico no cumple con las reglas establecidas 

  • ~all: se enviará pero se etiquetará como SOFTFAIL si el correo electrónico no cumple con las reglas establecidas

A continuación se muestra cómo combinar los siguientes registros SPF de ejemplo para Outlook y MailerLite:

v=spf1 a include:spf.protection.outlook.com -all

v=spf1 a mx include:_spf.mlsend.com ~all

1. El registro SPF comienza siempre con el prefijo de la versión:

v=spf1

2. Ambos registros contienen un mecanismo "a" y el registro SPF de MailerLite contiene un mecanismo "mx", así que incluye ambos en el nuevo registro:

v=spf1 a mx

3. A continuación, añade ambos mecanismos "include" en el registro, dando como resultado:

v=spf1 a mx include:spf.protection.outlook.com include:_spf.mlsend.com

4. Por último, tenemos que definir cómo se tratarán los correos electrónicos que no cumplan las normas establecidas. Para ello utilizamos el mecanismo all. La última parte tiene que ser ?all, -all o ~all. No es posible tener más de uno, por lo que en última instancia es tu elección qué declaración de todos tus dominios utilizarás.

El registro SPF combinado se vería así:

v=spf1 a mx include:spf.protection.outlook.com include:_spf.mlsend.com ~all


When authenticating your domain, you will have to add an SPF record in your domain's DNS settings. An SPF record indicates which IP addresses and/or hostnames have been authorized to send emails from your domain.

You may have to include several SPF values in the DNS zone of your domain if you send emails through several services. 

It is only possible to have one SPF record in the DNS zone of your domain. Having more than one SPF record will make the authentication impossible, and some hosting providers won’t even allow you to have more than one.  

If you need to include more than one SPF record in your DNS zone, then you should merge them into a single record by including all the values or mechanisms in the same record.

Let’s assume your domain is already authenticated through Outlook, so you have the SPF record v=spf1 a include:spf.protection.outlook.com -all.

Now, you want to authenticate your domain with MailerLite, so you have to add the second SPF record v=spf1 a mx include:_spf.mlsend.com ~all to your DNS page.

Let’s look at the different parts or mechanisms of an SPF record to better understand how it works.

The “v” prefix

The first part of an SPF record starts with v=spf1, which simply identifies the record as the first version of SPF. This is the only version that exists at the moment. Since you can add several TXT records, this basically tells the DNS of the domain to treat this record as SPF.

The “a” mechanism

Both records also contain the a mechanism afterward, which basically indicates the address of your domain in an IP number. The sending IP must match the A record of the From domain to be authenticated.

The “mx” mechanism

Only the one from MailerLite includes the mx mechanism, which indicates which email servers should be used when emails are being relayed. The sending IP must match the MX record of the From domain to be authenticated.

The “include” mechanism

The middle part of an SPF record begins with include, which basically tells the DNS to include this particular domain in the SPF setup of your domain. It allows emails to be authenticated through the same IPs allowed in the included domain.

The “all” mechanism

The last part of an SPF record, the all mechanism defines how an email should be treated. It should always be at the end of the record, and it is required to be a valid SPF record.

This mechanism will include one of the following qualifiers:

  • +all - it's the default prefix, so it can be omitted

  • ?all - adding this rule creates the impression that there is no SPF, so it’s not recommended

  • -all - it will be rejected and not sent and if the email doesn’t comply with the set rules

  • ~all - it will be sent but tagged as SOFTFAIL if the email doesn’t comply with the set rules

To merge the SPF values, simply include all the parts into one single record, without repeating any mechanisms. 

This means that if both records have an a, it should only be included once at the beginning in the default record. If only one of the records includes an mx, it should also be included in the first part. 

However, please note that the last part has to be either ?all, -all or ~all. It’s not possible to have more than one, so it is ultimately your choice which declaration of all your domains will use. 

The merged SPF record would look like this:

v=spf1 a mx include:_spf.mlsend.com include:spf.protection.outlook.com -all.

Editado por última vez: 28 de feb. de 2024