2025-01-19 22:00:20 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Install needed packages
|
|
|
|
become: true
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name: postfix
|
2025-01-19 22:26:36 +01:00
|
|
|
|
|
|
|
- name: Copy main.cf
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: main.cf.j2
|
|
|
|
dest: /etc/postfix/main.cf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: Reload postfix service
|
2025-01-19 23:02:08 +01:00
|
|
|
|
|
|
|
- name: Allow SMTP/submission to relayhost
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: nftables/output.d/postfix.conf.j2
|
|
|
|
dest: /etc/nftables/output.d/postfix.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0640
|
|
|
|
notify: Reload nftables service
|