Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I want to setup a Debian box to handle all email for my domain. I can point my mx record to the box but... what software do I need on there.. I've seen Postfix and Courie.. are these okay for what I need?

I only have one address at the moment but will need something scalable to maybe handle a couple more domains and up to 20 users.

I've been doing some research and I can only find tuts on ISP style mailservers capable of handling thousands of domains. I'm not asking for details but a push in the right direction would be nice.


share|improve this question
up vote 3 down vote accepted

You need an MTA. Debian defaults to exim. Postfix is another popular choice, and installing it on Debian is just a matter of apt-get install postfix; you'll find more tutorials for it than for exim. Either is perfectly suitable for your needs — a couple of domains and 20 users is very small fry. Unless you have some other very specialized requirement, make your choice based on ease of setup or just plain it's-there-already.

share|improve this answer
Thanks so if a mailserver sends an email to postfix does postfix store the mail in the file system and then I use an IMAP agent like dovecot to connect to an email client? – squarebear Apr 14 '11 at 21:23
@Steve: Yes, that's what most people do (with IMAP some other protocol like POP or Exchange, unless they're using a webmail). On a unix system, you can also read point a client directly at the local mailbox file, with no IMAP or the like. – Gilles Apr 14 '11 at 21:26
Thanks giles thats made everything a lot clearer for me. Ill look into the individual packages now. – squarebear Apr 14 '11 at 21:29

Sendmail, Postfix, Courier, and Exim can all do it, but they do, by default, assume a single domain that the computer represents. I would not recommend Sendmail to a newbie, but Postfix and Exim should be do-able. Their default configuration will give all unix accounts on your server an email based on the account username. 20 users is no problem at all. Note that most of these are MTAs only which means they will accept and store mail locally for domains they control, but do not provide a way for users to retrieve the mail off of the server. Unless you plan to have all users log on to the server to retrieve their mail, you will also need a POP3 or IMAP server. Dovecot is what I recommend for that. It works in conjunction with an MTA like Postfix. Users send mail to others through the MTA and retrieve mail through POP3 or IMAP. The main difference between POP3 and IMAP is with IMAP, mail is still kept on the server in addition to locally on a users email program, and IMAP also stores other folders on the server as well. This allows a user to switch mail programs and still have all their mail and folders with IMAP. It also facilitates for a sysadmin to backup all the email for a domain on the server. With POP3, mail is retrieved from an Inbox and deleted off of the server.

share|improve this answer
Thanks for the info, I know I could look this up and I will be reading the man page for them but just to get my head straight, If I set the MX record to point to my postfix server and say I have a unix account called steve and the hostname of that box is mydomain.co.uk, and someone sends an email to bob@mydomain.co.uk does the POSTFIX bounce it as there's no unix account called bob on the server? – squarebear Apr 15 '11 at 7:45
Hi just got postfix setup and i can read the mail in /var/mail/$user thanks v.much – squarebear Apr 15 '11 at 8:30
@steve If it does not match either a UNIX account or an alias by default, it will register as a permanent delivery error and bounce the email. Postfix can be set up with an alternate user database and use virtual hosting, but for smaller setups, it can be easier to just create aliases that point to the UNIX account. webmaster can be an alias that directs all mail to steve's account. – penguin359 Apr 19 '11 at 9:20

Personally, I've found that Citadel was the easiest to set up. Some of these MTA are pretty troublesome to configure for someone who may be new to it. Citadel also comes with far more functionality than just an MTA - webmail, mailing lists, jabber, etc.

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.