For Techs.... Techniques.... Technologies....


How to ensure inbox delivery for emails

Inbox delivery is one of the most difficult task in mailing service. Misconfigurations in mail servers will lead the genuine mail to deliver in spam folder.

We can ensure 90% inbox delivery by some simple techniques. This tutorial explains the details of essential practises related to exim mail server.

1. Server hostname shoulb be a resolving

2. Mx record should be configured as A record instead of Cname

Some of the mail providers will not accept mail if the mx of sender
domain is a Cname.

3. SPF record should contains the outgoing mail ip address of the domain

You can verify the SPF record using the tool

4. Configure DKIM record with correct syntax

In the latest version of Cpanel, they have updated the DKIM to use
2048-bit RSA keys. As a result the length of the DKIM record in the
cpanel increased more and the syntax is changed a little bit from
earlier. But there is a bug in this new syntax such that DKIM record
consists of and extra ' " ' mark which will not be validated at some
registrar end.

We can correct this by adding additional ' " ' marks in the DKIM record.
Please see the example given below,

DKIM record created by cpanel,

"v=DKIM1; k=rsa;
We need modify this as given below on adding at registrar end.

"v=DKIM1; k=rsa;

Note that some of the registars will not accept the initial and final
quotes in the DKIM. So please verify the DKIM record after configuring
it at the registrar end. I you are getting an additional quotes in
command line, remove the initial and final quotes from the TXT record.

5. Configure Rdns record for the mail ip as mail.domainname.You can add
the same by contacing DC. Also ensure that the forward and reverse
mapping and fine.

6. Configure SMTP banner as mail.domainname (should be same as that of
rdns). You can follow the below steps to configure SMTP banner in cpanel

Open the exim configuration file

#vi /etc/exim.conf

Remove the below line from /etc/exim.conf

smtp_banner = “${primary_hostname} ESMTP Exim ${version_number} \
\#${compile_number} ${tod_full} \n\
We do not authorize the use of this system to transport unsolicited, \n\
and/or bulk e-mail.”

Add the below lines to /etc/exim.conf inplace of that removed line

smtp_banner = “${smtp_active_hostname}”
smtp_active_hostname =

Then create file /etc/ip_hostname and add ip and domain like this

Restart exim Service

#service exim restart

Set readonly attribute to exim configuration file.

#chattr +i /etc/exim.conf

7. Configure DMARC record.

DMARC is a combination of SPF and DKIM. As of now Cpanel not providing
interface or script for generating this. So please use the below third
party tool for creating DMARC record and configure the same as TXT record

8. Check the mailip against RBL lists.

You can use the thirdparty tool '' for
checking the ip blacklists. Don't forgot to give removal requests for
the listed ipaddresses.

9. Create the mailid postmaster@domainname as most of the RBL's checking

10. Do not use the keyword 'TEST' while sending test email. Also do not
use the same keyword as both subject and mail body. Previously mentined
this increases probability that the mail ip to be listed in RBL's

Addtionally we can verify the mail server settings using the tool

That's all........

Leave a Reply