Set Up DKIM
Configure DKIM to add a cryptographic signature header to outgoing emails processed by xorlab. Recipients can use the corresponding public key, stored in your domain’s DNS records, to verify this signature, confirming that our MTAs are authorized to send emails on your behalf. For further reading on DKIM:Generating DKIM keys
You have to create one public and a private key and use this key pair for each MTA. Keys can be generated locally or on one of the MTAs via SSH. Commands to generate keys:Configure Opendkim
Once the keys are generated, you need to configureopendkim by creating six new files:
opendkim.local.conf: General configuration.signing.table: Maps email domains to key IDs.key.table: Maps key IDs to domains and private keys.trusted: Lists trusted hosts whose emails should be signed.*.private: The private key used for signing.*.txt: DNS record containing the public key.
- Go to the Expert Editor on xorlab
- In
activeguard/mta/opendkim/, create the folder:local - In
activeguard/mta/opendkim/local, create the 6 configuration files - For each config file, copy/paste the content from the code blocks below
- Adjust the parameters, if necessary.
activeguard/mta/opendkim/local/opendkim.local.conf
Signing table
activeguard/mta/opendkim/local/signing.table
Key table
activeguard/mta/opendkim/local/key.table
Trusted list
activeguard/mta/opendkim/local/trusted
DKIM record
activeguard/mta/opendkim/local/202406.txt
Activate configurations
- Connect to each MTA via SSH.
- For each MTA, perform the following steps:
- Edit the file:
/etc/xorlab/activeguard/docker-compose.yml- Go to
services→mta→volumes - Add the line
./mta/opendkim:/etc/opendkim/keys/
- Go to
- Create the folder:
/etc/xorlab/activeguard/mta/opendkim- Copy your private key file into this folder
- The name of the file must be the same as specified in the
key.tablefile (Although the path is different).
- Set the permissions for the private key
- Only opendkim process should access it (0600, with 2021:2021)
- Use the following commands:
- Edit the file:
- In the Expert Editor, click Publish. Then restart the MTAs so the new OpenDKIM configuration is loaded:
cd /etc/xorlab/activeguarddocker compose down && docker compose up -d
Configuring DNS Records
To complete the DKIM setup, you must update the DNS TXT record for your domain. This record can be found in the.txt file generated by opendkim-tools. It contains the public key and is used by receiving mail servers to verify your DKIM signatures.
DMARC Recommendations
DMARC Policies safeguard your domain against unauthorized use, like phishing or email spoofing. DMARC uses DNS records to define how a receiving MTA should handle SPF and DKIM failures (policy), report these failures (reporting), and align the From (5322.From) with the Mail From (Envelope From, 5321.MailFrom).
While your domain’s DMARC policy doesn’t affect the operation of the xorlab security platform, we strongly recommend configuring DMARC as part of good email security practices.
For more information, please refer to the following resources:
DMARC tags
A text DMARC record consists ofname=value tags, separated with semicolons.
The descriptions in the table above are mostly direct quotations of RFC 7489
Examples
To observe:_dmarc.example.com.