From efc8f04bb15fe4de2cd94e188423bf94dd0ab0a9 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Tue, 30 Jul 2024 20:10:35 +0200 Subject: [PATCH] neomutt: configure neomutt folder used by postfix --- ansible/roles/neomutt/tasks/main.yml | 23 +++++++++++++++++++++++ ansible/roles/postfix/meta/main.yml | 4 ++++ ansible/roles/postfix/tasks/main.yml | 4 +--- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 ansible/roles/neomutt/tasks/main.yml create mode 100644 ansible/roles/postfix/meta/main.yml diff --git a/ansible/roles/neomutt/tasks/main.yml b/ansible/roles/neomutt/tasks/main.yml new file mode 100644 index 00000000..855d17cf --- /dev/null +++ b/ansible/roles/neomutt/tasks/main.yml @@ -0,0 +1,23 @@ +--- +- name: Install neomutt + package: + name: neomutt + state: present + tags: + - role::neomutt + +- name: Configure neomutt folder to standard destination + copy: + content: | + # Ansible managed + + # neomutt will user ~/Mail by default, whilst our postfix installation + # will deliver mail to /var/mail/$USER instead. neomutt will also figure that out, + # but not without prompting whether to create ~/Mail on every startup first. + set folder = /var/mail/$USER + owner: root + group: root + mode: "0o444" + dest: /etc/neomuttrc.d/pydis.rc + tags: + - role::neomutt diff --git a/ansible/roles/postfix/meta/main.yml b/ansible/roles/postfix/meta/main.yml new file mode 100644 index 00000000..addf15d3 --- /dev/null +++ b/ansible/roles/postfix/meta/main.yml @@ -0,0 +1,4 @@ +--- +dependencies: + # Mail client + - neomutt diff --git a/ansible/roles/postfix/tasks/main.yml b/ansible/roles/postfix/tasks/main.yml index 33409892..b8f3a352 100644 --- a/ansible/roles/postfix/tasks/main.yml +++ b/ansible/roles/postfix/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: Install postfix & mail client +- name: Install postfix & tools package: name: # Postfix & routing plugins @@ -9,8 +9,6 @@ - postsrsd # Security and anti-spam tools - postfix-policyd-spf-python - # Mail clients - - neomutt state: present tags: - role::postfix