exim: new upstream configuration of smarthosts
parent
462c157ca1
commit
716c1f79ac
|
@ -203,6 +203,15 @@
|
||||||
notify:
|
notify:
|
||||||
- restart exim.service
|
- 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
|
- name: set log destination
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/mail/exim.conf
|
path: /etc/mail/exim.conf
|
||||||
|
@ -383,41 +392,12 @@
|
||||||
|
|
||||||
# TODO: https://github.com/Exim/exim/wiki/SimpleGreylisting (with SPAM≥1.0)
|
# TODO: https://github.com/Exim/exim/wiki/SimpleGreylisting (with SPAM≥1.0)
|
||||||
|
|
||||||
- name: disable the dnslookup router
|
- name: use remote_smtp for smarthost delivery
|
||||||
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
|
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/mail/exim.conf
|
path: /etc/mail/exim.conf
|
||||||
regexp: '^(\s*route_list\s*=)'
|
regexp: '^(\s*transport\s*=)'
|
||||||
backrefs: true
|
backrefs: true
|
||||||
line: "\\1 * {{mail_smtp_smarthost}}"
|
line: "\\1 remote_smtp"
|
||||||
notify:
|
notify:
|
||||||
- restart exim.service
|
- restart exim.service
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue