How to set up a mail server correctly?

Open a terminal and run:

sudo tasksel install mail-server

That will give you a fully functional mail server with sane defaults.

For more information on how to set up a more customized solution, refer to the following resources:

  • Ubuntu Server Guide on E-Mail Services
  • Setting up an Ubuntu System as an Email Server