Mercurial > masqmail
annotate admin/guess-hostname @ 276:1abc1faeb45d
for -t cmdline args are now added to the rcpt list instead of substracted
Please read the diff and the section about -t in man/masqmail.8.
Masqmail's behavior had been like the one of exim/smail, now it's
similar to postfix.
Masqmail does it now the most simple way, regarding the code.
Also, addr args are always recipients, -t does not change their meaning.
-t makes the addrs from rcpt hdrs, rcpt addrs too.
It would have been logical too, to ignore the cmdline args,
in the sense of ``headers *instead of* args'' but none of the
popular MTAs does it that way and it would have been a bit more
complicated in the code.
Anyway, this is a corner-case that should better be avoided completely.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Fri, 03 Dec 2010 21:05:34 -0300 |
parents | cab46cefa4ce |
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 |