Re: [exim] DKIM signing for multiple domains

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Andrew Colin Kissa
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] DKIM signing for multiple domains

> On 25 Sep 2018, at 09:28, Odhiambo Washington via Exim-users <exim-users@???> wrote:
>
> I have multiple domains hosted on the same server. They are virtual
> domains. The server has just one IP address and one Exim instance.
> I am wondering how to easily do DKIM signing for these domains. I decided
> to use the same selector for all the domains to make life easy. Would the
> following transport work? If not, what is the best way to do this for
> multiple domains sharing the same IP address?
>
> remote_smtp_DK:
> driver = smtp
> dkim_domain = ${sender_address_domain}
> dkim_selector = csl
> dkim_private_key =
> "/etc/pki/tls/dk/${sender_address_domain}-dkim.priv.key"
> dkim_canon = relaxed
> dkim_strict = true


It is better to check for the existence of the key as follows.

dkim_domain = ${if exists{/etc/pki/tls/dk/${lc:$sender_address_domain}-dkim.priv.key}{${lc:$sender_address_domain}}{}}
dkim_private_key = ${if exists{/etc/pki/tls/dk/${lc:$sender_address_domain}-dkim.priv.key}\
{{/etc/pki/tls/dk/${lc:$sender_address_domain}-dkim.priv.key}{0}}

- A