File: empty-domain.patch

package info (click to toggle)
killer 0.90-15
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 764 kB
  • sloc: perl: 8,785; makefile: 35; sh: 1
file content (20 lines) | stat: -rw-r--r-- 711 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Use 'localhost' as domain if it is currently unset.
 Use /etc/mailname or DNS domain and not NIS domain when figuring out
 what to use after @ in email addresses.
 See also bugs #656297 and #673371.

--- killer-git.orig/killer	2014-09-28 09:00:26.591859878 +0200
+++ killer-git/killer	2014-09-28 09:00:39.171964143 +0200
@@ -1042,8 +1042,11 @@
 # Configuration options:
 # ########
 
-my $domainname = `domainname`;
+# Prefer mailname, use dnsdomainname if it was unset, and fall back to localhost
+# if both are blank.
+my $domainname = `cat /etc/mailname 2>/dev/null || dnsdomainname 2>/dev/null || true`;
 chop $domainname;
+$domainname = "localhost" unless ($domainname);
 
 =item $forkadmin