Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm on Debian 5 and I want to set up an email server for POP3, IMAP and SMTP. I heard that there are several solutions for this out there, including Cyrus.

What email server (that ideally supports those three protocols) would you recommend?

Also, I would like to automate creating accounts for clients from PHP. If you know how to do that you may also throw in some advice.

share|improve this question

8 Answers 8

You'll need multiple applications, I would suggest Postfix (the for mail transport) and Dovecot (for IMAP). You may want virtual domains and users, in which case you can use something like mysql or openldap. We went the LDAP route, but there's less help out there than there is for mysql.

To be honest, setting up mail servers is non-trivial, you may be best off visiting http://www.howtoforge.org/howtos/linux/debian and finding a howto that you think looks good for your needs.

Someone recently recommended zimbra.com and obm.org, but I have no experience of those, and I would imagine they sit in front of an already working mailserver.

share|improve this answer

iRedMail is an option for an all-in-one single configuration script.

share|improve this answer

Regarding choices of software, I run postfix for SMTP and courier for IMAP/POP3 and I'm happy with them but I think the other softwares (Exim, qmail, Dovecot) are good too. If Exim is default on Debian, maybe a good option. Cyrus was an option I considered but appeared too complicated and not very different from Courier so I ended with Courier.

Regarding users and automation, I think using virtual Domains and Users is the best way (a little more complicated to install but a lot easier to use) as you add new domains, users or mail forwarding adding a single record (username, password, quota for new users and for Domains or e-mail forwarding it's even simpler) in your database (I use mysql for this part) so you can easily add them from php or from where you need to.

share|improve this answer

Qmail is pretty easy to install and administer. My only experience has been with qmail and sendmail and given the choice qmail is much simpler.

share|improve this answer

May end up being argumentative or subjective, but qmail is known for security, and postfix is made for simplicity. Postfix is a drop-in replacement for sendmail too.

share|improve this answer

None of your basic MTAs will support POP3 or IMAP. Classic MTAs all only support SMTP. However, add-ons are available for these protocols. Under Debian I would always recommend exim. It is the default MTA, has good support for virus scanning (with Clam AV), spam filtering (spamassassin) and greylisting. This will by default deliver either to a smarthost or to local mailboxes.

You can then install solutions for POP3 (I recommend qpopper, but there are many alternatives, e.g. teapop3) and IMAP (I recommend courier-imap). You could also use an entire suite based on courier.

In terms of automating account setup via PHP, have a look at vexim. That's a package that provides a simple-to-use web interface for exim administration.

Now here's my final word: if you are doing this to learn about various MTAs and related aspects, then go ahead and do it. If you are doing this for a few users and a real mail solution, I would much rather recommend you go and get yourself some accounts with a commercial mail provider. I have heard very good stuff about gmail, but they are not the only ones. Administration of a live mail server is not something you do once and then go away. It is a day-to-day job, requires lots of knowledge and dedication, and if you get one small bit wrong, the hackers will be all over you.

share|improve this answer

You will need two servers, one for SMTP and one for IMAP/POP. I would recommend Dovecot as an IMAP server because it is much easier to run than cyrus, and then use Postfix for SMTP because you can easily integrate their auth scheme and doesn't need Cyrus SASL anymore, which is difficult to configure and lousily documented.

share|improve this answer

Since this one hasn't been mentioned yet, I thought I'd toss my 2 cents. I personally prefer Exim as it's very easy to setup and very extensible. I can get Exim to do almost anything I want in regards to SMTP. For IMAP(S)/POP(S), I too would recommend Dovecot - fast, efficient and simple.

share|improve this answer

Your Answer

 
discard

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.