Уже который день бьюсь с почтой - никак не могу добавить заголовки dkim. Поэтому прошу помощи. Сгенерил ключи, добавил их в днс:
support:/etc/exim4/dkim# ll
/etc/exim4/dkim
total 16K
drwxr-xr-x 4 root root 4.0K Dec 30 14:55 ..
-rw-r----- 1 Debian-exim Debian-exim 887 Jan 21 22:39 mmdsmart.com.key
-rw-r----- 1 Debian-exim Debian-exim 299 Jan 21 22:39 mail.txt
drwxr-xr-x 2 Debian-exim Debian-exim 4.0K Jan 21 22:42 .
support:/etc/exim4/dkim# openssl rsa -in mmdsmart.com.key -pubout
writing RSA key
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6HZSRvbNUuWnQEVSY5MfSWEn+
BkgcKD2bA0IOrIgiUef93QdpTDqU1zmVg2ozfBUfWx5gqhmvpt0pg7urClWCvEZn
hOfR8mLatgTCs5BuPCVFNbAwKbsahwQ6JYxCcieaCpRP3roqPdbcU1qGhEkyECu1
hQ7nnIEejYXIpC4l9wIDAQAB
-----END PUBLIC KEY-----
support:/etc/exim4/dkim# cat mail.txt
mail._domainkey IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6HZSRvbNUuWnQEVSY5MfSWEn+BkgcKD2bA0IOrIgiUef93QdpTDqU1zmVg2ozfBUfWx5gqhmvpt0pg7urClWCvEZnhOfR8mLatgTCs5BuPCVFNbAwKbsahwQ6JYxCcieaCpRP3roqPdbcU1qGhEkyECu1hQ7nnIEejYXIpC4l9wIDAQAB" ; ----- DKIM key mail for mmdsmart.com
support:/etc/exim4/dkim# dig txt mail._domainkey.mmdsmart.com
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> txt mail._domainkey.mmdsmart.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20983
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;mail._domainkey.mmdsmart.com. IN TXT
;; ANSWER SECTION:
mail._domainkey.mmdsmart.com. 1603 IN TXT "v=DKIM1\; k=rsa\; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6HZSRvbNUuWnQEVSY5MfSWEn+BkgcKD2bA0IOrIgiUef93QdpTDqU1zmVg2ozfBUfWx5gqhmvpt0pg7urClWCvEZnhOfR8mLatgTCs5BuPCVFNbAwKbsahwQ6JYxCcieaCpRP3roqPdbcU1qGhEkyECu1hQ7nnIEejYXIpC4l9wIDAQAB"
;; Query time: 2 msec
;; SERVER: 77.247.176.114#53(77.247.176.114)
;; WHEN: Wed Jan 21 23:14:52 2015
;; MSG SIZE rcvd: 293
Дальше по одному из миллиона мануалов «exim+dkim+debain» правлю транспорт в exim4.conf.template
remote_smtp:
debug_print = "T: remote_smtp for $local_part@$domain"
driver = smtp
interface = ${lookup{$sender_address_domain}lsearch{/etc/exim4/interfaces}{$value}{109.201.138.161}}
.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=${lookup{$sending_ip_address}lsearch{/etc/exim4/mailhelo}{$value}{mmdsmart.com}}
.endif
.ifdef DKIM_DOMAIN
DKIM_DOMAIN = ${lc:${domain:$h_from:}}
.endif
.ifdef DKIM_SELECTOR
dkim_selector = mail
.endif
.ifdef DKIM_PRIVATE_KEY
DKIM_PRIVATE_KEY = /etc/exim4/dkim/${lc:${domain:$h_from:}}.key
.endif
.ifdef DKIM_CANON
dkim_canon = simple
.endif
.ifdef DKIM_STRICT
dkim_strict = DKIM_STRICT
.endif
.ifdef DKIM_SIGN_HEADERS
dkim_sign_headers = DKIM_SIGN_HEADERS
.endif
.ifdef TLS_DH_MIN_BITS
tls_dh_min_bits = TLS_DH_MIN_BITS
.endif