How to setup DKIM on DirectAdmin?

Jovani

Well-known member
Registered
Joined
Jul 10, 2012
Messages
141
Points
0
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!
 

Matt

Global Mod
Staff Member
Joined
Jul 1, 2012
Messages
82
Points
18
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

Well-known member
Registered
Joined
Jul 10, 2012
Messages
141
Points
0
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?
 

Matt

Global Mod
Staff Member
Joined
Jul 1, 2012
Messages
82
Points
18
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,
 

TeoC NETCreator

Member
Registered
Joined
Jul 11, 2014
Messages
18
Points
0
Good Job! Great Tutorial!
 

Matt

Global Mod
Staff Member
Joined
Jul 1, 2012
Messages
82
Points
18
Matt
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

Well-known member
Registered
Joined
Jul 10, 2012
Messages
141
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.
 

Matt

Global Mod
Staff Member
Joined
Jul 1, 2012
Messages
82
Points
18
@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!
 
Older Threads
Replies
2
Views
3,397
Replies
6
Views
4,139
Replies
1
Views
2,127
Replies
5
Views
4,184
Replies
12
Views
5,180
Newer Threads
Replies
0
Views
2,500
Replies
6
Views
4,154
Replies
2
Views
3,803
bob
Latest Threads
Replies
0
Views
4
Replies
1
Views
34
Replies
0
Views
25
Replies
2
Views
85
Replies
0
Views
75
Recommended Threads
Replies
3
Views
2,917
Replies
5
Views
3,515
Replies
0
Views
1,640
Replies
15
Views
3,737

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

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