homeserver/roles/mgrote_postfix/tasks/main.yml
Michael Grote 7dfe80a4dc move to containerized mail relayhost (#588)
Reviewed-on: #588
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2023-10-31 11:37:50 +01:00

41 lines
813 B
YAML

---
- name: Ensure needed packages are installed
become: true
ansible.builtin.package:
name:
- postfix
- mailutils
# - libsasl2-modules
state: present
- name: kopiere sasl_passwd # entfernen
become: true
ansible.builtin.file:
path: /etc/postfix/sasl_passwd
state: absent
- name: kopiere sender_canonical # entfernen
become: true
ansible.builtin.file:
path: /etc/postfix/sasl_passwd
state: absent
- name: Template postfix configuration
become: true
ansible.builtin.template:
src: main.cf
dest: /etc/postfix/main.cf
owner: root
group: root
mode: "0644"
notify:
- reload postfix
- send testmail
- name: Ensure default cron mailing is disabled
become: true
ansible.builtin.cron:
name: MAILTO
env: true
job: ""