learning_curve
Golden Pleskian
Slightly detailed explanation, but at least there's only one question at the end and we're sure that somebody on here, will know the answer. We're almost at the stage of successfully applying DKIM to all PHPMailer sent e-mails on some of our domains that now require this option. We're testing and running trials on one specific domain at present, until the whole mail service (with all the required options available) is operating at 100%. When this is achieved, we'll then implement it on all the others. We use 3rd party provided DNS, not the Plesk service. This isn't an issue however, as the Plesk Docs confirm:
DKIM / PHPMailer then does work perfectly but... all the normal (i.e. all the Non-DKIM / PHPMailer provided) test e-mails (depending on which e-mail client is being used) then suffer from dkim=fail reason=“signature verification failed” or dkim=permerror (bad sig) or dkim=fail errors, which, we're pretty sure (in our case anyway) is related to Plesk milter (Postfix) and/or Postfix (within Plesk) not seeing the new, updated domain DNS for some reason
The DKIM errors remain, even after reloading, restarting both Plesk milter (Postfix) and/or Postfix and even after a server restart / reboot. If we restore the original DKIM-related DNS record, then all the Non-DKIM / PHPMailer provided test e-mails are correct once again, but the DKIM / PHPMailer provided test e-mails now fail. This is easy to follow, because they now have incorrect location data for the DKIM private key... (and to answer the obvious question; no, obviously we don't know where it is either, hence the new DKIM keys at the start etc)
So our question is... Where exactly and/or how is the original DKIM-related DNS record verified by Plesk milter (Postfix) and/or Postfix? Once we know that, we're thinking we can solve this quite quickly... Sorry if we've missed this information elsewhere, we've searched but can't quickly see it anywhere - yet
To successfully run DKIM on PHPMailer, we needed new public and private keys for each domain that would need the DKIM / PHPMailer. That's easy to do and put in place, i.e. a new DKIM-related DNS record and a new location for the private key.Important: If you use an external DNS service, DKIM signing will work for outgoing messages, but the receiving mail server will not be able to validate these messages. As a workaround, you can switch off Plesk DNS server and add a corresponding DKIM-related DNS record on the external DNS service. In this case, the receiving server will be able to validate the messages.
DKIM / PHPMailer then does work perfectly but... all the normal (i.e. all the Non-DKIM / PHPMailer provided) test e-mails (depending on which e-mail client is being used) then suffer from dkim=fail reason=“signature verification failed” or dkim=permerror (bad sig) or dkim=fail errors, which, we're pretty sure (in our case anyway) is related to Plesk milter (Postfix) and/or Postfix (within Plesk) not seeing the new, updated domain DNS for some reason
The DKIM errors remain, even after reloading, restarting both Plesk milter (Postfix) and/or Postfix and even after a server restart / reboot. If we restore the original DKIM-related DNS record, then all the Non-DKIM / PHPMailer provided test e-mails are correct once again, but the DKIM / PHPMailer provided test e-mails now fail. This is easy to follow, because they now have incorrect location data for the DKIM private key... (and to answer the obvious question; no, obviously we don't know where it is either, hence the new DKIM keys at the start etc)
So our question is... Where exactly and/or how is the original DKIM-related DNS record verified by Plesk milter (Postfix) and/or Postfix? Once we know that, we're thinking we can solve this quite quickly... Sorry if we've missed this information elsewhere, we've searched but can't quickly see it anywhere - yet
Last edited: