• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue DKIM email control not valid

Erwan

Regular Pleskian
Server operating system version
AlmaLinux 9.4
Plesk version and microupdate number
18.0.63
Hi all,

I configured DKIM for a domain via Plesk ("use the DKIM anti-spam system to sign outgoing emails").
The entries are in the DNS.
> default._domainkey.mydomaineB.com ==> v=DKIM1; p=MIGfM.....
> _domainkey.mydomaineB.com ==> o=-
> _dmarc.mydomaineB.com ==> v=DMARC1;p=none;rua=mailto:....

When I test a shipment for example. with a PHP function in domain hosting,

$headers = "From: [email protected]\r\n" .
"Reply-To: [email protected]\r\n" .
"Return-Path: [email protected]\r\n" .
"X-Mailer: PHP/" . phpversion();
$parameters = '-f mydomaineB.com';
mail("[email protected]", "This is a test", "This is a test.", $headers, $parameters);


DKIM signature is not valid.
With Gmail:

ARC-Authentication-Results: i=1; mx.google.com;
dkim=fail [email protected] header.s=default header.b=Pnwz1tTx;
...

With another:
DKIM not valid.
..
v=1;
a=rsa-sha256;
c=relaxed/relaxed;
d=wedge.area-team.fr;
s=default;
...
Your public key is:
"v=DKIM1;
p=MIGfM...
...
Key length: 1024bits
Your DKIM signature is invalid


The domain is managed with 3 other domains with a Plesk Admin license.
I don't know if this has any consequence but a few months ago these domains were under a single subscription with a main domain on a server with a Plesk Pro license.
We used Plesk Migrator.

How to fix this? Thank you.

Erwan
 
Please check if these topics on this matter that might help you, if not provide details on why not so we can check further:

Also feel free to vote for it here:
 
Thank you.

So I carried out tests with PhpMailer (not mail()) to be able to force authentication.
It doesn't change anything.
Sending via RoundCube is not good either.

Always:
Authentication-Results: mx.google.com;
dkim=fail [email protected] header.s=default header.b=t0GdT...


I had the idea of putting an email from the old main domain name and then surprise: DKIM is ok.

Authentication-Results: mx.google.com;
dkim=pass [email protected] header.s=default header.b=PaEd...


The domains are in the same web space.
This seems to influence which DKIM to use.

Web space : mydomaineA.com
System user : myftpsystem

IP : xx.xx.xx.xx
Companion domains :
- mydomaineA.com
- mydomaineB.com (with the email [email protected])

- mydomaineC.com
In summary, the website is : www.mydomaineB.com.
If i send email with: [email protected] (PhpMailer or Round Cube), DKIM fail.
If i send email with: contact@mydomaineA.com (email address that does not exist), DKIM pass
An idea of what to do...
 
Back
Top