Hello,

here is an old patch laying in the debian package. It is maybe a bit
debian specific, but it shouldn't cause any arm to other systems, and
I'd really like to reduce the divergences between debian's version and
common one.

Thanks for reviewing and integrating.
Mt.

-- 
Le sens commun n'est pas si commun (Common sense is not so common).
  -- Voltaire
Let /etc/mailname override the hostname in the mail command

Closes bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=356348

Initial patch author said (in above bug report):
 When generating the default From: for outbound messages quilt uses
 $(hostname -f) to determine the domain part of the e-mail address.
 Policy 11.6 specifies that this should be overridden by the value
 specified in /etc/mailname.

 (see 
http://www.debian.org/doc/debian-policy/ch-customized-programs.html#s-mail-transport-agents)

Upstream status: 
 * Submitted 060427, never answered.
 * Resubmitted 110915

---
 quilt/mail.in |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Index: b/quilt/mail.in
===================================================================
--- a/quilt/mail.in
+++ b/quilt/mail.in
@@ -263,7 +263,17 @@
 
 if [ -z "$opt_sender" ]
 then
-       hostname=$(hostname -f 2>/dev/null)
+       hostname=nowhere
+       if [ -e /etc/mailname ] ; 
+       then
+               hostname=`cat /etc/mailname`
+       fi
+       
+       if [ "$hostname" = "${hostname/.}" ]
+       then
+               hostname=$(hostname -f 2>/dev/null)
+       fi
+       
        if [ "$hostname" = "${hostname/.}" ]
        then
                hostname=$(hostname)
_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to