Author: gregor herrmann <gregoa@debian.org>
Bug: #482339
Description: use Sys::Hostname::Long in order to get FQDN for HELO
Index: libmail-sendmail-perl/Sendmail.pm
===================================================================
--- libmail-sendmail-perl.orig/Sendmail.pm	2008-08-26 15:55:08.000000000 -0500
+++ libmail-sendmail-perl/Sendmail.pm	2008-08-26 16:12:58.000000000 -0500
@@ -54,6 +54,7 @@
 use Socket;
 use Time::Local; # for automatic time zone detection
 use Sys::Hostname; # for use of hostname in HELO
+use Sys::Hostname::Long; # for use of hostname in HELO
 
 #use Digest::HMAC_MD5 qw(hmac_md5 hmac_md5_hex);
 
@@ -337,7 +338,7 @@
     }
 
     # get local hostname for polite HELO
-    $localhost = hostname() || 'localhost';
+    $localhost = hostname_long() || hostname() || 'localhost';
 
     foreach $server ( @{$mailcfg{'smtp'}} ) {
         # open socket needs to be inside this foreach loop on Linux,
@@ -999,6 +1000,9 @@
 because you installed through PPM, you can also find the latest
 one on F<http://alma.ch/perl/scripts/Sendmail/Changes>.
 
+On Debian systems Sys::Hostname::Long is tried before Sys::Hostname in order
+get a fully qualified domain name.
+
 =head1 AUTHOR
 
 Milivoj Ivkovic <mi\x40alma.ch> ("\x40" is "@" of course)
