Hướng dẫn cài đặt DKIM sử dụng DirectAdmin

Step 1 – update DirectAdmin

Before you can setup DKIM records for your domains you need to update your DirectAdmin to the latest version. This can be done by logging in to your DirectAdmin as an admin user and entering “Licensing / Updates” section, see the image below:

After that click “Update DirectAdmin” button at the bottom of the page, see the image below:

Configure directAdmin in linux to support DKIM

First you will have to edit “directadmin.conf” file and add line “dkim=1”.

go to directory

vi /usr/local/directadmin/conf/directadmin.conf

Step 3 – enable DKIM record set for domains

To setup DKIM record for each new domain you need to ensure it is active domain

Run the following command

 cd /usr/local/directadmin/scripts - enter the directory where DirectAdmin scripts are located 
./dkim_create.sh domainame.com - run the DKIM record creation script for the existing domain

After running the script DirectAdmin will automatically add DKIM records for all new domains. DKIM records can be found in your DirectAdmins users DNS Management section, see the image below:

The record itself should look something like this:

Step 4 – edit your exim configurations

Note: For shared hosting does not need to follow the step 4

First go to file

 /etc/exim.conf

After that find the line that contains text “remote_smtp” and add following information:

*********************************************************************************
remote_smtp:
   driver = smtp
   dkim_domain = $sender_address_domain
   dkim_selector = x
   dkim_private_key = ${if exists{/etc/virtual/$sender_address_domain/dkim.private.key}{/etc/virtual/$sender_address_domain/dkim.private.key}{0}}
   dkim_canon = relaxed
   dkim_strict = 0
***********************************************************************************

The data in the file should look something like this:

Save the file and restart exim using following command:

    service exim restart

Step 5: Add dkim in a record

Need to add manually the Dkim record in dns management record as below:

Completed !

Bài viết này có ích cho bạn không? 0 phiếu cảm nhận dễ hiểu & thực hiện (0 Phiếu)