Overview
This article provides guidance for partners and merchants experiencing issues with emails being rejected or marked as spam. Here, you'll find information on SPF and DKIM records and how to configure them in your DNS to ensure successful email delivery.
When you send an email from your NMI portal (or a system notification email is sent), it will appear to come from your email address. However, the actual sending server is NMI's, with the domain "safewebservices.com." This discrepancy between the sending server domain and the sender's email address domain can cause emails to be rejected or marked as spam.
To prevent this, you can add SPF and DKIM records to your domain's DNS settings. These records indicate that the safewebservices.com mail server is authorized to send messages on your behalf. Email systems will then check the SPF and DKIM records to verify the email's authenticity, ensuring it is delivered correctly.
To learn why these records matter, read Email Authentication: SPF, DKIM and DMARC – What You Need to Know
What is SPF?
Sender Policy Framework (SPF) is a type of email authentication that defines the mail servers or applications that are allowed to send from your domain. SPF is implemented via SPF records. An SPF record is a text file that is published in the DNS (Domain Name Service) which contains a list of email servers that are authorized to send emails on behalf of your domain.
If the sending server domain used by your email application or system is listed within your SPF record, then your email will be properly authenticated. This will increase the likelihood of your message reaching your customer’s inbox.
Adding an SPF Record
To specifically allow us to send email on your behalf, please work with your DNS provider to create an SPF record for the following domain:
_spf.safewebservices.com
To add an SPF record, find the TXT record in your DNS settings that have a value starting with "v=spf" and edit that value.
There can only be one record with SPF information in it. If none exists, it can be created. The only change needed is to add include:_spf.safewebservices.com in the record.
Here's an example, where the include is added to show NMI is allowed to send messages using your email address:
Type: TXT
Current Value: v=spf1 +a +mx ~all
New Value: v=spf1 +a +mx include:_spf.safewebservices.com ~all
Common Errors When Adding an SPF Record
These are the most common SPF issues that affect email delivery, and how to fix them.
You Have More Than One SPF Record
Mail servers read only one SPF record for a domain, so a second record may never be seen. Combine everything into a single record that includes include:_spf.safewebservices.com.
Your Record Has More Than 10 Lookups
An SPF record can contain no more than 10 DNS lookups. Over that limit, mail servers can reject the record, and your emails from NMI can fail SPF checks. MX Toolbox shows your lookup count. To bring it down, you can remove includes for services you no longer use, or you can use SPF flattening.
SPF flattening replaces includes with the IP addresses they point to. We support flattened SPF records. To get our sending IP addresses, contact us at support@nmi.com. A flattened record doesn’t update itself, so you’ll need to change it if our IP addresses change.
SPF Macros Aren’t Supported
We don’t support SPF macros, which use variables in the record. Here’s an example:
v=spf1 include:%{ir}.%{v}.%{d}.spf.example.com ~all
A record that uses macros shows as invalid in the gateway, even if it includes our domain.
What is DKIM?
Adding a DKIM Record
To allow us to sign e-mails on your behalf, please work with your IT department or DNS provider to create the following CNAME records in all sending domains you or your merchants have configured to be used by our system. Please ensure example.com in the table below is updated to reference your specific sending domain.
| Type | Host | Value |
| CNAME | |
|
| CNAME | |
|
| CNAME | |
|
Note: These need to be CNAME records and not TXT records.
Validation
Our portal will provide some information about the status of your SPF and DKIM records. You can learn about that validation here:
You can also use an online tool such as MX Toolbox to confirm that your SPF and DKIM records are configured correctly.
Validating an SPF Record
- Go to SPF Check & SPF Lookup - Sender Policy Framework (SPF) - MxToolBox
- Enter your Domain name and click SPF Record Lookup
- Your SPF record along with diagnostic information is now displayed on the page. Ensure the record contains
_spf.safewebservices.com. - Review the test results below the record. MX Toolbox counts the DNS lookups in your record and flags multiple SPF records or syntax errors.
- An SPF record can have no more than 10 lookups, so a higher count needs a fix. See “Too Many Lookups” below.
Validating a DKIM Record
- Go to DKIM Check- DomainKeys Identified Mail (DKIM) Record Lookup - MxToolBox
- Enter your Domain name, enter
gps1in the selector field, and click DKIM Lookup - The CNAME you entered should be traversed and verified from NMI’s servers.
- Repeat this process using your domain name along with
gps2andgps3in the selector field.
Note: We rotate DKIM keys over time, so some selectors may be blank. The gps1 and gps2 selectors now return a public key, and gps3 may still be blank. A DKIM validator can show an error for a blank selector, and that’s expected. Add all three CNAME records anyway so future rotations need no action from you.
Using a Webmail-Based Email Address
NMI does not recommend using a public webmail-based address (@gmail.com, @hotmail.com, etc.) in the Receipts From Address field in your merchant's Account Information settings.
Because we send these emails on your merchant’s behalf, email providers can block messages from domains that don’t have our SPF record. To allow us to send an email on your merchant's behalf, please have your merchant work with their DNS provider for the domain the email is coming from to create an SPF record.
As an alternative or quick fix while getting the SPF record set up, the merchant can add <outgoing@safewebservices.com> in the Receipts From Address field in their merchant portal (under Options → Settings → Account Information). This is the official email address the automated receipts are coming from. They can also add anything before the "@" sign as long as they're using the safewebservices.com domain, like receipts@safewebservices.com or merchants_name@safewebservices.com (where "merchants_name" is the name of the merchant account).
Frequently Asked Questions
What if we do not implement these changes?
If these changes are not implemented, NMI will fallback to using outgoing@safewebservices.com as the sending domain for mail on your behalf. These changes are only required to retain custom branded sending domains
What should I do if I need help with these settings?
If you need assistance, contact your IT department or DNS provider. They can help you add the necessary SPF and DKIM records to your domain. If they require any assistance, you can always reach us at support@nmi.com, or using an option from our Contact Us page.
Where can I learn about major email providers' requirements for SPF and DKIM?
Google and Yahoo have recently updated their email security policies to require DKIM and SPF for improved email authentication. These changes are aimed at reducing email spoofing and ensuring that emails are sent from verified sources. While these changes only currently apply to Bulk Senders, we are now requiring this configuration for all custom sending domains.
For more details, you can refer to:
Where can I find more information on setting up SPF for common providers?
The following table includes links to documentation for common providers.
These are external links and may be broken if the provider makes an update. Please let us know about any broken links by sending an email to support@nmi.com.