Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Let's assume I know nothing about mailservers or Linux/Ubuntu.

I want to set up a mail server that will easily allow me to add emails with different domains and connect with various email clients via pop/imap.

What is the best way to set this up? I believe I have postfix running, but that's as much as I know. :/ I'm a noob at this. :)

share|improve this question

closed as too broad by masegaloeh, Sven Jan 17 '15 at 9:35

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

Postfix will allow you to deliver emails to different domains, and to send emails. You should install something like Dovecot or Courier to handle the pop/IMAP.

Read the Ubuntu documentation for postfix here. Important things to pay attention to are the type of inbox (maildir vs mbox) and your authentication (Dovecot SASL vs Cyrus SASL; flat file vs sql db).

You'll want to use the Postfix virtual mailbox delivery agent to deliver mail from separate domains to non-system accounts. Here is an example configuration to add to your file (/etc/postfix/ for the domain "":

virtual_mailbox_domains = ...more domains...
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = hash:/etc/postfix/virtual

In the third line there's virtual_mailbox_maps =. This is the file that holds the mapping between the email address and where the email is stored. You'll need to add the following to your vmailbox file (/etc/postfix/vmailbox):
# Comment out the entry below to implement a catch-all.
...virtual mailboxes for more domains...

In the seventh line of there's a line with virtual_alias_maps = that maps the alias names you might use. Add the following to your virtual file (/etc/postfix/virtual): postmaster

share|improve this answer
I'm having a hard time understanding how to add emails and such. – Kevin Brown Jun 14 '11 at 19:55
There's a lot to learn in running your own email server. You should read the documentation and then come back and ask your specific questions. I don't use a GUI for postfix, so I don't know how much use I can be there. I've edited my answer to provide an example of virtual mailboxes so that you don't have to map each email address to a system user. That should help guide you. – Chris Ting Jun 14 '11 at 20:16
Would it be a good idea to use a GUI and if so what are some good ones? (Helpful edit) – Kevin Brown Jun 14 '11 at 20:19
A GUI would be helpful to teach you most of what goes into a Postfix setup. At some point, you'll learn to do this through the configuration files for maximum control. Go here for a list of useful GUI tools: – Chris Ting Jun 14 '11 at 20:26

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