hello all
I'm trying to use dkim_signing, with rspamd 1.7.1 in milter mode with sendmail, but recipients are flagging the messages as having invalid DKIM
i had previously been successful using mimedefang with the same private and public keys, so i am confident that my dkim infrastructure (DSN, keys, etc) are working correctly. just tested it again with mimedefang & confirmed it's ok, testing with
http://dkimvalidator.com/ .
there are 2 differences I've noticed between success & failure:
1) mimedefang has a shorter h: list (h=from:content-type:mime-version:subject:message-id:date:to;) compared to rspamd (h=from:sender:reply-to:subject:date:message-id:to:cc:mime-version:content-type:content-transfer-encoding:resent-to:resent-cc:resent-from:resent-sender:resent-message-id:in-reply-to:references:list-id:list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature;)
- i know i can set this in /etc/rspamd/local.d/dkim.conf ... but should that matter ? is the presence of dkim-signature a problem there ? is there a knock-on effect for arc ?
2) mimedefang sets the data (b=...) all on one line , whereas rspamd appears to be returning a string with \n\t (newline and tab) at certain points. or at least .. that is what sendmail reports is being set. could this be causing the problem ?
what else can I do to debug this ? is there any way to easily trap a copy of the message before it's signed & then run a signing process manually ?
here's my dkim_signing.conf
enabled = true;
auth_only = true;
allow_username_mismatch = true ;
allow_hdrfrom_mismatch = false;
allow_hdrfrom_multiple = false;
sign_local = true;
use_domain = "header";
use_domain_sign_local = "header";
#
selector = "mail";
path = "/var/lib/opendkim/keys/$domain/$selector.private" ;
#
and dkim.conf
sign_headers = "from:sender:reply-to:subject:date:message-id:to:cc:mime-version:content-type:content-transfer-encoding:resent-to:resent-cc:resent-from:resent-sender:resent-message-id:in-reply-to:references:list-id:list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature";
there's no obvious errors in the log from dkim and dkim_signing . sendmail reports the milter adding the new header & then sends the message.
I also want to use ARC (and have it configured) since I redirect mail for some people:
here's my arc.conf
allow_envfrom_empty = false;
allow_hdrfrom_mismatch = true;
allow_hdrfrom_multiple = true;
allow_username_mismatch = true;
auth_only = false;
path = "/var/lib/opendkim/keys/$domain/$selector.private"
selector = "mail";
sign_local = false;
sign_inbound = true;
symbol = "ARC_SIGNED";
try_fallback = true;
use_domain = "recipient";
use_esld = false;
use_redis = false;
key_prefix = "DKIM_PRIV_KEYS";
selector_prefix = "DKIM_SELECTORS";
any suggestions very much appreciated