summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot2017-03-29 23:46:36 +0200
committerroot2017-03-29 23:46:36 +0200
commit904f2042df61ac52e5eb077839b2d6f93c5d1217 (patch)
treefe85718932f0c9a3522bdc78dd21d5cdc60cacca
parentfed59864f03887ed31c586fb149775ca38a7d3ac (diff)
downloadexim-904f2042df61ac52e5eb077839b2d6f93c5d1217.tar.gz
Add local smtp lookup
-rw-r--r--conf.d/030_routers.conf16
-rw-r--r--conf.d/040_transports.conf7
-rw-r--r--exim.conf2
3 files changed, 21 insertions, 4 deletions
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
23# transport = remote_smtp 23# transport = remote_smtp
24 24
25 25
26localrouting:
27 domains = ! +local_domains
28 transport = remote_smtp
29 ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
30 driver = manualroute
31 route_data = ${lookup{$domain}lsearch*{SMTPMAP}}
32 host_find_failed = ignore
33 host_all_ignored = pass
34
35
26# This router routes addresses that are not in local domains by doing a DNS 36# This router routes addresses that are not in local domains by doing a DNS
27# lookup on the domain name. The exclamation mark that appears in "domains = ! 37# lookup on the domain name. The exclamation mark that appears in "domains = !
28# +local_domains" is a negating operator, that is, it can be read as "not". The 38# +local_domains" is a negating operator, that is, it can be read as "not". The
@@ -39,7 +49,7 @@ begin routers
39dnslookup: 49dnslookup:
40 driver = dnslookup 50 driver = dnslookup
41 domains = ! +local_domains 51 domains = ! +local_domains
42 transport = remote_smtp 52 transport = signed_smtp
43 ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1 53 ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
44 no_more 54 no_more
45 55
@@ -160,8 +170,8 @@ mail_aliases:
160# cannot_route_message = Unknown user 170# cannot_route_message = Unknown user
161 171
162 172
163local_user: 173localuser:
164 transport = dovecot_lmtp 174 transport = remote_lmtp
165 domains = +local_domains 175 domains = +local_domains
166 driver = manualroute 176 driver = manualroute
167 route_data = ${lookup{$domain}lsearch*{LMTPMAP}} 177 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
19remote_smtp: 19remote_smtp:
20 driver = smtp 20 driver = smtp
21 message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}} 21 message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
22
23
24signed_smtp:
25 driver = smtp
26 message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
22 dkim_domain = $sender_address_domain 27 dkim_domain = $sender_address_domain
23 dkim_selector = $primary_hostname 28 dkim_selector = $primary_hostname
24 dkim_private_key = DKIMDIR/$dkim_selector._domainkey.$dkim_domain.pem 29 dkim_private_key = DKIMDIR/$dkim_selector._domainkey.$dkim_domain.pem
@@ -43,7 +48,7 @@ remote_smtp:
43# mode = 0660 48# mode = 0660
44 49
45 50
46dovecot_lmtp: 51remote_lmtp:
47 driver = smtp 52 driver = smtp
48 protocol = lmtp 53 protocol = lmtp
49 port = 24 54 port = 24
diff --git a/exim.conf b/exim.conf
index a45ffdc..8efc9d1 100644
--- a/exim.conf
+++ b/exim.conf
@@ -43,6 +43,8 @@ DKIMDIR = /etc/mail/dkim
43 43
44USERLIST = /etc/mail/list.d/users.list 44USERLIST = /etc/mail/list.d/users.list
45ALIASMAP = /etc/mail/list.d/aliases.map 45ALIASMAP = /etc/mail/list.d/aliases.map
46
47SMTPMAP = /etc/mail/list.d/smtp.map
46LMTPMAP = /etc/mail/list.d/lmtp.map 48LMTPMAP = /etc/mail/list.d/lmtp.map
47 49
48.include CONFDIR/conf.d/000_local.conf 50.include CONFDIR/conf.d/000_local.conf