Sending with different DKIM signatures

NethServer Version: 7.9.2009
Module: ?? mail / postfix ??

Hello All,
I´ve got a strange behavior regarding DKIM signatures. On one account the DKIM signature works flawless.
mail-tester.com reports valid signatur:

v=1;
a=rsa-sha256;
c=relaxed/relaxed;
d=xxx.xx;
s=default;
t=1608748039;
bh=fnpKpscNsH5JYyFm5QNfGDCboN7U3KLtlql4DNREBlg=;
h=From:To:Date:Subject:From;
b=b22VBdCWnTlFwj4JMcs8biWeO+0w92PkY/Q2M22Xf3wlB0RsXHBB5…"

When sending from another account mail-tester.com says that the DKIM signature is not valid and shows a different signature:

v=1;
a=rsa-sha256;
c=relaxed/relaxed;
d=xxx.xx;
s=default;
t=1608746275;
bh=WTYKDuGiKzIAo6k32LWCuHkwSdCOyWPyA8jn7lKZwUY=;
h=Reply-To:From:To:Subject:Date:From;
b=S5pYdMB9eV1O5S6GMGX4QIoX5pKGBsa7k9MFBPfvg6FBp42…

The only difference between these two accounts is that the second one (with the wrong DKIM signature) is modified via postfix / smtp_generic_maps to send as another email adress wich is also available on the server.

Any idea what might cause these different signatures. I´ve tried and confirmed this behavior with Outlook and with SOGo.

Thanks
Perakes

After some testing I found out that by using canonical instead of smtp_generic mails are sent out as another email adress with valid DKIM signatures.

Solution:
-> mkdir -p /etc/e-smith/templates-custom/etc/postfix/canonical
-> nano /etc/e-smith/templates-custom/etc/postfix/canonical/70_canonical
send-email@domain.com outbound-email@domain.com
-> expand-template /etc/postfix/canonical
-> postmap /etc/postfix/canonical
-> systemctl restart postfix
-> signal-event nethserver-mail-server-update

1 Like