From ac5e5c3aeddc209479ec5041e779ae260b7c8ccd Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 3 Dec 2018 20:09:45 +0100
Subject: [PATCH] Fix mailutils mail domain default.

---
 all_new_2018/linkable_etc_files/mail/etc/mailutils.conf | 4 ++++
 all_new_2018/setup_mail.sh                              | 1 +
 2 files changed, 5 insertions(+)
 create mode 100644 all_new_2018/linkable_etc_files/mail/etc/mailutils.conf

diff --git a/all_new_2018/linkable_etc_files/mail/etc/mailutils.conf b/all_new_2018/linkable_etc_files/mail/etc/mailutils.conf
new file mode 100644
index 0000000..44efe26
--- /dev/null
+++ b/all_new_2018/linkable_etc_files/mail/etc/mailutils.conf
@@ -0,0 +1,4 @@
+# mailutils by default uses the FQDN as the mail domain name, fix this
+address {
+  email-domain REPLACE_maildomain_ECALPER;
+};
diff --git a/all_new_2018/setup_mail.sh b/all_new_2018/setup_mail.sh
index 18d7c31..60eda31 100755
--- a/all_new_2018/setup_mail.sh
+++ b/all_new_2018/setup_mail.sh
@@ -31,6 +31,7 @@ fi
 
 # Link and adapt mail-server-specific /etc/ files.
 ./hardlink_etc.sh mail
+sed -i "s/REPLACE_maildomain_ECALPER/${mail_domain}/g" /etc/mailutils.conf
 sed -i "s/REPLACE_Domain_ECALPER/${mail_domain}/g" /etc/opendkim.conf
 sed -i "s/REPLACE_Selector_ECALPER/${dkim_selector}/g" /etc/opendkim.conf
 sed -i "s/REPLACE_myhostname_ECALPER/$(hostname -f)/g" /etc/postfix/main.cf
-- 
2.30.2