Exim 4.71 does not add DKIM signature to outgoing emails
I am trying to add DKIM to my domain, I have created a key, added the following to /etc/exim4/conf.d/transport/30_exim4_config_remote_smtp
:
dkim_domain = mydomain.com
dkim_selector = mail1
dkim_private_key = /etc/exim4/dkim.key
Restarted exim
service, tried dpkg-reconfigure
, but all emails are sent without signature. /var/log/exim4/panic.log
is empty. No errors or anything.
What am I doing wrong? Ubuntu 10.04 LTS
### transport/30_exim4-config_remote_smtp
#################################
# This transport is used for delivering messages over SMTP connections.
remote_smtp:
debug_print = "T: remote_smtp for $local_part@$domain"
driver = smtp
.ifdef REMOTE_SMTP_HOSTS_AVOID_TLS
hosts_avoid_tls = REMOTE_SMTP_HOSTS_AVOID_TLS
.endif
.ifdef REMOTE_SMTP_HEADERS_REWRITE
headers_rewrite = REMOTE_SMTP_HEADERS_REWRITE
.endif
.ifdef REMOTE_SMTP_RETURN_PATH
return_path = REMOTE_SMTP_RETURN_PATH
.endif
.ifdef REMOTE_SMTP_HELO_DATA
helo_data=REMOTE_SMTP_HELO_DATA
.endif
dkim_domain = mydomain.com
dkim_selector = mail1
dkim_private_key = /etc/exim4/dkim.key
.ifdef DKIM_CANON
dkim_canon = DKIM_CANON
.endif
.ifdef DKIM_STRICT
dkim_strict = DKIM_STRICT
.endif
.ifdef DKIM_SIGN_HEADERS
dkim_sign_headers = DKIM_SIGN_HEADERS
.endif
Log lines for the email:
2013-03-21 20:25:14 1UIfUY-0008Tz-1g <= [email protected] U=nick P=local S=365
2013-03-21 20:25:16 1UIfUY-0008Tz-1g => [email protected] R=dnslookup T=remote_smtp H=ASPMX.L.GOOGLE.com [173.194.79.26] X=TLS1.0:RSA_ARCFOUR_SHA1:16 DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com"
2013-03-21 20:25:16 1UIfUY-0008Tz-1g Completed
I am using a smarthost and I have the following configuration:
/etc/exim4/conf.d/main/00_local_macros:
DKIM_CANON = relaxed
DKIM_SELECTOR = 12345
DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_FILE = /etc/exim4/keys/${dkim_domain}/12345.private
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
Then in /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_smarthost:
.ifdef DKIM_DOMAIN
dkim_domain = DKIM_DOMAIN
.endif
.ifdef DKIM_SELECTOR
dkim_selector = DKIM_SELECTOR
.endif
.ifdef DKIM_PRIVATE_KEY
dkim_private_key = DKIM_PRIVATE_KEY
.endif
.ifdef DKIM_CANON
dkim_canon = DKIM_CANON
.endif
.ifdef DKIM_STRICT
dkim_strict = DKIM_STRICT
.endif
.ifdef DKIM_SIGN_HEADERS
dkim_sign_headers = DKIM_SIGN_HEADERS
.endif