Created
November 18, 2016 10:31
-
-
Save gwire/3449b58c5072eb402cf83cc6774ffa13 to your computer and use it in GitHub Desktop.
Exim config for working with Google delivery restrictions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domainlist single_domain_mx = aspmx.l.google.com : gmail-smtp-in.l.google.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnslookup_single_domain: | |
debug_print = "R: dnslookup_single_domain for $local_part@$domain" | |
driver = dnslookup | |
domains = ! +local_domains : ! +relay_to_domains | |
condition = ${if forany{${lookup dnsdb{>: mxh=$domain}}}{match_domain{$item}{+single_domain_mx}}} | |
transport = remote_smtp_single_domain | |
same_domain_copy_routing = yes | |
no_more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remote_smtp_single_domain: | |
debug_print = "T: remote_smtp_single_domain for $local_part@$domain" | |
driver = smtp | |
multi_domain = false | |
max_rcpt = 8 | |
.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 | |
.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 | |
.ifdef TLS_DH_MIN_BITS | |
tls_dh_min_bits = TLS_DH_MIN_BITS | |
.endif | |
.ifdef REMOTE_SMTP_TLS_CERTIFICATE | |
tls_certificate = REMOTE_SMTP_TLS_CERTIFICATE | |
.endif | |
.ifdef REMOTE_SMTP_PRIVATEKEY | |
tls_privatekey = REMOTE_SMTP_PRIVATEKEY | |
.endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a minor update to a 2012 exim config for dealing with Google's multi-domain routing restrictions, with the addition of
max_rcpt
in order to avoid a "domain policy size" restriction which seems to kick-in if you attempt to deliver to more than eight recipients at a time. (Which mailing-list servers will tend to do.)