v0.1 done: docker webhosts, smtp gateway
This commit is contained in:
27
roles/smtpgateway/tasks/postfix.yaml
Normal file
27
roles/smtpgateway/tasks/postfix.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: "Install Postfix via apt"
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- postfix
|
||||
|
||||
- name: Install Postfix SASL credentials
|
||||
template:
|
||||
src: templates/sasl_passwd
|
||||
mode: 600
|
||||
dest: /etc/postfix/sasl_passwd
|
||||
|
||||
- name: Install Postfix mail gateway config
|
||||
template:
|
||||
src: templates/main.cf
|
||||
dest: /etc/postfix/main.cf
|
||||
|
||||
- name: Build hashtable of SASL creds
|
||||
command: postmap /etc/postfix/sasl_passwd
|
||||
|
||||
- name: Restart Postfix
|
||||
service:
|
||||
name: postfix
|
||||
state: restarted
|
||||
enabled: yes
|
Reference in New Issue
Block a user