package nsd3
tag patch
thanks

Hi,

I would prefer if packages that provide (authoritive?) DNS make sure that there
is a hostmaster alias in /etc/aliases to conform to RFC 2142. Attached is a
(not thoroughly tested) patch for nsd3 that adds the hostmaster alias in
postinst if it does not exist.

Silencing this cronjob and removing the MAILTO would also be fine by me.

Documenting the alias but shipping a 'broken' config seems like the
worst alternative.

Regards,
-- 
Jeroen Schot
>From b450d31e93c4058ec740328065c5a123d6171986 Mon Sep 17 00:00:00 2001
From: Jeroen Schot <[email protected]>
Date: Wed, 1 Jun 2011 18:59:21 +0200
Subject: [PATCH] Add hostmaster alias to /etc/aliases (Closes: #625810)

---
 debian/postinst |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index 19e1150..80ecb6a 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -15,6 +15,13 @@ if test "$1" = "configure"; then
     set_perms nsd nsd 0755 /var/lib/nsd3
     set_perms nsd nsd 0640 /etc/nsd3/nsd.conf
     set_perms nsd nsd 0750 /etc/nsd3
+
+    if ! grep -q '^hostmaster: ' /etc/aliases; then
+        echo hostmaster: root >> /etc/aliases
+        if [ -x "`which newaliases`" ]; then
+            newaliases >/dev/null
+        fi
+    fi
 fi
 
 #DEBHELPER#
-- 
1.7.5.3

Reply via email to