1

Topic: Space In DKIM Signature - Is it causing DKIM Authentication to Fail?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu LTS 20.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi,

I am running multiple domains on the server and all pass the mxtoolbox email deliverability test with both DKIM Alignment and Authentication correct

I have one domain which passes Alignment but fails authentication.  I have checked the DNS records, amavisd-new testkeys is correct and the only difference I can find is that in the DKIM Signature shown on the mxtoolbox results there is a space between the 'd=' and the domain name on the failing domain.   All other factors appear to be the same. 

All domains can send and receive email correctly

the amavisd config file appear correct

On the failing domain the DKIM-Signature     v=1; a=rsa-sha256; c=relaxed/simple; d= domain.org.uk; h=content-type:content-type:mime-version :subject:subject:message-id:to:from:from:date:date; s=dkim ...

Note the space after the d=.  I'm speculating that this is causing the DKIM authentication to fail?

On the good domain the DKIM-Signature    v=1; a=rsa-sha256; c=relaxed/simple; d=domain.org.uk; h=content-type:content-type:mime-version:subject:subject :message-id:to:from:from:date:date; s=dkim; .......

That's the only difference I can find!

Help

PS Thankyou for all the work you do on this?  This is the first weirdness I've experienced and I know it's something I've done - I just can't figure it out!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Space In DKIM Signature - Is it causing DKIM Authentication to Fail?

I believe you have a typo in dkim_signature_options_bysender_maps variable (a heading space in the "d" string). It's in /etc/amavis/conf.d/50-user on my install

"domain.org.uk"  => { d => " domain.org.uk", a => 'rsa-sha256', c => 'relaxed/simple', ttl => 10*24*3600 },
#vs
"domain.org.uk"  => { d => "domain.org.uk", a => 'rsa-sha256', c => 'relaxed/simple', ttl => 10*24*3600 },

3

Re: Space In DKIM Signature - Is it causing DKIM Authentication to Fail?

Hi,

Thanks for the reply

The config file is correct and I can't find an entry with a space in any other config!   What's strange is that it's passing other DMARC tests so I'm now thinking it could be a false positive from the mxtoolbox email deliverability test.  The DKIM spec does allow for a space between the d and the domain name

4

Re: Space In DKIM Signature - Is it causing DKIM Authentication to Fail?

Hi,

I have the same problem. Have you fixed it? My two other domains works correct. But for one domain amavisd adds the space in DKIM signature.

5

Re: Space In DKIM Signature - Is it causing DKIM Authentication to Fail?

Open an own thread and provide related informations if you want help