aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mail/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/mail/tasks/main.yml')
-rw-r--r--roles/mail/tasks/main.yml7
1 files changed, 7 insertions, 0 deletions
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