Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When i install show (sudo apt-get install nmh). It fails with the following error :

The hostname -f command returned: $1

Your system needs to have a fully qualified domain name (fqdn) in
order to install the var-qmail packages.

but if i do : hostname -f, it returns :


Why does my install fails ?

share|improve this question
up vote 1 down vote accepted

Because that is not an FQDN. You would need something like, you can set by making /etc/hostname contain ubuntu-sylario and /etc/hosts to have (on the line containing either or if you use Debian/ubuntu and make sure it has FQDN followed by hostname, i.e: ubuntu-sylario. On next reboot check with hostname and hostname -f which should report ubuntu-sylario and respectively

share|improve this answer

Do the following, one line at a time:

sudo apt-get purge qmail qmail-run tripwire mailutils
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get dist-upgrade
share|improve this answer

The real answer is that the installer is demanding something that isn't needed by qmail, or indeed by smtp. But, the alternative, if you don't want to buy or fake an fqdn (you could tell it you were if you wanted) is either to install from source (eg using life with qmail) or use something like qmail-rocks. The problem you'll then get is that when you distribution upgrade your system it's likely to break your qmail installation. So, pressurise the BOFH wannabe package maintainer to take out this silly requirement. And while they're at it, they could offer something useful in the kind of way exim installation does, such as asking if you want to use a smarthost (you probably do if you're installing on a machine without an fqdn, and you need to specify it in qmail's control file smtproutes).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.