Outbound Wiki

Third-party sender authentication

How to authorize email service providers and other external systems to send authenticated mail for a domain.

Treat a third-party sender as a new route into your domain. Identify the system, set its domain records, and check the identity it presents when mail arrives. Email authentication is a group of standards for identifying and preventing delivery of messages from forged senders.1 One permission record is not enough. Messages sent by third-party services must be authenticated and pass SPF and DKIM checks.2 Give each sender its own change record and clear domain boundary.

Build the sender inventory

Start with a complete inventory. You need to know every system that can send before deciding which records and policies it needs.

List every domain and sending service authorized to send for you, including marketing campaign platforms and invoice generators.3 Automatic email from Contact us forms belongs on the list too.4 Get missing sender details from the website administrator or the third-party service.5

Ask:

  • Which systems send mail for this domain?
  • Which domain does each system use in its visible sender address?
  • Which system owns the sending configuration?
  • Which workflows send automatically?

Move on when each sender has an identified service, sending domain, and reason for sending. An unknown sender is an unresolved change, so leave it out of the approval record until someone can explain it.

Choose the domain boundary

Give each sender a domain boundary before publishing records. This prevents an external service from sharing more authority than its job requires.

For services you do not control, use subdomains to protect the main domain's reputation and avoid exceeding the DNS lookup limit.6 Ask the service which domain it expects to authenticate and whether it supports the boundary you chose. Record that decision beside the sender in your inventory.

Move on when the sender has one clear domain to authenticate. If the service cannot tell you which domain it will use, resolve that with the service before adding DNS records.

Authorize the sending path

Give the sender permission to use the chosen domain. The record should describe the actual source the service uses to send.

SPF specifies the source email servers authorized to send mail for a domain.7 For an email marketing service, add its IP addresses to the SPF records and set up DKIM.8 An include tag identifies a third party as authorized to send on behalf of the domain.9

Ask the service:

  • Which source servers or include does this sender require?
  • Which SPF record or records should be published?
  • Will the service send from the domain you assigned to it?

Use the sender's exact authorization details, then check that the domain record represents the service you approved. Move on when the SPF path matches the sender in your inventory.

Add the signing proof

Authorization identifies an allowed source. Signing gives the message a domain identity that can be checked after delivery.

DKIM uses a domain to digitally sign important message elements so the message can remain unaltered in transit.10 Contact each authorized domain or sending service, request DKIM configuration, and obtain its public key.11 For a SaaS sender, add the TXT or CNAME records it provides to your DNS.12

Ask:

  • Which DKIM records must be published?
  • Which domain will the signature use?
  • What public key belongs to this sender?

Keep the signing details with the sender record. Move on when you have the provider's records and know which sending service they belong to.

Connect the sender to domain policy

A sender can have a valid source and signature while still presenting a domain relationship you have not accounted for. Set the relationship you want the receiving system to evaluate.

Third-party senders often use their own domain as the Return-Path domain.13 For SPF alignment, add the sender's include to your SPF record and configure a custom Return-Path domain.14 For DKIM alignment, add the TXT or CNAME records the sender provides to your DNS.12

DMARC specifies what to do with messages that fail SPF or DKIM checks for senders in the domain and where to send the results.15 Decide which sender identity should align through SPF, which should align through DKIM, and where the results should go. Record those choices before approving the sender.

Move on when the sender's source, signature, Return-Path, and policy relationship are documented together. That record gives you something to check when the service changes its sending setup.

Verify the finished route

Verification compares the DNS configuration with the result of an actual message. Use that result as the gate for approval.

Send a message through the third-party service and inspect whether it passes SPF and DKIM. Approve the sender only after both checks pass.2 Use the DMARC reporting destination to review results after the sender is live.15

If the result fails, trace it through the inventory, domain boundary, SPF path, signing records, and Return-Path. Change one part at a time so you can tell which configuration fixed the result.

Include the receiving route in that review when MX records lead through on-premises systems or third-party relays before Microsoft 365. Standard checks such as SPF hard-fail and strict DMARC enforcement may not apply correctly across those paths.16

What not to do

Keep these failure modes beside the approval checklist. Each one can leave a sender able to send without giving you a dependable authentication result.

  • Do not give a scanner or web application a mailbox username and password for sending. Use an SMTP server.17
  • Do not assume a dedicated sending mailbox has resolved authentication and security concerns.18
  • When a relay uses a trusted sender setting, limit it to trusted senders and use an authentication method as well.19
  • Do not assume complex MX routing will apply SPF hard-fail and strict DMARC checks correctly.16

Use the completed inventory and verification result as the approval record, with each sender attached to one domain boundary. When a sender changes its route or signing records, repeat the same check before allowing it to send.

Sources

  1. 1
    “Email authentication (also known as email validation) is a group of standards to identify and prevent the delivery of email messages from forged senders (also known as spoofing).”
  2. 2
    “you must make sure that messages sent by third-party services are authenticated and pass SPF and DKIM checks:”
  3. 3
    “Create a list of all domains and sending services (such as marketing campaign platforms or invoice generators, also referred to as ESPs) that are authorized to send email on your behalf.”
  4. 4
    “Services that send automatic email, for example "Contact us" forms”
  5. 5
    “You might need get this information from your web site admin or any third-party services.”
  6. 6
    “In addition to preserving the reputation of your main email domain, not exceeding the number of DNS lookups is another reason to use subdomains for other email services that you don't control.”
  7. 7
    “Sender Policy Framework (SPF): Specifies the source email servers that are authorized to send mail for the domain.”
  8. 8
    “That is, you need to ensure that you add the IP addresses to your SPF records and set up DKIM.”
  9. 9
    “This tag indicates that this particular third party is authorized to send email on behalf of your domain.”
  10. 10
    “DomainKeys Identified Mail (DKIM): Uses a domain to digitally sign important elements of the message to ensure the message remains unaltered in transit.”
  11. 11
    “Contact them and request DKIM to be configured and that you need a copy of the public key.”
  12. 12
    “To align DKIM, add the TXT or CNAME records they provide to your DNS.”
  13. 13
    “Third-party senders like Mailchimp or SendGrid often use their own domain as the Return-Path domain.”
  14. 14
    “For SPF, add their ‘include’ to your SPF record and configure a custom Return-Path domain.”
  15. 15
    “Domain-based Message Authentication, Reporting and Conformance (DMARC): Specifies the action for messages that fail SPF or DKIM checks for senders in the domain, and specifies where to send the DMARC results (reporting).”
  16. 16
    “When MX records lead to complex mail paths, such as on-premises systems or third-party relays before Microsoft 365, standard spoof protection checks like SPF hard-fail and strict DMARC enforcement may not be applied correctly.”
  17. 17
    “You don’t want to use a mailbox (with username and password) for this, but preferable an SMTP server that sends the mail for you.”
  18. 18
    “When we create a dedicated mailbox for sending emails, we still can’t authenticate (and secure) it properly.”
  19. 19
    “Use this setting only for trusted senders, and note Barracuda Networks recommends using one of the sender authentication methods described above as well for added security.”