37 lines
822 B
YAML
37 lines
822 B
YAML
---
|
|
- name: Include stunnel on condition
|
|
ansible.builtin.include_tasks:
|
|
file: stunnel.yml
|
|
when: smtprelay_port not in [587]
|
|
|
|
- name: Include SMTP remapping
|
|
ansible.builtin.include_tasks:
|
|
file: smtp_remap.yml
|
|
when: smtprelay_origin not in ["mateu.be"]
|
|
|
|
- name: Install postfix smtp server
|
|
ansible.builtin.package:
|
|
name: postfix
|
|
state: present
|
|
|
|
- name: Install libsasl2
|
|
ansible.builtin.package:
|
|
name: libsasl2-modules
|
|
state: present
|
|
|
|
- name: Install sasl_passwd file
|
|
ansible.builtin.template:
|
|
src: sasl_passwd.j2
|
|
dest: /etc/postfix/sasl_passwd
|
|
mode: 0640
|
|
notify:
|
|
- Postmap sasl_passwd
|
|
- Restart postfix
|
|
|
|
- name: Install default postfix main.cf
|
|
ansible.builtin.template:
|
|
src: main.cf.j2
|
|
dest: /etc/postfix/main.cf
|
|
mode: 0644
|
|
notify: Restart postfix
|