From 5c4135af7d147d2333e0fa30388ea0a9d362b369 Mon Sep 17 00:00:00 2001 From: Dmitry Ilvokhin Date: Sun, 7 Apr 2024 13:00:46 +0100 Subject: Setup correct alias for root mail --- roles/postfix/tasks/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'roles/postfix/tasks') diff --git a/roles/postfix/tasks/main.yml b/roles/postfix/tasks/main.yml index 63a760d..4856225 100644 --- a/roles/postfix/tasks/main.yml +++ b/roles/postfix/tasks/main.yml @@ -5,6 +5,20 @@ - postfix-pcre state: present +- name: Setup correct alias for root mail + ansible.builtin.lineinfile: + dest: /etc/postfix/aliases + state: present + # YAML requires escape string to be encoded in double quotes. + regexp: "^(#)?root:\t\t(you|d)" + line: "root:\t\td" + owner: root + group: root + mode: u+rw,g+r,o+r + notify: + - Update aliases + - Reload postfix + - name: Copy postfix lookup tables ansible.builtin.copy: src: '{{ item }}' -- cgit v1.2.3-70-g09d2