exim: new upstream configuration of smarthosts

master
Y 2019-05-11 18:46:17 +02:00
parent 462c157ca1
commit 716c1f79ac
1 changed files with 12 additions and 32 deletions

View File

@ -203,6 +203,15 @@
notify:
- restart exim.service
- name: set smarthost name
lineinfile:
path: /etc/mail/exim.conf
regexp: '^(?:#\s*)?ROUTER_SMARTHOST\s*='
line: |
ROUTER_SMARTHOST={{mail_smtp_smarthost}}
notify:
- restart exim.service
- name: set log destination
lineinfile:
path: /etc/mail/exim.conf
@ -383,41 +392,12 @@
# TODO: https://github.com/Exim/exim/wiki/SimpleGreylisting (with SPAM≥1.0)
- name: disable the dnslookup router
replace:
path: /etc/mail/exim.conf
regexp: '^dnslookup:\n(?:.+\n)*'
replace: |
# dnslookup:
# driver = dnslookup
# domains = ! +local_domains
# transport = remote_smtp
# ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
# no_more
notify:
- restart exim.service
- name: enable the smarthost router
replace:
path: /etc/mail/exim.conf
regexp: '^#\s*smarthost:\n(?:.+\n)*'
replace: |
smarthost:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = * ISP.SMART.HOST
ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
no_more
notify:
- restart exim.service
- name: set the smarthost hostname
- name: use remote_smtp for smarthost delivery
lineinfile:
path: /etc/mail/exim.conf
regexp: '^(\s*route_list\s*=)'
regexp: '^(\s*transport\s*=)'
backrefs: true
line: "\\1 * {{mail_smtp_smarthost}}"
line: "\\1 remote_smtp"
notify:
- restart exim.service