NeoMutt uses two forms of the hostname:
The Hostname, e.g. 'laptop.example.com', is only referenced by mutt_fqdn()
, which is used to:
- expanding aliases
- determine if an address is you
- match encryption keys
- expand outgoing email addresses
The ShortHostname, e.g. 'laptop', is used to:
- generate the Message-ID header
- generate some unique temporary filenames
- fallback if the FQDN is missing
To find the hostname the code checks multiple sources in order.
Note: There's no default in init.h
-
Config file
- /etc/neomuttrc
- ~/.neomuttrc
-
Command line
neomutt -e "set hostname=laptop.example.com"
-
uname(2)
- set the ShortHostname (e.g. 'laptop')
-
First match of:
-
configured DOMAIN
configure --with-domain=example.com
-
file
/etc/mailname
/etc/mail/mailname
-
dns
gethostname()
-- For a hostnamegetaddrinfo()
orgetaddrinfo_a()
-- For a FQDN
-