Hmailserver dkim
DKIM (DomainKeys Identified Mail) is a technique used to authenticate the sender of an email message. It involves adding a digital signature to the email message that is verified by the recipient's mail server. Here's how to set up DKIM on hMailServer:
Prerequisites:
- hMailServer version 5.6 or later
- A domain name (e.g., example.com) that you want to use for DKIM
- A TXT record set up in your DNS for the domain (see below)
Step 1: Create a public/private key pair
You can use a tool like OpenSSL to generate a public/private key pair. For example:
openssl genrsa -out private.key 1024
openssl rsa -pubout -in private.key -out public.key
This will generate a 1024-bit RSA key pair. You can use a stronger key size if you prefer.
Step 2: Configure hMailServer
In hMailServer, go to the "Settings" > "Protocols" > "SMTP" section. Click on the "Advanced" tab and scroll down to the "DKIM" section.
- Set "DKIM enabled" to "Yes"
- Set "DKIM selector" to a unique value (e.g., "dkim")
- Set "DKIM key" to the contents of the public key file (public.key)
- Set "DKIM domain" to your domain name (e.g., example.com)
Step 3: Create a TXT record in your DNS
You need to create a TXT record in your DNS that contains the DKIM public key. The format of the TXT record is:
_kim.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."
Replace _kim
with the DKIM selector you chose in Step 2, and example.com
with your domain name. The p
parameter contains the public key.
Step 4: Test your DKIM setup
Use a tool like dig
or nslookup
to verify that the TXT record is correctly set up in your DNS:
dig _kim.example.com. TXT
This should return the DKIM public key.
Step 5: Configure your email clients
To use DKIM, your email clients need to be configured to use the DKIM signature. This may require updating your email client's configuration files or using a plugin.
Troubleshooting tips:
- Make sure that the TXT record is correctly set up in your DNS and that the public key is correctly configured in hMailServer.
- Check the hMailServer logs for any errors related to DKIM.
- Use a tool like
opendkim
to test your DKIM setup and verify that the signatures are being generated correctly.
By following these steps, you should be able to set up DKIM on hMailServer and start using it to authenticate your email messages.