This article explains how to configure SPF, DKIM, and DMARC so that emails sent from Spacewell Asset appear to come from your client's domain rather than from noreply@spacewell.com.
Why use e-mail domain authentication?
By default, emails sent via Asset are sent via the Spacewell mail server. However, it is often desirable to make these emails appear to be sent from the client's email address*.
The email itself will still be sent via the Spacewell email server, but the email will look like it originated from the specified client email address. This leads to the emails being rejected by the receiving mailserver. If this happens too often, the IP address the mail is sent from (the Spacewell mail server) can be blocked. This results in no mails being accepted from this IP address.
To prevent this, a few systems need to be set up: SPF, DKIM and DMARC.
Tip
If you are using your own domain to send emails from the Asset mailserver, make sure you have all three following in place:
SPF record (set up on your mail server)
DKIM setup (set up on your mail server AND in Asset)
DMARC (set up on your mail server)
*Most likely, a contractor who receives a work order email should receive this email from, for example, ‘facilities@clientname.com’ instead of 'noreply@spacewell.com'. See the email settings section in the client settings article for information on how to set this up.
SPF (Sender Policy Framework)
By adding the necessary SPF record to the DNS, the receiving mailserver can verify that Asset is allowed to send emails on behalf of the client's domain. The following inclusion needs to be done on the DNS:
include:_spf.axxerion.com
Testing the SPF record
If you want to test if the SPF record is added correctly, you can use free online tool to see if the spf record is available. Easy to use tools are:
With DKIM, a key needs to be generated within Asset, which also needs to be added to the DNS.
Generating the key and DNS record in Asset
Within Asset, navigate to the client settings via the tile on the dashboard.
Navigate to the tab “Email” and press on the icon for “Signing domains”
Click on “new”
Fill in the following fields:
Domain name: the domain name (e.g. mycompany.com)
Active: if the DKIM record is active, set to YES
DKIM selector: We suggest to set this to spacewell so you can easily recognize the DNS text record.
It is possible to configure multiple domains using the same specific selector for the DKIM record.
Click on the top right icon with the key to generate a private and public key
If the private key was externally generated and is encrypted, fill in the password for this private key.
Open the DKIM entry you have just set up.
On the top right, click the icon 'Show the DNS record'.
Example of the DNS record
If the domain you are mailing from is mycompany.com and the selector is spacewell . The DKIM DNS record name will be: spacewell._domainkey.mycompany.com
DKIM DNS Record:
Record name:
---------------
spacewell._domainkey.mycompany.com
TXT record value:
--------------------
v=DKIM1;
h=sha256;
p=ddsadsadANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxmqM+4jKLhCZjQWH6tbH
hC7HW1yOQ28CEiLX6QWBQg7iAtx+7dsdsadIS2JlfQFOm8Sh5eY1uBFMwOjlvEqEdlmH
7kczxpK1zPk//w4xhF0VPKZ189YVVEsrXAM4TxrzdmYQNdnRWe9xAXjCULEdg7wk
ziqOzsrgdsadasjuqiFo9xLvH5LjHlOasdfsamiee5ninreJvzJJlFIix6LQtnd+cut
+nSCIrDdqThZLdoC9eeFQWqpxi9Lo7UlMP8KZtm+NEKRvWMKEgK4dplkF2FSuqL7
ujXeUUCdsadmT+Khy4ZPKa9bg4uO1UQ72ovsojyBO3GerbSihHom+GQen80HROCEy
gwIDAQAB
Info
DKIM selector This is used by the receiving agent or client to retrieve the public key from the DKIM DNS text record, which has the name: <selector>._domainkey.<domainmame>.
Share the DNS record with your IT department/party
Background information on the non-editable fields in the DKIM setup
Hash Algorithm: The hashing algorithm used for the DKIM signature. Currently only SHA-256 is allowed.
Public Key in PEM format : The public key is extracted from the private key and is not editable.
Private Key in PEM format : The private key must be in PEM format. For DKIM the private key must be a RSA key. Note that a new key pair can be generated with the page function 'Generate key pair'. It is also possible to enter a private key from an external source. Note that the private key is always stored in an encrypted format by a newly generated strong password.
Key length (bits): The length of the private key is the number of bits of the 'modulus' of the private key. Currently only a value of 2048 is allowed.
DKIM advanced troubleshooting
Determine the sender domain name, for example ‘client.com’.
Check that the domain of mail headers "From:" and "Mail from:" is present in the Email Signing domains and that it is active (see chapter Configure DKIM mail signing above).
Make sure the DNS TXT record of the email signing domain is present in the DNS of the sending domain. You can use the following website to validate the DNS entry: DKIM Core
Send an email from the Asset client layer to your own mail account:
Contact -> Mailings -> Create new mailing
Add sender contact. The email of the sender contact must match one of the signing domains defined in this client layer, for example: testdkim@somedomain.com
Add one or more recipient contacts; this can be your own email address.
Click "Send message"; note that it can take some time before the mail changes to the status "sent". Use refresh to show the latest status.
Check if the mail is received in the mailbox.
Open the email message source and make sure the DKIM-Signature header is present, for example:
Fill in the POP3/IMAP server and your user ID/password.
Install the DKIM Validator add-on:
Tools -> Add-ons -> Get Add-ons
Search for 'DKIM' -> install
You can configure the 'DKIM Verifier' in Tools -> Add-ons -> Extensions -> DKIM Verifier -> Preferences
To enable debugging: Advanced -> enable debugging and Show detailed errors
Open the mail with the DKIM Signature
Open the error console with: <ctrl> + <shift> + j Detailed info and error messages are now shown.
A DMARC record needs to be added to the DNS in the form of a TXT record. This record needs at least p=none and should align with either SPF or DKIM, preferably both.
In the lookup field enter the domain and DKIM selector separated by a colon (:)
For example mycompany.com:spacewell
Click ‘DKIM lookup’
If the above options are not sufficient or the client would like to use their own mailserver, that is also possible. Navigate to “Client settings > Email”. Fill in the following fields (be aware: these values should be provided by the client's IT department):
When using the client's own mailbox, there is one major limitation compared to using the native mail feature in Asset. When Asset sends an email to the client server and it fails, it will not retry this email. The simple reason is that if the system did this, it might be blocked due to a possible identification as a DDoS attack (“spamming” the server with requests). If the native email feature is used, an email is retried for 24 hours before failing.
If you want to test if the above settings apply to your e-mail, you can already test those using the methods mentioned in the articles. But one specific way which has proven to work good is the use of mail-test.com. Here you get an e-mail address where you can send an e-mail to, and it checks the spam rating of the e-mail. So enter this e-mail in any location in Asset and make sure an e-mail is sent to that contact. Once it has, press on “check your score” and you have a list of possible problems and solutions on what you can change. Be aware: this is an external tool, so make sure to not send sensitive information in the test e-mail. Also, the tool is used mostly for newsletters, which means that it checks some aspects of the e-mail which are not relevant for application e-mails from a system like Asset.
DMARC (Domain-based Message Authentication, Reporting, and Conformance)
Validate DKIM and DMARC setup
Allow the use of the client's own mailserver
Mail host: Fill in the host for the e-mail
Mail port: Fill in the required port
User name: The username with which the mailserver should be accessed
Mail password: The password with which the mailserver should be accessed
Use SSL Connection: If you would like to use the SSL variant of the connection to the mailbox
TLS Mode: Select the TLS mode that you would like to use (leave it on “Default” if unknown)