File: helo-hostname-long.patch

package info (click to toggle)
libmail-sendmail-perl 0.80-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 252 kB
  • ctags: 33
  • sloc: perl: 467; makefile: 3
file content (33 lines) | stat: -rw-r--r-- 1,073 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Author: gregor herrmann <gregoa@debian.org>
Bug: #482339
Description: use Sys::Hostname::Long in order to get FQDN for HELO

--- a/lib/Mail/Sendmail.pm
+++ b/lib/Mail/Sendmail.pm
@@ -53,6 +53,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);
 
@@ -339,7 +340,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,
@@ -1024,6 +1025,9 @@
 Last revision: 06.02.2003. Latest version should be available on
 CPAN: F<http://www.cpan.org/modules/by-authors/id/M/MI/MIVKOVIC/>.
 
+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)