Yes, it is possible to use your domain for sending notification emails.
If you wish to send these emails using your domain, you will need to add SPF and DKIM records and verify ownership of your sending domains before you can send emails through your account.
Adding this type of authentication is a way to prove an email isn't forged. If you've ever received an email claiming to be from your bank, or PayPal when they are not that company, then you've seen first-hand how easy it is to forge email. Authentication helps legitimate senders prove that their email isn't forged and can help receiving servers like ISP's and corporate email servers control inbound spam.
Set Up SPF and DKIM for Your Sending Domains
Now that you've added a new sending domain, you can also add the appropriate records to your domain's DNS settings. To add the SPF and DKIM records for your sending domains, you'll need to add records of type 'TXT' through your hosting provider, domain registrar, or DNS provider. We recommend referring to your provider's help documentation for specific information on adding TXT records.
Important: All Records should be set on subdomains of the domain that you would like to use for sending emails. For example, if you would like to send notifications from address "notifications@my_domain.com", then, for example, SPF record should be set on "status-emails.my_domain.com."
SPF
If you don't have an SPF record yet, you'll need to add one for your domain. At a minimum, the value should be the following if you're only sending mail through Mailgun for that domain:
v=spf1 include:spf.mailgun.org ~all
If you already have a TXT record with SPF information, you'll need to add Mailgun's servers to that record by adding include:spf.mailgun.org
in the record (before the last operator, which is usually,?all
~all
or -all
).
DKIM
Add a new TXT record with the name and value visible in StatusHub control panel.
In case you can't use semicolons in DNS record, you need to escape them. Please consider following examples:
With semicolons escaped:
v=DKIM1\; k=rsa\; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrLHiExVd55zd/IQ/J/mRwSRMAocV/hMB3jXwaHH36d9NaVynQFYV8NaWi69c1veUtRzGt7yAioXqLj7Z4TeEUoOLgrKsn8YnckGs9i3B3tVFB+Ch/4mPhXWiNfNdynHWBcPcbJ8kjEQ2U8y78dHZj1YeRXXVvWob2OaKynO8/lQIDAQAB\;
With semicolons unescaped:
DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrLHiExVd55zd/IQ/J/mRwSRMAocV/hMB3jXwaHH36d9NaVynQFYV8NaWi69c1veUtRzGt7yAioXqLj7Z4TeEUoOLgrKsn8YnckGs9i3B3tVFB+Ch/4mPhXWiNfNdynHWBcPcbJ8kjEQ2U8y78dHZj1YeRXXVvWob2OaKynO8/lQIDAQAB;
Validation states
Once you add both DNS records to your DNS provider and you will then need to check the status in StatusHub under settings. To recheck your DNS records status, please use "Recheck DNS records" button
There are four possible states of required/current verification status:
1. Default sending domain
In case you are using default sending email address 'do-not-reply@statushub.io', you do not need domain verification.
2. Unverified sending domain
After setting new sender email address, it's unverified by default, and you need to set appropriate DNS records, otherwise provided email address will not be used
3. Partially verified sending domain
This state is an effect of setting just one records with other one missing or being invalid
4. Fully verified sending domain
When domain if fully verified, notification email will use provided email address
Note:
All unverified sender domains will not be used in "From:" mail field and instead default "do-not-reply@statushub.com" will be used. However, in that case, your custom email will be used in "Reply-To:" field
Troubleshoot SPF and DKIM
After you add the appropriate DNS records, it can take up to 24 hours for the changes to take full effect.
-
Verify your SPF record using an online SPF record testing tool. Enter your domain name in the first text box and click Get SPF Record (if any) for a diagnostic of your SPF records
-
Check whether your DKIM record is valid using the DKIMCore validator
-
If you've added the DKIM record and are still seeing that it's missing, your DNS provider may require the record be formatted differently
-
Some DNS providers don't require semicolons be escaped. If you see issues, try removing the backslashes right before semicolons at the beginning and end of the record.
-
Some DNS providers take longer than others to publish and push the record. If you're adding a completely new record, those often validate within 10-15 minutes. Changing records can take longer, but can vary based on your DNS provider and TTL for the record.
Comments
0 comments
Article is closed for comments.