Is there any easy to install open source gratis MS-Exchange e-mail server replacement ?

It needs to be scalable, have IPV4+IPV6 support, include an SMTP server (including TLS), and a POP3/IMAP (IMAP 4 - push-IMAP) server, with LDAP/ActiveDirectory support, as well as a good spam and anti-virus filter, like ClamAV and SpamAssassin, and of course have no text-encoding problems (such as unicode support).

It also needs a Web-Interface, but WITHOUT using PHP (or anything that's worse when it comes to security than PHP, e.g. Apache).

It should run on Linux (and possibly Windows, too), store EVERYTHING (no external files except anything in /tmp such as for virus-scanning) in a relational database (e.g. PostgreSQL) and add as few external dependencies as possible.

It should also be scalable to a few hundred users at the very least.

Things I have investigated that don't cut it:

  • Apache James (no webmail, IMAP search too slow)
  • Dovecot (no integrated SMTP)
  • Courier (good, but no database)
  • Citadel (epic installation fail)
  • Zimbra (very far from gratis)
  • open-xchange (not gratis, not open source)
  • I'm guessing you're long past caring about this question but if you see this, can you come back and let us know what you went with? Commented Mar 13, 2020 at 20:34

3 Answers 3


I don't think you understand how some of the packages you investigated work...

postfix is pure SMTP. When it receives messages, it passes off to a mail delivery agent like dovecot. A MDA is pure IMAP/POP3, not SMTP.

You can use postfix and dovecot together in many different configurations for having virtual users (no linux account needed), storing users, email addresses, transport mappings, etc. in several different database types. You can integrate both virus and spam scanning on both incoming and outgoing messages, and integrating SSL/TLS is trivial.

As for storing actual mail messages in a database, I wouldn't recommend that at all. Good article on why not - http://www.memoryhole.net/~kyle/databaseemail.html

So... as a Linux admin... who teaches tech students Linux admin skills... I strongly recommend you reinvestigate using postfix+dovecot and a db back end (mariadb/mysql or postgres) for users/transports/etc and regular file storage in maildir format for the actual messages.

The last part of your requirements - a non-PHP F/OSS webmail client - I'm stuck on.... but then, it is easy to write crap code in other languages than PHP, so I'm not sure on your hate for it. I like Roundcube.


Although I'm aware that some of these softwares won't meet all your requirements ...

Have a look at SOGo https://sogo.nu I have not tested it and it may not fullfill all your needs but I read good things about it.

Your original post doesn't mention if your mail client must be Outlook or can be other.

I suggest you looking at this article (in French) as well as to the comments as the can help you understanding the pro and cons of the miscellaneous solutions. Not all are free. https://philippe.scoffoni.net/7-solutions-open-source-pour-remplacer-exchange/

I'm surprised that for hundred of mail accounts you don't have one penny to spend. Else, I would also suggest looking at the http://www.zentyal.org/ small business server.


There's a list of options here: https://en.wikipedia.org/wiki/Comparison_of_mail_servers

I had similar requirements for an exchange replacement that have led me down a similar search:

  • Must be free (as in beer)
  • Must have LDAP/AD support
  • Must have webmail
  • Must work with Windows Server or CentOS (no Ubuntu)
  • Must be reasonably secure
  • Must be up soonish

As a result:

  • Mailcow is out, no LDAP support now or 'ever'
  • Citadel is out, has silly BBS features and low security
  • iRedMail is out, written by Chinese developers. You can argue this one but I don't get a say, it's an upstream no.
  • poste.io is out, no LDAP
  • Mailu is out, no LDAP
  • SOGo is sorta out, the ZEG is Ubuntu based, and I was told not to spend the time on spinning up dovecot/postfix/etc on my own.

That left me with:

  • Mail-in-a-box, only Ubuntu and no Docker support (https://github.com/mail-in-a-box/mailinabox/issues/1740)
  • Sovereign, we don't need all the extra crap that this comes with
  • OpenChange, hasn't been updated in years, became Zentayal
  • Zentayal, Haven't looked into it yet. Wikipedia page looks good but their own is not loading for me
  • OpenXchange, looks too commercial
  • Zimbra, looks too commercial, probably not free
  • Kolab, no Active Directory support
  • Modoboa. I got stuck on an issue with getting the PostgreSQL DB instance registered. (https://gitlab.com/ntninja/docker-recipies/-/issues/3)

Where I went

  • Homegrown solution using postfix/dovecot/roundcube/dbmail

I'm not liking this route as setting up postfix and LDAP support hasn't gone well so far but it's where I am.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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