Virtual Private Servers
Payment for Services
Terms of Service
Questions and Answers
Configuring DKIM for Emails Sent From the Server
When sending letters using the php mail() function, there may be difficulties in specifying the DKIM signature. To do this, you can use the PHPMailer library or plugins for sending emails to the CMS.
In order for the messages to be sent to pass DKIM verification:
- Connect to the server via SSH.
- Generate a private key (replace mydomain.com with your domain):
openssl genrsa -out mydomain.com.private 1024
- Save the path to the generated key - the mydomain.com.private file. The file will be saved in the directory from which the command was executed.
- Generate a public key:
openssl rsa -in mydomain.com.private -out mydomain.com.public -puboutThe content of the public key file looks like this:
-----BEGIN PUBLIC KEY-----
-----END PUBLIC KEY-----
- In the domain settings, create a TXT record for the mail._mydomainkey.domain.com subdomain with the following content:
k=rsa; p= key_from_step _4The key must be specified on one line, without BEGIN and END.
- In the settings of the PHPMailer library script or the CMS plugin used for sending emails, specify the full path to the mydomain.com.private file that was generated in step 2 (for example, /home/u/user/mydomain.com.private).
If you are using PHPMailer, you must specify the path in the DKIM_private parameter; specify mail in the DKIM_selector parameter.
If you have any questions, please create a ticket to technical support.