• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue DKIM in Plesk doesn't work

igork1

Basic Pleskian
I have a problem with enabling DKIM in Plesk for my 2 VPS.

Same problem with a new VPS on Debian 8 + Plesk Onyx 17.8.11 and
old VPS on CentOS 6.7 + Plesk Onyx 17.5.3

I enabled DNS service in Plesk for my domains. Also in domain's registrar service I changed nameservers which now point to my server directly (ns1.mydomain.com and ns2.mydomain.com).

Websites with Plesk DNS are working correctly.

I enabled DKIM in Plesk (Tools & Settings > Mail Server Settings)
And DKIM is enabled in Mail settings of certain domains.

There are two DKIM records in Plesk DNS:
_domainkey.slideshowforum.com. TXT o=-
default._domainkey.slideshowforum.com. TXT v=DKIM1; p=MIGfMA0GCSqGSIb3DQ <...>

However when I send a test email from PHP script mail() I see only SPF = pass and DMARC = pass. No DKIM in headers, and no "DKIM = pass"

Postfix / Dovecot

P.S. I've read this article:
DKIM, SPF, and DMARC Protection
 
Last edited:
You're right. DKIM works only for webmail (mail program), not for phpmail.

But it's very complicated. I hoped that Plesk Onyx may help to simplify use of DKIM.

Earlier I had Plesk 12.5 + external DNS and I manually installed OpenDKIM and created keys. DKIM worked fine for phpmail.

After the upgrade to Plesk Onyx 17.5.3 DKIM became broken. And I couldn't fix it.

I tried to install DKIM manually on a new VPS with Debian 8 + Plesk Onyx 17.8.11 and it also didn't work for phpmail.

So I decided to restore full backup of my VPS and try Plesk DNS with DKIM. And it also doesn't work.

Can I expect that Plesk will offer automatic solution for DKIM soon?
 
Last edited:
You're right. DKIM works only for webmail (mail program), not for phpmail
It looks like you may not have read all that thread properly? ;) i.e. followed the link in Post #2 of that thread and the subsequent guide? PHP Mail with DKIM works perfectly for us (our Plesk setup in shown in our signature)
But it's very complicated. I hoped that Plesk Onyx may help to simplify use of DKIM
To be fair, once you understand how and what data needs to be read by PHP Mailer and where that data is located within Plesk, it's quite easy! There's no need to install / use OpenDKIM at all. It works fine without it (in our case anyway)
Can I expect that Plesk will offer automatic solution for DKIM soon?
Don't hold your breath... :p
 
Hi,

Thanks for your reply!

I'm stuck on the stage: "5) Then amend the PHPMailer file as follows:"

Where to find this file? Sorry for stupid question.
 
I'm stuck on the stage: "5) Then amend the PHPMailer file as follows:"
The file name is class.phpmailer.php Obviously we don't know exactly where that is on your server (it won't be the same setup / packages etc as ours) but you can easily find it now you have the name using CLI / SSH. Take a backup copy when you do then edit it as per that guide and it should be fine. FWIW the first couple of lines when you open it will be something like:
Code:
<?php
/**
 * PHPMailer - PHP email creation and transport class.
 * @package PHPMailer
 * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
....etc
 
I didn't find any file class.phpmailer.php in both my VPS - CentOS 6.7 and Debian 8.1

I searched in Midnight Commander via SSH.
 
Ahhhh Okay.
You probably know the differences already then between mail() in php and phpmailer, but if not, this is easy reading and gives a clear enough explanation. Unless you change to using phpmailer, you'll need a different solution from the one we used then, which (unluckily for you it seems now) was: "...successfully applying DKIM to all PHPMailer sent e-mails"
 
Thanks for the explanation. My mistake. I will read more info about phpmailer.

Anyway, I hope that Plesk team will find automatical solution for DKIM + mail(), too.
 
Back
Top