exim4:selective_and_multiple_domain_dkim_with_exim
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
exim4:selective_and_multiple_domain_dkim_with_exim [2016/11/16 15:24] – created peter | exim4:selective_and_multiple_domain_dkim_with_exim [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Exim4 - Selective and multiple domain DKIM with Exim ====== | ====== Exim4 - Selective and multiple domain DKIM with Exim ====== | ||
+ | |||
+ | ===== Using lookups to support selective domain use ===== | ||
Since the Debian package contains " | Since the Debian package contains " | ||
Line 35: | Line 37: | ||
Run **update-exim4.conf** and reload exim. For addresses not listed in **/ | Run **update-exim4.conf** and reload exim. For addresses not listed in **/ | ||
+ | |||
+ | ===== Using custom router and transport files to support selective domain use ===== | ||
+ | |||
+ | Support for DKIM signing in Exim is [[http:// | ||
+ | |||
+ | Where multiple domains are used it may be necessary to selectively switch on DKIM signing, and be able to specify the signing domain. | ||
+ | |||
+ | (This assumes that the keys have been created and the requisite records have been added to DNS for the affected domains. | ||
+ | |||
+ | Set up a simple look up file such as / | ||
+ | |||
+ | <file bash / | ||
+ | *@example.com: | ||
+ | test@example.org: | ||
+ | </ | ||
+ | |||
+ | This config should mean that anything sent from any address at example.com is signed as example.com, | ||
+ | |||
+ | Now create a new router that sits in front of the main router for external main (whatever uses remote_smtp as a transport e.g. dnslookup) such as / | ||
+ | |||
+ | <file bash / | ||
+ | dnslookup_dkim: | ||
+ | debug_print = "R: dnslookup_dkim for $local_part@$domain" | ||
+ | driver = dnslookup | ||
+ | domains = ! +local_domains | ||
+ | senders = lsearch*@;/ | ||
+ | transport = remote_smtp_dkim | ||
+ | same_domain_copy_routing = yes | ||
+ | # ignore private rfc1918 and APIPA addresses | ||
+ | ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/ | ||
+ | 172.16.0.0/ | ||
+ | 255.255.255.255 | ||
+ | no_more | ||
+ | </ | ||
+ | | ||
+ | Then add in a new transport / | ||
+ | |||
+ | <file bash / | ||
+ | remote_smtp_dkim: | ||
+ | debug_print = "T: remote_smtp_dkim 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 = ${lookup{$sender_address}lsearch*@{/ | ||
+ | dkim_selector = yourhostname | ||
+ | dkim_private_key = / | ||
+ | dkim_canon = relaxed | ||
+ | dkim_strict = false | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | I've left the selector and keys the same since there doesn' | ||
+ | |||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | https:// |
exim4/selective_and_multiple_domain_dkim_with_exim.1479309872.txt.gz · Last modified: 2020/07/15 09:30 (external edit)