From 3e3db3bad816bf7ac288d781b4954699f1bf0709 Mon Sep 17 00:00:00 2001
From: David Mehren <dmehren1@gmail.com>
Date: Tue, 30 Jul 2019 10:42:14 +0200
Subject: [PATCH] Use /etc/aliases to work with the default AppArmor profile

---
 tasks/main.yml       | 2 +-
 templates/aliases.j2 | 2 ++
 templates/msmtprc.j2 | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tasks/main.yml b/tasks/main.yml
index 66dfcc9..02b4a52 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -12,4 +12,4 @@
 - name: Copy aliases file
   template:
     src: aliases.j2
-    dest: /etc/msmtp_aliases
+    dest: /etc/aliases
diff --git a/templates/aliases.j2 b/templates/aliases.j2
index 3868299..5317a5e 100644
--- a/templates/aliases.j2
+++ b/templates/aliases.j2
@@ -1,3 +1,5 @@
 root: {{ msmtp_relay_root_email }}
 postmaster: {{ msmtp_relay_root_email }}
 webmaster: {{ msmtp_relay_root_email }}
+nobody: {{ msmtp_relay_root_email }}
+www: {{ msmtp_relay_root_email }}
diff --git a/templates/msmtprc.j2 b/templates/msmtprc.j2
index 3ec7cb0..e205a49 100644
--- a/templates/msmtprc.j2
+++ b/templates/msmtprc.j2
@@ -7,4 +7,4 @@ account default
 from {{ msmtp_from }}
 {% endif %}
 host {{ msmtp_relay_relayhost }}
-aliases /etc/msmtp_aliases
+aliases /etc/aliases
-- 
GitLab