How to setup DKIM on DirectAdmin?

Jovani

Active member
Joined
Jul 10, 2012
Messages
338
Points
28
I am having a small problem when setting up DKIM on Directadmin, I have support from Directadmin support staff but not succeed because I'm new to VPS hosting and no more experience on install/config a VPS
Anyone can give me tips on how to setup DKIM on DirectAdmin?

Your answers will be very much appreciated!
 

yestyle

New member
Joined
Jul 1, 2012
Messages
189
Points
0
A good question, I have got same problem on setting up DKIM in the past and I solved it to send/receive all domain emails
Here's tips you can follow how to setup DKIM on DirectAdmin
Fist you use terminal to access your VPS via ssh
Step 1
nano /usr/local/directadmin/conf/directadmin.conf
Add
Code:
dkim=1
into end of this file
Ctrl + O to save file and exit

Step 2
Run 2 these commands to add records into DNS management automatically
Code:
cd /usr/local/directadmin/scripts 
./dkim_create.sh webmastersun.com
Edit file
Code:
nano /etc/exim.conf
Ctrl + W to search remote_smtp:
Add below

Code:
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
Step 3
Ok, now you need to add TXT record in Godaddy with TXT in DA provided.
In Host zone of Godaddy
Code:
Add TXT record
Host: @
Value:
"Your_value_here"
Restart Exim
Code:
service exim restart
Now you can send a test email to an address for checking and see which you archived :D

All done :victory:
 

Jovani

Active member
Joined
Jul 10, 2012
Messages
338
Points
28
Cool @yestyle, I installed DKIM successfully on my vps followed by your tips.
An additional question: what about Name servers? how to set that between DA and Gadaddy for my domain works?
 

yestyle

New member
Joined
Jul 1, 2012
Messages
189
Points
0
Skip using the DA tool to "create" the nameservers, as they're nothing more than ns1/ns2 A records.
You can add those manually:
Admin Level -> DNS Admin -> domain.com -> Add A records:

ns1 = 1.2.3.4
ns2 = 1.2.3.4

where 1.2.3.4 can be the same IP adress for both.

Then change the NS records for the domain to be:
domain.com. NS ns1
domain.com. NS ns2

Take special note of the dots.

Then just register them at godaddy as nameserver (sometimes called "hostnames")
Once registered, then you can change the NS records at godaddy so the domain uses them.

Wait a moment and checking on some domain tools to see your domain pointing to name servers you created.

Regards,
 
Joined
Jul 11, 2014
Messages
40
Points
8
Good Job! Great Tutorial!
 

yestyle

New member
Joined
Jul 1, 2012
Messages
189
Points
0
yestyle
Thanks Teo C, I have got more information from your useful shares on this forum.
If lack of information for tips above, you can add extra information then! :D
 

Jovani

Active member
Joined
Jul 10, 2012
Messages
338
Points
28
@yestyle, I still have small problem on MX record when I checked with DNS health tool online. How to solve this? I'm using Directadmin for my vps host.
 

yestyle

New member
Joined
Jul 1, 2012
Messages
189
Points
0
@yestyle, I still have small problem on MX record when I checked with DNS health tool online. How to solve this? I'm using Directadmin for my vps host.
loL...if you are using DA then first, you create these
You need to be sure that created this
server.domain.com
To change your hostname, you login to DA and go to:
Admin Level => Admin Settings => Server's Hostname
wait a moment for DA restarts.
After you create hostname, it must resolve, so go to
Admin Level => DNS Administration => Add Zone
And configure as follow
Domain Name: server.yourdomain.com
IP Address: 2.3.4.5 (your server IP)
ns1: ns1.yourdomain.com
ns2: ns2.yourdomain.com
where server.yourdomain.com is your new hostname, the server IP address will usually be your license/main IP, and the ns1/ns2 values can be whatever your domain.com uses. Leave the "Create Reverse IP Lookup" checkbox disabled/unchecked.
The reason we add a new zone for the hostname is to ensure that
- it resolves
- it has it's own MX record, so email from the hostname are valid. Without the MX records, many of your emails (eg: from the php/apache "mail()" function) may be not worked.

Note that you will need to add reserve IP lookup on your vps control panel or contact your hosting provide to enable it if it has not been enabled. :)

Good luck!
 

andrewbenn

New member
Joined
Aug 21, 2016
Messages
11
Points
0
1) Ensure the exim supports DKIM signging
2) Add it to exim
3) Turn in on in DirectAdmin.
4) At this point, any domain created after the change should have the DKIM keys created, and dns zones updated.
For existing domains, you can either enable it individually for each domain, one-by-one
5) or you can enable it for all of your domains like this
 
Older threads
Replies
2
Views
5,122
Replies
6
Views
6,026
Replies
1
Views
2,454
Newer threads
Replies
0
Views
2,657
  • Locked
Replies
6
Views
4,870
Replies
2
Views
3,954
bob
Recommended threads
Replies
23
Views
9,518
Replies
0
Views
1,565
Replies
4
Views
1,356

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top