masqmail

view contrib/guess-hostname @ 161:6dd3a289989b

listen per default on localhost:25 now this is a typical setup for the security POV it might be better to not listen on any interface by default, but listening on local interfaces seems to not be a problem
author meillo@marmaro.de
date Thu, 08 Jul 2010 11:53:07 +0200
parents
children 71dcdc2020bc
line source
1 #!/bin/sh
2 #
3 # try several ways to guess the hostname
5 (
7 # this is what Debian uses
8 cat /etc/mailname
10 # this is often the short hostname
11 cat /etc/hostname
13 # this file was mentioned on the Internet
14 cat /etc/HOSTNAME
16 # probably a good value on GNU/Linux
17 hostname -f
19 # often the short hostname, but widely available
20 hostname
22 ) 2>/dev/null | sort -u