[exim] dkim different for From or Sender

Startseite
Nachricht löschen
Nachricht beantworten
Autor: technique@dreamhosting.fr
Datum:  
To: exim users
Betreff: [exim] dkim different for From or Sender
Hi

I need you help again.

I send 1 email with 2 differents domains
From is xxx@DOMAIN_A
Sender is yyyy@DOMAIN_B

if I have DKIM key for DOMAIN A, I use it
If not, I use DKIM key of DOMAIN B


My exim lines :

# DKIM for Sender
DKIM_DOMAIN = ${lc:${domain:$h_sender:}}
DKIM_PRIVATE_KEY = ${if
exists{/etc/virtual/${lc:${domain:$h_sender:}}/dkim.private.key}{/etc/virtual/${lc:${domain:$h_sender:}}/dkim.private.key}{0}}

# DKIM Selector is different
DKIM_SELECTOR_LOCAL= x
DKIM_SELECTOR_EXT=sgautorepondeur

# DKIM for From
DKIM_EXT_DOMAIN = ${lc:${domain:$h_from:}}

DKIM_SELECTOR_OK = ${if
exists{/etc/dkim/DKIM_EXT_DOMAIN.pem}{DKIM_SELECTOR_EXT}{DKIM_SELECTOR_LOCAL}}
DKIM_USE_DOMAIN = ${if
exists{/etc/dkim/DKIM_EXT_DOMAIN.pem}{DKIM_EXT_DOMAIN}{DKIM_DOMAIN}}
DKIM_EXT_PRIVATE_KEY = ${if
exists{/etc/dkim/DKIM_EXT_DOMAIN.pem}{/etc/dkim/DKIM_EXT_DOMAIN.pem}{DKIM_PRIVATE_KEY}}


This line seems to be a problem : DKIM_EXT_DOMAIN = ${lc:${domain:$h_from:}}
If I replace by a real domain, it works very well !
DKIM_EXT_DOMAIN = DOMAIN_A

I try
- ${lc:${domain:$h_from:}}
- ${lc:${domain:$h_From:}}
- $sender_address_domain

(dkim for From DOMAIN and Sender DOMAIN are not registered in the same
place, but there is no error here, it's sure, because DKIM for Sender is
always OK, and DKIM for DOMAIN A is ok if I write the real domain to
test. But impossible to detect it)

Thanks for your help !