Mercurial > masqmail
annotate contrib/guess-hostname @ 222:8cddc65765bd
added support for STARTTLS wrappers
added the route config option `instant_helo' which
causes masqmail, as SMTP client, not to wait for the
server's 220 greeting. Instead if says EHLO right at
once. You'll need this for STARTTLS wrappers that
usually eat the greeting line.
author | meillo@marmaro.de |
---|---|
date | Fri, 23 Jul 2010 10:57:53 +0200 |
parents | 92b58989a09e |
children |
rev | line source |
---|---|
160 | 1 #!/bin/sh |
2 # | |
3 # try several ways to guess the hostname | |
162
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
4 # earlier output lines are probably better |
160 | 5 |
6 ( | |
7 | |
8 # this is what Debian uses | |
9 cat /etc/mailname | |
10 | |
162
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
11 # probably a good value on GNU/Linux |
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
12 hostname -f |
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
13 |
160 | 14 # this is often the short hostname |
15 cat /etc/hostname | |
16 | |
162
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
17 # often the short hostname, but widely available |
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
18 hostname |
71dcdc2020bc
guess-hostname: ordered guesses by quality
meillo@marmaro.de
parents:
160
diff
changeset
|
19 |
160 | 20 # this file was mentioned on the Internet |
21 cat /etc/HOSTNAME | |
22 | |
218 | 23 ) 2>/dev/null | uniq |
24 | |
25 exit 0 |