masqmail
changeset 160:60c92aa59911
added a script to guess the host's name
author | meillo@marmaro.de |
---|---|
date | Thu, 08 Jul 2010 11:27:03 +0200 |
parents | 27363b36a28c |
children | 6dd3a289989b |
files | contrib/guess-hostname |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/contrib/guess-hostname Thu Jul 08 11:27:03 2010 +0200 1.3 @@ -0,0 +1,22 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# try several ways to guess the hostname 1.7 + 1.8 +( 1.9 + 1.10 +# this is what Debian uses 1.11 +cat /etc/mailname 1.12 + 1.13 +# this is often the short hostname 1.14 +cat /etc/hostname 1.15 + 1.16 +# this file was mentioned on the Internet 1.17 +cat /etc/HOSTNAME 1.18 + 1.19 +# probably a good value on GNU/Linux 1.20 +hostname -f 1.21 + 1.22 +# often the short hostname, but widely available 1.23 +hostname 1.24 + 1.25 +) 2>/dev/null | sort -u