Friday, 20 July 2018

DNS Records configuration for Mail Server


dns records
DNS is the important part for proper working of mail server. DNS stands for Domain Name System, means it resolve Domain Name to IP Address (Forward Lookup) & IP Address to Domain Name (Reverse Lookup). If you are thinking to setup email server on local premises (Office), you have to create DNS records in DNS management which is available in Domain Name panel also you must have the Public IP Address & make sure Public IP should not blacklisted.

After creating DNS records, we have to wait for the propagation of DNS entries minimum 24 hour. There is popular website mxtoolbox through which we can verify & check the DNS records (https://mxtoolbox.com) In this blog I will describe you how to create DNS records. I already bought Domain Name online.

The following records are need to require in DNS Management
  1. A Records
  2. MX Records
  3. TXT Records
  4. PTR Records

A Records – A stands for Address, This record link Domain Name (mypcsupport.online) or hostname (mail.mypcsuport.online) to an IP Address (182.73.23.165), means all traffic coming to Domain Name (mypcsupport.online) directed to an Public IP Address (182.73.23.165).

a records

Pls see the screenshots

A Record

A Record

A Record






















































MX Records – MX stands for Mail Exchanger, It allows or permit the email server ( hmailServer, Microsoft Exchange) to accept email messages on the behalf of recipient’s domain (mypcsupport.online). We can create multiple MX records with priority or preference (0,10,20…) value. MX records with lowest priority value (0) will have the highest preference for delivering mail messages.

mx record





Pls see the screenshots

MX Record

MX Record





































TXT Records – TXT stands for Text, It contains the information about domain in human readable format. It prevent the mail server from spamming, spoofing, phishing & provide the authentication. There are three types of txt records which are mandatory.

  1. SPF Record
  2. DKIM Record
  3. DMARC Record
txt records








Pls see the screenshots

TXT Records


SPF – Sender Policy Framework  -- It prevents from spammers to send unauthorized messages on the behalf of domain, It authorize or permit mail server to send messages.

Name:   Domain_Name
Value:   v=spf1 ip4:Public_IP_Address -all

Pls see the screenshots

SPF Records




















DKIM -- Domain Keys Identified Mail – It provide proper authentication means email messages are being sent from trusted source. It uses key combination private & public key. I use website https://www.port25.com/dkim-wizard/  to generate DKIM keys.

  • Public key is used in DNS records (Domain Panel)
  • Private key is used in Mail Server software 

Please Click on below screenshot to watch how to use set DKIM Private Key in hMailServer.

hMailServer












Pls see the screenshot to generate the keys


DKIM Record




















Type the domain name & selector, Use 1024 key size then click on "CREATE KEYS"
Selector == dkim

DKIM Record


DKIM Record

DKIM Record





















































Name:    dkim._domainkey
Value:    v=DKIM1; t=s; k=rsa; p=Public_Key


DKIM Record




















DMARC -- Domain-based Message Authentication Reporting and Conformance
It is the last records in DNS managent which must be created after creating SPF & DKIM. It verify & check the email messages are protected by SPF & DKIM records.

Name:   _dmarc
Value:   v=DMARC1; p=none; rua=mailto:postmaster@domain-name

Pls see the screenshot

DMARC Record




















PTR Records – stands for Pointer records (Reverse DNS), It link Public IP Address to Domain Name( mypcsupport.online ) or hostname ( mail.chansongroup.in ). We cannot create PTR records in DNS management, we have contact ISP to create PTR records. I had contacted ISP, I told them I am going to setup email server in my office, they ask me Public IP Address & domain name. They took 24 hour to create PTR records. IF you are using VPS or AWS then you don’t need to worry they automatically create the ptr records.

Now its time to verify & check the DNS Records after 24 hour

Open the mxtoolbox website https://mxtoolbox.com

A Record

mxtoolbox

mxtoolbox

MX Record

mxtoolbox

mxtoolbox

TXT Record -- SPF

mxtoolbox

mxtoolbox



TXT Record -- DKIM

mxtoolbox



















Click on "more information"

mxtoolbox
























mxtoolbox

mxtoolbox

TXT Record -- DMARC

mxtoolbox

mxtoolbox









































You can watch full video tutorial how to setup email server for local office

hMailServer -- DNS Records -- Part-1
hMailServer -- Publish Mail Server -- Part-2





                                                              Thank You
 My Pc Support
                                                           My Pc Support
















































No comments:

Post a Comment