Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to set up a mail server in Plesk to successfully send emails to external mail services?
Outgoing emails sent from a Plesk server to mail services like Gmail, Yahoo, Outlook go to the spam folder. How to troubleshoot and avoid it?
Answer
Note: These instruction are applicable to Plesk servers with a local mail server installed.
Go to Tools & Settings > Server Settings and type in your server's hostname:
Note: In Plesk for Windows Server with MailEnable installed, set up the hostname in MailEnable Management Console as well.
-
-
SPF
By default, a SPF DNS record is added to the domain's DNS zone during a domain creation, if this DNS record exists in the Plesk DNS Template.
Make sure there is a TXT record for SPF in domain's DNS settings at Domains > example.com > DNS Settings:
To learn more about SPF, visit this KB article.
-
DMARC
Note: By default, a DMARC DNS record is added to the domain's DNS zone during a domain creation, if this DNS record exists in the Plesk DNS Template.
Make sure there is a TXT record for DMARC in domain's DNS settings at Domains > example.com > DNS Settings::
To learn more about DMARC, visit its overview page.
-
DKIM
Make sure that DKIM support is enabled server-wide in Plesk at Tools & Settings > Mail Server Settings:
Make sure that DKIM support is enabled for a domain at Domains > example.com > Mail Settings:
To enable this option for all domains in Plesk, visit these KB articles:
Finally, verify that TXT records for DKIM are present in domain's DNS settings:
To learn more about DKIM, SPF, and DMARC Protection, visit this Plesk documentation page.
Note: In case of multiple DKIM keys are configured, verify that they are set on different selectors (default._domainkey.example.com, new._domainkey.example.com, etc.)
Use online checkers, like MXToolBox and www.mail-tester.com, to verify that email validation features are configured for the domain: SPF, DMARC, DKIM.
-
A reverse DNS (rDNS) lookup returns the hostname of an IP address. Many mailbox providers, including Gmail and Yahoo!, will block email coming from a mail server that does not have rDNS in place.
To configure rDNS, a PTR DNS record should be created by the owner of the IP address. Contact your hosting service provider or Internet Service Provider (ISP) to get more details.
If Plesk is installed on a cloud server, visit this KB article.
Additional Information
If after applying the steps above, emails go to spam on external mail services, visit the KB article:
Comments
20 comments
Hi
All settings is good but when check email source
SPF "pass"
dkim "pass"
dmarc "pass"
but message go to spam folder !!
any idea or solve for this problem
Hello @Soufiane Abid,
As all settings are correct, but emails still hit the Spam folder, please contact support of a corresponding mail service to remove your IP address from their blacklists:
Gmail Help - Report a delivery problem between your domain and Gmail
Microsoft Support - New support request
Yahoo! Help - Submit a Form
AOL Postmaster - Open a Trouble Ticket
Hello @Daria
I know the answer, because I have already had this kind of problem with other panels. Even Microsoft do not know given correct answer because I joined @Soufiane, I have the same thing is one for an anomaly, this falls in junk mail.
Michel Renard
Hello @Michel Renard,
Thank you for sharing your user experience.
Indeed, as Daria said, if the message passes SPF, DKIM and DMARC checks and the server is not blacklisted but mail still arrived to the junk folder then the issue is on the mail provider side.
I would recommend you to review mail headers of the "junk" messages and sent them to mail provider technical support to investigate the reasons why it happened.
Hello
They just answered me and told me about JMRP and mail formatting, I use Outlook, the HTML format would be a big risk factor regarding the message sending?
Are your lines, SPF and DMARC the right ones for sending a message?
Michel
Hello
For my part is via the configuration it works great.
I had to sign the agreement as Microsoft 'JMRP'.
there is
Michel Renard (FoxStudio)
Dear Kuzma Ivanov
My hosting running Plesk version 12.5.30 and my boss dont want to upgrade it, so i can not use DKIM system. Because of that, our emails send from my hosting sever always go into spam inbox. Could you tell me can i fix that issue without upgrade Plesk version, or if i upgrade to lastest version and enable DKIM how many percent our emails will go to our customer's inbox?
Hello @Michel Renard,
Thank you for the update.
Let me address your questions one by one:
> the HTML format would be a big risk factor regarding the message sending?
No, there should be no risks in regards of it.
> Are your lines, SPF and DMARC the right ones for sending a message?
Yes, SPF and DMARC are the correct ones if it is setup properly.
More information about SPF and DMARC configuration you may find here:
> For my part is via the configuration it works great. I had to sign the agreement as Microsoft 'JMRP'.
Glad to hear that everything works as expected now.
Hello @Le Nguyen Kha,
Thank you for your question.
Until Plesk is not upgraded to the newer version, there is no way to use DKIM.
So it is highly recommended to upgrade Plesk to the newer version using the following guide: How to upgrade Plesk to the next release
> how many percent our emails will go to our customer's inbox?
There is no statistics on this matter, however to ensure that everything is setup correctly and your IP address is not in the blacklists, please use the services like MXToolbox blacklist checker or Blacklist Check provided by WhatIsMyIPAddress.com.
If everything is setup properly, your IP is not blacklisted, however emails still hit the Spam folder, contact support of a mail service to remove your IP address from their blacklists:
Gmail Help - Report a delivery problem between your domain and Gmail
Microsoft Support - New support request
Yahoo! Help - Submit a Form
AOL Postmaster - Open a Trouble Ticket
Hello,
I have setup Plesk Control Panel at a custom url (ps.mydomain.com) using the "Custom Plesk Hostname" extension.
Where do I find the dkim _domainkey.ps.mydomain.com to use in mydomain.com DNS to validate the email source?
Hello, mydomain.com will have dkim like _domainkey.mydomain.com. DKIM is based on domain name, not Plesk URL. If DKIM is enabled you will see it under Website & Domains > domain.com > DNS settings.
Hello Anton, I apologize I wasn't clear in my question.
All the websites I host on Plesk send emails through Mailgun and have the proper SPF and DKIM setup.
Plesk Control Panel is setup at a custom url (ps.mydomain.com, a subdomain of my company domain), I did that using the "Custom Plesk Hostname" extension.
Now, all notification and warning emails sent by Plesk are sent from ps.mydomain.com, which is Plesk itself and not a website/property/application/domain hosted there.
I am looking for its DKIM, something like : key._domainkey.ps.mydomain.com
Hello,
As ps.mydomain.com is a subdomain of a company domain, then DNS TXT record intended for DKIM like key._domainkey.ps.mydomain.com should be configured in the DNS zone of 'mydomain.com'.
However, in this way, Plesk is not aware of the customized domain used for outgoing notifications, thus it would not be signed properly by Mail server.
Hi,
DNS is hosted with the registrar for most of the domains on my server.
Are the steps you outlined in the article the same for a domain where the DNS is NOT hosted with PLESK?
ex:
myserver.myserverdomain.com hosts the website
clientdomain.com is the site being hosted
clientdomain.com is dns is hosted by godaddy.com
The dns records I added are:
Is this correct?
I do not host email for any of the sites.
1. Do I still select DMARC and DKIM at the server level in the mail server settings?
2. Since mail settings at the domain level on PLESK are deactivated, can/do I still select DKIM?
3. For the DNS records mentioned, where did the string of characters come from - it looks like a key?
Thanks!
Hi Daphne Talbot
>Are the steps you outlined in the article the same for a domain where the DNS is NOT hosted with PLESK?
If an external DNS server is used for a domain, make sure that all TXT records related to DKIM and DMARC (default._domainkey.<example.com>, _domainkey.<example.com>, _dmarc.<example.com>) from domain's DNS settings are transferred to external DNS as is.
> 3. For the DNS records mentioned, where did the string of characters come from - it looks like a key?
The key for DKIM can be obtained as follows if the DNS is external:
https://support.plesk.com/hc/en-us/articles/115000214973-How-to-get-the-DKIM-public-key-from-Plesk-if-DNS-is-not-installed-
However, since you have mail hosted externally you need to activate SPF, DKIM, DMARC on your mail server and generate the key there.
After that you should be able to adde the records on the DNS server. Enabling on Plesk will not make any difference.
Hi, I write here cause I don't know what else to do,
Recently few days ago we move our WordPress website caknowledge.com from siteground to AWS Ec2 Server, we setup everything and our website is running fine on AWS server.
We also install postfix for email sending but when new users signup on our website or if anyone wants to reset the password then all verification mails are going to the spam folder, we already talk to aws premium support but not getting any help from them.
Please can anyone help us, how we resolve this issue, we use PHP mailer service inbuilt in WordPress for sending mails and we already verified our domain on AWS SES.
I've got the same question as Michele Iannello.
We have a few plesk servers with our parent domain name (i.e. a domain that isn't a subscription) that sends plesk admin update emails like server updates available, alerts for usage, etc.
All our plesk sites use a subdomain with the following pattern:
plesk.servername.mydomain.com
Our DNS is all managed externally through CloudFlare.
Emails the Plesk server sends come from our internal email address (dev@mydomain.com). I want to set up DKIM for these email sends to validate them (currently they fail our DMARC on DKIM). How do I set up a domain key at the server level?
Thanks,
Hello Steve,
I am not sure if this will help you, but I solved my own issue by setting up "External SMTP Server Settings" with a dedicated email address I created on Mailgun, which has the proper SPF, DKIM and DMARK configuration.
also, in "External SMTP Server Settings", I have the setting "Allow Plesk to send email notifications through this SMTP server" checked.
Thanks Michele Iannello,
I'll switch our Plesk servers over to using an external SMTP. Appreciate the reply.
glad I could help Steve de Niese. :)
Please sign in to leave a comment.