summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quilt/mail.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/quilt/mail.in b/quilt/mail.in
index d16b3c1..b9b73b1 100644
--- a/quilt/mail.in
+++ b/quilt/mail.in
@@ -267,7 +267,13 @@ fi
if [ -z "$opt_sender" ]
then
- hostname=$(hostname -f 2>/dev/null)
+ if [ -e /etc/mailname ]
+ then
+ hostname=$(< /etc/mailname)
+ else
+ hostname=$(hostname -f 2>/dev/null)
+ fi
+
if [ "$hostname" = "${hostname/.}" ]
then
hostname=$(hostname)