Guida alla configurazione dei protocolli email di Red Sift
- Learn about MTA-STS and TLS
- What is MTA-STS?
- How does it work?
- MTA-STS policy modes
- What is TLS reporting?
- Set up MTA-STS and TLS-RPT
- 2. Add the reporting address to your DNS
- 3. Signal MTA-STS support via a TXT record
- How do you know that sending MTAs are failing MTA-STS?
- Is there an easier way to deploy MTA-STS?
- Learn about MTA-STS and TLS
- What is MTA-STS?
- How does it work?
- MTA-STS policy modes
- What is TLS reporting?
- Set up MTA-STS and TLS-RPT
- 2. Add the reporting address to your DNS
- 3. Signal MTA-STS support via a TXT record
- How do you know that sending MTAs are failing MTA-STS?
- Is there an easier way to deploy MTA-STS?
Learn about MTA-STS and TLS
What is MTA-STS?
Mail Transfer Agent Strict Transport Security (MTA-STS) is a standard that enables the encryption of messages being sent between two mail servers. It specifies to sending servers that emails can only be sent over a Transport Layer Security (TLS) encrypted connection which prevents emails from being intercepted by cybercriminals.
How does it work?
For receiving domains to enable MTA-STS, they must announce that they support MTA-STS in their DNS and publish a policy configuration file on their website. This lets the sending mail servers (that support MTA-STS) know that they should only use TLS (1.2 or higher) connections when sending emails to the receiving domain’s mail servers. MTA-STS requires the use of STARTTLS (a protocol that tells an email server that an email client wants to upgrade from an insecure to a secure connection) for messages to successfully be sent and received.
MTA-STS also lists what the MX records for the domain are therefore preventing DNS query interception where a malicious party could redirect to another MX record. If a sending mail server does not perform MTA-STS validations, emails will still be delivered as normal, and TLS will be used if the sending mail server chooses to use it.
MTA-STS policy modes
Activating MTA-STS must be done carefully to mitigate blocking emails from being delivered. To avoid this risk, MTA-STS should first be deployed in testing mode, allowing time for TLS reports to provide insight into any errors that need fixing before progressing to the final enforce stage. At this stage, the use of TLS is enforced, and MTAs that support MTA-STS will only deliver email over an encrypted and authenticated connection. TLS reporting (TLS-RPT) is then needed to notify domain owners when delivery fails due to TLS issues.
What is TLS reporting?
How do we know that sending MTAs is failing MTA-STS? Much like DMARC, the answer is emailed reports. Enter SMTP TLS reporting (or TLS-RPT for short). It enables reporting of TLS connectivity problems experienced by the sending MTAs and is defined in RFC8460. These reports include detected MTA-STS policies, traffic statistics, successful and unsuccessful connections, and failure reasons.
When you enable TLS-RPT, you will receive daily reports highlighting any emails that were sent without a secure connection and failed to be sent to you. Only with this insight can you identify and fix the issues within your mail server and ensure your inbound mail is not being blocked.
Set up MTA-STS and TLS-RPT
This sub-chapter will show you how to deploy MTA-STS and TLS-RPT on your own.
Deploying MTA-STS is relatively straightforward once you understand the components involved. Here’s an overview of what we’ll cover:
- Draft and publish the policy on a public, secured web server
- Enable SMTP TLS-RPT via a TXT record
- Signal MTA-STS support via a TXT record
Before you start the deployment, if you manage your own email server, make sure your MX records accept inbound TLS connections (according to Google’s Transparency report, about 90% of servers currently do), make sure the servers in your MX records use TLS version 1.2 or later, and that the MX server TLS certificates:
- Match the domain name used by the inbound mail server (the server in your MX records)
- Are signed and trusted by a root certificate authority
- Are not expired
These last three go hand in hand and are very likely already managed by your email host. You should only have to worry about them if you host your own mail server; if you use a third-party hosted service like G Suite, Microsoft 365, Fastmail, etc, these steps are already done for you.
1. Draft and publish the policy on a public, secured web server
Now, to start the deployment, we will proceed to draft the policy. The policy itself is pretty straightforward; here’s a sample policy:
version: STSv1 mode: testing mx: aspmx.l.google.com mx: alt1.aspmx.l.google.com mx: alt2.aspmx.l.google.com mx: *.googlemail.com max_age: 604800
The important bits are mode, mx and max_age, as version will (for now) always be the same.
Mode can be none, testing or enforce.
nonedisables MTA-STStestingtells external servers sending to you to evaluate the policy, and requests reports (via TLS-RPT), but does not enforce connection security required by MTA-STS.enforcetells external servers to verify they’re connecting to an MX listed in the policy, and that the SMTP connection is both encrypted (using TLS) and authenticated (that the server has a valid, signed certificate).
If the connection is not both encrypted and authenticated:
- Servers that support MTA-STS will not send mail to your domain.
- Servers that don’t support MTA-STS continue to send messages to your domain over SMTP connections as they normally do, but they may not be encrypted.
We recommend keeping the policy in testing mode for at least a month. That way you can get familiar with MTA-STS and fix any issues that may be brought up by the STS reports, if any.
mx lists the MX records that serve email for the domain. In almost all cases, it’s the same records you already have published in your DNS.
To specify servers that match a naming pattern, use a wildcard. The wildcard character replaces one leftmost label only, for example .domain.com or .mail.domain.com.
max_age is the amount of time the sending MTA will cache the policy. The RFC suggests a value of 1 or 2 weeks (between 604800 and 1209600 seconds), but it can be anything.
Now that we have the policy drafted, we need to publish it. The policy has to be uploaded to a public-facing web server and it must be served over HTTPS with a signed, trusted certificate (eg: Let’s Encrypt).
- Add a subdomain to your domain in the form of mta-sts.domain.com and point it to the web server
- Create a directory named .well-known
.well-knownin the subdomain. - Upload the policy file you created to the .well-known
.well-knowndirectory with mta-sts.txtmta-sts.txtas the file name.
Your policy should be available at https://mta-sts.domain.com/.well-known/mta-sts.txt
2. Add the reporting address to your DNS
Now, the last step consists of adding two DNS records: one for TLS-RPT and one to signify that you support MTA-STS and they’re both simple TXT records.
Let’s start with TLS-RPT. To receive reports you will need a mailbox where you will receive them, or you can point them to your OnDMARC address (the same as for your DMARC record) and we'll parse and display them for you.
The first TXT record should be added like this:
smtp.tls.example.com. 900 IN TXT "v=TLSRPTv1; rua=mailto:tlsrpt@example.com"
Host: smtp.smtp.tls
TTL: 900 (or your default value)
Value: v=TLSRPTv1; rua=mailto:tlsrpt@example.com
3. Signal MTA-STS support via a TXT record
Lastly, we need to publicize our support for MTA-STS. The TXT record should be added as follows:
_mta-sts.example.com. 900 IN TXT "v=STSv1; id=1575556993"
Host: _mta-sts (note the underscore at the beginning)
TTL: 900 (or your default value)
Value: v=STSv1; id=1575556993
Update the id to a new value every time you change your MTA-STS policy. External servers use the id value to determine when your policy changes. We usually use the epoch timestamp for the id value, it’s unique enough and lets you know when was the last time it was changed.
And that’s it! You’ve enabled both MTA-STS and TLS-RPT, and you’re on your way to supporting secure, un-tampered SMTP transmissions.
How do you know that sending MTAs are failing MTA-STS?
Much like DMARC, the answer is in emailed reports. These reports include detected MTA-STS policies, traffic statistics, unsuccessful connections, and failure reasons.
Enter SMTP TLS Reporting (or TLS-RPT for short). It enables reporting of TLS connectivity problems experienced by the sending MTA’s and is defined in RFC8460.
Is there an easier way to deploy MTA-STS?
The short answer is yes. With Red Sift OnDMARC’s MTA-STS feature, you don’t need to worry about complex deployment. Simply add the MTA-STS Smart Records OnDMARC provides to your DNS and we do all the hard work for you such as hosting the MTA-STS policy file, maintaining the SSL certificate, and flagging any policy violation through the TLS report.
Once MTA-STS has been enabled, you can use OnDMARC’s TLS Reports to gain clear insight into the volume of emails received over a given period and how many of them have experienced domain successes and failures. You can easily uncover more details about a specific domain’s success or failure, such as a missing or expired certificate. This granularity tells you exactly what needs fixing for you to progress to an MTA-STS enforce mode and fully secure your inbound emails.
Domande frequenti: Guida alla configurazione dei protocolli email
In un'epoca pre-DMARC, i record SPF utilizzavano comunemente il meccanismo "-all" per applicare in modo rigoroso le policy dei mittenti. Tuttavia, le attuali linee guida del settore nel 2026 favoriscono "~all" per bilanciare sicurezza e deliverability, evitando il rifiuto non necessario di email valide che potrebbero fallire SPF ma superare DKIM e DMARC.
Questo perché "~all" se implementato insieme a DMARC (in p=reject) continuerà comunque a rifiutare le email non autenticate se falliscono sia SPF che DKIM, ma non blocca la posta legittima, migliorando così la deliverability complessiva.
La specifica DMARC (RFC 7489) afferma che un prefisso "-" su un meccanismo SPF del mittente, come "-all", potrebbe far scattare il rifiuto della mail troppo presto, prima che il processo DMARC abbia luogo. Usa "-all" solo per domini inattivi o che non inviano email (domini che non inviano alcuna email). DMARC ignora le differenze tra soft fail e hard fail nella configurazione SPF, trattandoli entrambi come insuccessi SPF.
DMARC non richiede solo che SPF o DKIM abbiano esito positivo, ma anche che almeno uno dei domini usati da SPF o DKIM sia allineato con il dominio trovato nell’header From. Un corretto allineamento è fondamentale per la deliverability delle email nel 2026, poiché i principali provider di caselle di posta applicano questi requisiti.
Nel caso di SPF, l’allineamento identifica che il controllo MAIL FROM/Return-PATH debba avere esito positivo e anche che la parte di dominio del MAIL FROM/Return-PATH sia allineata con il dominio trovato nell’indirizzo From. In modalità strict, i domini devono corrispondere esattamente, mentre in modalità relaxed sono ammessi anche i sottodomini purché appartengano allo stesso dominio organizzativo.
Ad esempio, se MAIL-FROM/RETURN-PATH è @ondmarc.com e l’header From è @knowledge.ondmarc.com, in allineamento strict non sono allineati. Tuttavia, in modalità relaxed, DMARC considererebbe la verifica superata.
Un report aggregato DMARC contiene informazioni sullo stato di autenticazione dei messaggi inviati per conto di un dominio. Si tratta di un feedback XML progettato per offrire visibilità su quali email hanno superato o fallito SPF e DKIM. Il report offre al proprietario del dominio una visione precisa di quali fonti inviano email per suo conto e della disposizione di tali email (la policy applicata dal ricevente).
I destinatari verificheranno il tag 'rua' del tuo record DMARC e invieranno i report lì. Puoi specificare l'intervallo di generazione dei report aggregati usando il tag ri nel tuo record DMARC (di default è impostato a 86400 secondi, cioè 24 ore). I report forensi contengono informazioni più dettagliate su singoli fallimenti di autenticazione. Qualsiasi informazione personale identificabile (PII) viene rimossa, ma vengono inclusi dati utili al troubleshooting del fallimento DMARC, come info su fallimenti SPF e DKIM, l’intero indirizzo From e l’Oggetto dell’email.
L’indirizzo per ricevere i report forensi DMARC viene specificato tramite il tag 'ruf' nel record DMARC. Non tutti i sistemi riceventi supportano l’invio di report forensi. Red Sift OnDMARC è una delle poche applicazioni DMARC sul mercato a ricevere report forensi grazie alla partnership con Yahoo.
Una macro SPF è un meccanismo utilizzato nei record SPF per definire insiemi riutilizzabili di indirizzi IP. Le macro SPF aumentano la flessibilità e la manutenzione dei record SPF, permettendoti di definire insiemi complessi di IP in un singolo meccanismo, che può poi essere richiamato in più record SPF. Ad esempio, invece di elencare singolarmente tutti gli IP autorizzati, puoi definire una macro come "%{i}", che richiama l’IP del mittente dell’email. Gestendo SPF in questo modo, puoi controllare una lunga lista di IP senza superare il limite di lookup e anche nascondere gli IP autorizzati a chi fa query pubbliche.
Tuttavia, a seconda di come è strutturato il record SPF con le macro, la mancanza di espansione delle macro può causare insuccessi SPF o risultati "Neutral" (indicati dal meccanismo ?all). Se le macro SPF sono critiche per autorizzare server di invio legittimi, l’email potrebbe più facilmente fallire i controlli SPF o essere segnalata come sospetta dai riceventi che si basano su SPF per l’autenticazione.
Mail Transfer Agent Strict Transport Security (MTA-STS) è uno standard che consente la crittografia dei messaggi inviati tra due server di posta. Specifica ai server mittenti che le email possono essere inviate solo tramite una connessione crittografata Transport Layer Security (TLS), impedendo così che possano essere intercettate da cybercriminali.
L’adozione di MTA-STS è cresciuta significativamente, con le organizzazioni che nel 2026 riconoscono la sicurezza del trasporto come essenziale per proteggere le email in transito. Per abilitare MTA-STS, i domini riceventi devono annunciare il supporto a MTA-STS tramite DNS e pubblicare un file di configurazione della policy sul proprio sito web.
L’attivazione di MTA-STS va eseguita con cautela per evitare il blocco della consegna delle email. Si dovrebbe prima implementare MTA-STS in modalità test, permettendo ai report TLS di evidenziare eventuali errori da correggere prima di passare alla modalità enforcement definitiva. Questo approccio graduale diventerà probabilmente pratica standard nel 2026 per le organizzazioni che implementano la sicurezza del trasporto.
SMTP TLS Reporting (o TLS-RPT) consente la reportistica dei problemi di connettività TLS riscontrati dai server mittenti (MTA) ed è definito nella RFC8460. Proprio come DMARC, TLS-RPT invia report via email per notificare ai proprietari di dominio eventuali problemi di consegna dovuti a TLS. Questi report includono policy MTA-STS rilevate, statistiche sul traffico, connessioni non riuscite e motivi dei fallimenti.
Con la funzionalità MTA-STS di Red Sift OnDMARC, non devi preoccuparti di un’implementazione complessa. Basta aggiungere gli Smart Records MTA-STS forniti da OnDMARC al tuo DNS e Red Sift si occuperà di tutto il lavoro, come ospitare il file di policy MTA-STS, mantenere il certificato SSL e segnalare eventuali violazioni della policy tramite il report TLS. Le moderne piattaforme DMARC nel 2026 includono sempre più spesso MTA-STS ospitato come funzionalità standard, semplificando il deployment della sicurezza del trasporto.
Pubblicato con la RFC 7671, DANE (DNS-based Authentication of Named Entities) introduce un nuovo standard Internet per instaurare la comunicazione TLS tra client e server, senza dipendere dalle Certificate Authority (CA) fidate.
Il modello tradizionale delle CA per TLS permette a qualsiasi CA di emettere certificati per qualsiasi dominio. DANE opera diversamente affidandosi all’infrastruttura DNSSEC (Domain Name System Security Extensions) per vincolare un dominio a un certificato. DANE si serve dell’attuale protocollo DNSSEC per assicurarsi che i dati ricevuti siano autentici e non manomessi.
DANE introduce anche un nuovo tipo di record DNS chiamato TLSA che segnala al client che un server supporta TLS. Si consiglia di implementare sia MTA-STS sia DANE. DANE è un requisito di molti enti pubblici — per esempio, spesso le agenzie pubbliche dell’UE sono obbligate ad implementarlo.
DANE e MTA-STS sono efficaci solo se il mittente li supporta; poiché molti supportano solo uno dei due, implementarli entrambi migliora la sicurezza complessiva. Nel 2026, le organizzazioni spesso implementano prima MTA-STS per compatibilità più ampia e in seguito aggiungono DANE per una sicurezza avanzata quando richiesto.
La subdomain policy consente agli amministratori di dominio di proteggere i vari domini e sottodomini a seconda dello stadio in cui si trovano nel percorso DMARC. Per esempio, se tutti i servizi che inviano email per conto del tuo dominio principale sono configurati correttamente con SPF e DKIM, puoi proteggere il dominio principale con una policy DMARC p=reject lasciando i sottodomini su p=none, e viceversa.
Ancora, se hai un servizio di invio email che non è compatibile con DMARC (non supporta SPF o DKIM), potresti decidere di attribuirgli un sottodominio che avrà una policy DMARC diversa, senza impedirti di proteggere gli altri domini. In questo modo puoi suddividere il traffico tra vari sottodomini e proteggere ciascuno separatamente.




