Reinstall postfix on ubuntu with installer

I recently installed postfix but I did something wrong. And so I removed it with sudo apt-get remove postfix and removed the /etc/postfix folder.

But now I want to install it again but I don't get the installer prompts where I can choose Internet Site and other options. How can I solve this?


That's because there are still some files in place and dpkg considers the package to be configured.

There are two possible routes you can take to solve this:

  1. Now that the package is installed, purge it. Run sudo apt-get purge postfix, then re-install and the config dialog should come up.
  2. Run dpkg-reconfigure postfix