• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question PHPMailer, DKIM, and Plesk

pleskpanel

Regular Pleskian
Server operating system version
CentOS Linux 7.9.2009 (Core)
Plesk version and microupdate number
Plesk Obsidian 18.0.58 Update #1
For shared web servers when using DNS externally and mail externally, we used the steps here to enable DKM and signing on all domains:


We then use this step to get the key (as DNS is external):


It looks like PHPMailer scripts that use simply "localhost" for the SMTP host without authentication don't actually get DKIM signed. Messages are sent without an issue and logged in the Plesk > Logs > Mail (and they do get received) but without any DKIM signing at all.

Is there a way to get Plesk do to the heavy lifting and sign all locally generated outgoing emails generated by PHP as well as PHPMailer scripts or do PHPMailer instances each have to be configured one by one (even if they use localhost to send mail) for DKIM to work when using localhost?
 
Even when you host mail externally, you can still have local mailboxes and enabled DKIM. You can then use PHP to login to these mailboxes to submit mail. Such mails will be signed by the server.
 
Email sent using PHPMailer using localhost should be signed with DKIM too if DKIM singing is enabled for the domain. However it is worth checking if the email sent uses the same domain for it's return-path (envelope sender). If it's different, it won't get singed with DKIM.
 
Last edited:
Back
Top