SPF for a Custom Sender Example

Custom senders can be used to organize senders or servers that aren’t part of Agari’s well-known senders. Perhaps your organization has an old mail gateway on-premises that sends outbound email for a legacy system. DMARC Protection groups IP addresses that it cannot otherwise associate with a well-known sender into the Unassigned Custom Sender group, by default, which appears in the lower half of the Senders page.

You can use custom senders as filters in various views and reports. For example, you could classify servers you own within your infrastructure as custom sender.

To create a new custom sender

  1. Go to Configure > Manage Custom Senders.
  2. Click Add New Sender.
  3. Enter the name of your new custom sender.
  4. Press Enter.


Once created, add IP addresses/Ranges to the custom sender from the Unassigned group.

For example, assume that you have grouped internal IP addresses in your infrastructure into a Customer Sender named My Internal Senders:

As with the Well-known Senders in SPF for a Well-Known Sender Examples, the Custom Senders section of the page confirms that email traffic is being seen from this Custom Sender, and the SPF Record indicator notes that the sender(s) are not yet represented in the SPF record for the domain.

Navigating to the Configure > Manage Custom Senders page, you can see the list of IP addresses defined for that custom sender.

To add the IP address to the SPF record, modify the SPF record to include the IPv4 or IPv6 address. For example:

ip4:192.168.1.67

(An RFC 1918 address is used here as an example.)

Your SPF record for the selected domain would now be modified to include Google, Zendesk, and the specific IP address from the “My Internal Senders” Custom Sender group:

v=spf1 include:_spf.google.com include:mail.zendesk.com ip4:192.168.1.67 ~all

NOTE: It is possible to specify ranges of IP addresses in CIDR format.

There are other mechanisms for specifying addresses in an SPF record (for example “a”, “mx”, “exists”), but they are more advanced and beyond the scope of this document. (The “ptr” mechanism, for example, is discouraged from being used in the SPF RFC specification.) For more information on these mechanisms, refer to https://en.wikipedia.org/wiki/Sender_Policy_Framework#Mechanisms.

Don’t Forget about Alignment

Adding the IP addresses from custom senders to a domain doesn’t guarantee alignment will be achieved. You must work with the systems sending mail from that infrastructure to ensure that the RFC5321.MailFrom (also known as the MAIL FROM, Envelope From or Return Path) matches the From: address (also known as the Friendly From: address) displayed in the body (or DATA portion) of the email message.