Sending emails to the inbox is always a tricky thing for even experienced system administrators, running a healthy email server requires great attention. I will be mostly talking about transactional emails in this article, even though it can be applied to marketing emails. Some companies process a large number of transactional emails on daily basis (in millions). Transaction emails involve:
These emails are much more important, and any company can not afford to have such emails land in spam/junk folder. For say if a purchase confirmation email lands in the spam folder, a company is going to lose a potential customer if they do not check all their folders (thinking email never arrived). Which is why even transactional emails have great importance. There are four things that Google recommends you to have:
You can read more about these technologies in our previous article:
Even after setting all of the above things, your email might end up in spam, from their onwards it totally depends upon the content of your email and how people are reacting to your emails. If they are marking your email as Not Spam then soon you are going to land emails in the inbox. But setting up these 4 things is a must thing and a good start.
In early days of CyberPanel, you have to do this all manually. You have to manually setup hostname for your mail server. Please note that hostname here refers to RDNS that you have set. But now you can do that from CyberPanel using the guide below:
This not only issues Let’s Encrypt SSL for PostFix/Dovecot but also set the same domain as the hostname for your mail server, so choose this domain carefully. After setting up hostname you have to take care of SPF, DMARC and DKIM your self. This task is very painful and confusing for people. For your reference these records look like:
Type | Name | Value |
---|---|---|
TXT | talkshosting.com | v=spf1 a mx ip4:192.168.100.1 ~all |
TXT | _dmarc.talkshosting.com | v=DMARC1; p=none |
TXT | _domainkey.talkshosting.com | t=y; o=~; |
TXT | default._domainkey.talkshosting.com | v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNA.... |
If you still want to do it the old fashion way, you can create these records manually, replace talkshosting.com with your domain and 192.168.100.1 with your server IP Address. Note that I’ve not pasted the whole value of DKIM record, as it was too long to fit in one box. And to manually set up all of these records you can follow this guide:
Early days were harsh for us, we need to do everything related to email manually which is not very pleasing. Before moving forward you need to upgrade CyberPanel or install the latest version of CyberPanel.
While creating a website on version 1.6.4 (and after) you have another option DKIM Support. What happens if you don’t opt for DKIM Support? We still have following records automatically created:
Type | Name | Value |
---|---|---|
TXT | talkshosting.com | v=spf1 a mx ip4:192.168.100.1 ~all |
TXT | _dmarc.talkshosting.com | v=DMARC1; p=none |
TXT | _domainkey.talkshosting.com | t=y; o=~; |
But you can clearly see that our DKIM record is still missing, you can create dkim keys even you didn’t opt for it while creating a website. From this point onwards we will see how we can achieve 10/10 score on http://www.mail-tester.com
Achieving 10/10 mail score may be very hard for some system administrators. In this article, we will see how we can do exactly that.
Before moving forward you need to upgrade CyberPanel or install the latest version of CyberPanel, so that you are on latest version which contains DKIM Manager (v1.6.4 and after).
Nothing is going to work if your DNS is not managed by CyberPanel. We will discuss what to do if DNS is not managed by CyberPanel later in this article. Read the guide to make sure your DNS is managed by CyberPanel:
This step is very important, I am using talkshosting.com as a hostname in this article. If I check RDNS of my IP Address it should point back to this domain. You can check this here.
As you can see my IP Address points back to talkshosting.com, you should point to your domain. Once you set the RDNS, follow the guide below to setup same domain as a hostname on your mail server too:
So far so good, we now need to create our website with DKIM Support.
While creating website remember to check the DKIM Support box.
Once a website is successfully created, following records will automatically be created:
Type | Name | Value |
---|---|---|
TXT | talkshosting.com | v=spf1 a mx ip4:192.168.100.1 ~all |
TXT | _dmarc.talkshosting.com | v=DMARC1; p=none |
TXT | _domainkey.talkshosting.com | t=y; o=~; |
TXT | default._domainkey.talkshosting.com | v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNA.... |
Creating DKIM Records Later
If for some reason you have not created DKIM records while creating a website you can do so later by navigating to https://<IP Address>:8090/email/dkimManager
This will generate DKIM keys and also publish those DKIM public key to your DNS record, which is exactly the same as having DKIM Support while creating a fresh website.
It is time you verify your email score, open https://www.mail-tester.com/ on your browser. They will provide you with temporary email, you need to send a test email to this email.
And once you click THEN CHECK YOUR SCORE, it should be giving you following output:
How sweet, how hard was it? It was so easy. You need not do anything extra on your end if your DNS is managed by CyberPanel.
If your DNS is not managed by CyberPanel, you can generate DKIM keys from CyberPanel and publish them where ever your DNS is hosted. First, let’s create other necessary records:
Type | Name | Value |
---|---|---|
TXT | talkshosting.com | v=spf1 a mx ip4:192.168.100.1 ~all |
TXT | _dmarc.talkshosting.com | v=DMARC1; p=none |
TXT | _domainkey.talkshosting.com | t=y; o=~; |
Replace domain and IP Address with your domain and IP Address respectively. Once SPF and DMARC are created you then need to generate DKIM keys from CyberPanel, for that navigate to:
https://<IP Address>:8090/email/dkimManager
Once generated, you will get Private and Public keys, you need to copy public key and form your DKIM record.
Record Type: TXT
Record Value: default._domainkey.yourdomain.com
Record Value: v=DKIM1; k=rsa; p=<PASTE THE PUBLIC KEY YOU GOT FROM CyberPanel>
Your final records in your domain registrar must contain these four entries:
Type | Name | Value |
---|---|---|
TXT | talkshosting.com | v=spf1 a mx ip4:192.168.100.1 ~all |
TXT | _dmarc.talkshosting.com | v=DMARC1; p=none |
TXT | _domainkey.talkshosting.com | t=y; o=~; |
TXT | default._domainkey.talkshosting.com | v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNA.... |
And that is all if you are hosting your DNS somewhere else.
You can also read and send email through Gmail. Open your Gmail account, go to Settings and then Accounts and Import.
This will open a window:
Enter the email address you have created inside CyberPanel and click Next. On the next window select Import emails from my other account (POP3) and click Next.
Make sure to leave a copy of retrieved messages on the server too, otherwise, they will be deleted from the server, and then click Next.
It will then ask you if you also want to use Gmail to send emails from this email.
It is recommended to select the first option as selected in the image above, you can then send emails via Gmail too.
For emails to be sent via Gmail you need to configure SMTP settings that Gmail can use to connect to your mail server.
And click Add Account, Gmail will send you a verification email, click the link inside the email and you are done. You will now receive emails inside your Gmail.
You can also use Gmail to send an email via the same email.
How easy it was to achieve 10/10 score for your email, for other domains you can do that same. It will be easier if you use CyberPanel to manage DNS for your other domains too, this way you will not have to manually create DNS records at your domain registrar.
Feel free to comment below join our Facebook group or Discord for any help. You can also create a helpdesk ticket.
10 Comments
GL
This was a great tutorial. CyberPanel has made it really easy to manage DNS records. I was able to achieve an 8.9 after just setting up the basic configurations in the DNS records area.
frederik
The same for me with clodflare.
But Google still rejects Emails because of missing RDNS. I will have to contact my server provider for an rdns entry.
usmannasir
Yup, your provider can do the RDNS entry for you.
Philip
can you give me the instructions steps by steps with cloudflare?
thank you
Darlysson
Hello, everything will work on Cloudflare except RDNS, so you need to rename your droplet (digital ocean) to subdomain.domain.tl (any subdomain), then add an A record with the droplet name (subdomain) ) pointed to the actual ip of your server and disable the cloudflare proxy for this record.
Renato Azevedo Zoppei
I´m a little confused here. What does this means?
“Your final records in your domain registrar must contain these four entries:
[table id=1 /]” ?
Thank you.
cyberpanel
Hello Renato
Since we moved these posts, tables were not imported.
I’ve addressed this now.
thank you.