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:

  1. Connect to the server via SSH.
  2. Generate a private key (replace with your domain):
    openssl genrsa -out 1024 
  3. Save the path to the generated key - the file. The file will be saved in the directory from which the command was executed.
  4. Generate a public key:
    openssl rsa -in -out -pubout
    The content of the public key file looks like this:
    -----BEGIN PUBLIC KEY-----

    key content

    -----END PUBLIC KEY-----
  5. In the domain settings, create a TXT record for the subdomain with the following content:
    k=rsa; p= key_from_step _4
    The key must be specified on one line, without BEGIN and END.
  6. In the settings of the PHPMailer library script or the CMS plugin used for sending emails, specify the full path to the file that was generated in step 2 (for example, /home/u/user/

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.