- Server operating system version
- AlmaLinux 9.6
- Plesk version and microupdate number
- 18.0.71
Hi all,
We have a website configured with domain A and two alias domains (B & C) with email and DNS.
DKIM is enabled at the email level.
When we send an email via a dedicated script (PHPMailer - PHP 8.1), with contact@B as the sender, everything works except that the DKIM signature is invalid.
Tested with Mail-tester.com & appmaildev.com.
After various tests/changes at the PHPmailer & Postfix level, we still have the problem.
If I do this simple test:
$mail = new PHPMailer();
$mail->setFrom("[email protected]", "[email protected]");
$mail->addAddress("[email protected]", "[email protected]");
$mail->isHTML(true);
$mail->Subject = "This is a test";
$mail->Body = "Test";
$mail->CharSet = 'UTF-8';
$mail->send();
AppMaildev said there is a problem:
Public-Key: v=DKIM1; p=MIGfMA......;;
DKIM-Result: fail (bad signature)
This seems to indicate that the signature is indeed added by Postfix/Plesk, but it is incorrect (wrong private/public key pair).
In Plesk DNS, DKIM keys are the same for the 3 domains.
The private key in /etc/domainkeys/domainA/default & /etc/domainkeys/domainB/default are the same...
How to fix the problem?
We have a website configured with domain A and two alias domains (B & C) with email and DNS.
DKIM is enabled at the email level.
When we send an email via a dedicated script (PHPMailer - PHP 8.1), with contact@B as the sender, everything works except that the DKIM signature is invalid.
Tested with Mail-tester.com & appmaildev.com.
After various tests/changes at the PHPmailer & Postfix level, we still have the problem.
If I do this simple test:
$mail = new PHPMailer();
$mail->setFrom("[email protected]", "[email protected]");
$mail->addAddress("[email protected]", "[email protected]");
$mail->isHTML(true);
$mail->Subject = "This is a test";
$mail->Body = "Test";
$mail->CharSet = 'UTF-8';
$mail->send();
AppMaildev said there is a problem:
Public-Key: v=DKIM1; p=MIGfMA......;;
DKIM-Result: fail (bad signature)
This seems to indicate that the signature is indeed added by Postfix/Plesk, but it is incorrect (wrong private/public key pair).
In Plesk DNS, DKIM keys are the same for the 3 domains.
The private key in /etc/domainkeys/domainA/default & /etc/domainkeys/domainB/default are the same...
How to fix the problem?