Hello,
with opendkim and ldap I can choose the auid (i=) from LDAP query:
* ldap://192.0.2.1/ou=people,dc=example,dc=com?DKIMSelector,DKIMIdentity?sub?(DKIMIdentity=$d)*
An instance from example in contrib folder is:
dn: ou=bar,ou=people,dc=example,dc=com
objectClass: organizationalUnit
objectClass: top
objectClass: DKIM
DKIMSelector: bar-2011
DKIMIdentity: @bar.example.com
In many LDAP servers setup, it is common to base the mail addresses by account, and each account can share different domain aliases. For instance:
dn: ...
mail: me@example.com
mailalternateaddress: me@subdomain.example.com
mailalternateaddress: aliasme@subdomain.example.com
DKIMSelector: bar-2011
So it should be useful a "DKIMIdentity" multivalue and multiattribute, with opendkim that choose the value of auid corresponding to the From header of the mail:
For instance, using above query If I sent a mail with header
From: me@example.com
I will see "i=me@example.com" in sign.
If I sent a mail with header
From: aliasme@subdomain@example.com
I will see "i=aliasme@subdomain@example.com" in header.