From 1614b15bd4fd8faa60a54f7d0d4a917c332734f5 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 5 Mar 2018 19:12:02 +0800 Subject: mail/aliases: forward root's mails --- roles/mail/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/mail/tasks') diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index dbd1525..8bf6ff3 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -74,6 +74,13 @@ - name: opendkim - enable and start command: rcenable milter-opendkim +- name: aliases - forward root mails + lineinfile: + path: /etc/mail/aliases + line: "root: root@{{ mail.domains[0] }}" + insertafter: '#?\s*root:' + notify: update-aliases + - name: postfix - set as mailer/MTA file: path: /etc/mail/mailer.conf -- cgit v1.2.2