diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-09-16 13:46:10 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-09-16 13:47:49 +0300 |
commit | 05a697f2b8553bb0379a38b0767b8c4053470eeb (patch) | |
tree | 68956716251ca8a1fb0fc9d00476bb41e954c1e2 /ansible/roles/mail-server | |
parent | 9a3f7758417c53fe6cd11dd82ed906b3b8ae0722 (diff) | |
download | ansibleness-05a697f2b8553bb0379a38b0767b8c4053470eeb.tar.gz |
Add: enable use of smarthost by postfix on pieni.net
Diffstat (limited to 'ansible/roles/mail-server')
-rw-r--r-- | ansible/roles/mail-server/tasks/postfix.yml | 1 | ||||
-rw-r--r-- | ansible/roles/mail-server/templates/postfix.main.cf.j2 | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/ansible/roles/mail-server/tasks/postfix.yml b/ansible/roles/mail-server/tasks/postfix.yml index 8d600ff..c691cd8 100644 --- a/ansible/roles/mail-server/tasks/postfix.yml +++ b/ansible/roles/mail-server/tasks/postfix.yml @@ -76,3 +76,4 @@ - name: postmap smarthost creds shell: | postmap /etc/postfix/sasl_passwd + notify: restart postfix diff --git a/ansible/roles/mail-server/templates/postfix.main.cf.j2 b/ansible/roles/mail-server/templates/postfix.main.cf.j2 index 80cd00e..8e08ed9 100644 --- a/ansible/roles/mail-server/templates/postfix.main.cf.j2 +++ b/ansible/roles/mail-server/templates/postfix.main.cf.j2 @@ -7,7 +7,7 @@ mydestination = {{ mail_hostname }}, localhost.localdomain, localhost mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 inet_interfaces = all myorigin = /etc/mailname -relayhost = +relayhost = {{ smarthost }}:{{ smarthost_port }} alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases virtual_alias_maps = hash:/etc/postfix/virtual @@ -27,7 +27,12 @@ smtp_tls_security_level = may smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_tls_loglevel = 1 -# SASL authentication +# SASL authentication, outgoing mail. +smtp_sasl_auth_enable = yes +smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd +smtp_sasl_security_options = + +# SASL authentication, incoming mail. smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes |