From 904f2042df61ac52e5eb077839b2d6f93c5d1217 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 29 Mar 2017 23:46:36 +0200 Subject: Add local smtp lookup --- conf.d/030_routers.conf | 16 +++++++++++++--- conf.d/040_transports.conf | 7 ++++++- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'conf.d') diff --git a/conf.d/030_routers.conf b/conf.d/030_routers.conf index a74fb44..be3651f 100644 --- a/conf.d/030_routers.conf +++ b/conf.d/030_routers.conf @@ -23,6 +23,16 @@ begin routers # transport = remote_smtp +localrouting: + domains = ! +local_domains + transport = remote_smtp + ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1 + driver = manualroute + route_data = ${lookup{$domain}lsearch*{SMTPMAP}} + host_find_failed = ignore + host_all_ignored = pass + + # This router routes addresses that are not in local domains by doing a DNS # lookup on the domain name. The exclamation mark that appears in "domains = ! # +local_domains" is a negating operator, that is, it can be read as "not". The @@ -39,7 +49,7 @@ begin routers dnslookup: driver = dnslookup domains = ! +local_domains - transport = remote_smtp + transport = signed_smtp ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1 no_more @@ -160,8 +170,8 @@ mail_aliases: # cannot_route_message = Unknown user -local_user: - transport = dovecot_lmtp +localuser: + transport = remote_lmtp domains = +local_domains driver = manualroute route_data = ${lookup{$domain}lsearch*{LMTPMAP}} diff --git a/conf.d/040_transports.conf b/conf.d/040_transports.conf index ec5c0ab..6236616 100644 --- a/conf.d/040_transports.conf +++ b/conf.d/040_transports.conf @@ -19,6 +19,11 @@ begin transports remote_smtp: driver = smtp message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}} + + +signed_smtp: + driver = smtp + message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}} dkim_domain = $sender_address_domain dkim_selector = $primary_hostname dkim_private_key = DKIMDIR/$dkim_selector._domainkey.$dkim_domain.pem @@ -43,7 +48,7 @@ remote_smtp: # mode = 0660 -dovecot_lmtp: +remote_lmtp: driver = smtp protocol = lmtp port = 24 -- cgit v1.2.3