The basic email service is a well-understood (though poorly-documented) technology, and there are numerous reliable open-source packages for doing it.
The real obstacle is the web interface -- although there are some good ones out there, I have yet to find one that doesn't have substantial issues. Those I have tried include:
- Feng Office - when last tried, did not properly support IMAP
- Group-Office - can't remember all the problems, but this page last updated in 2010 shows one or two
- Roundcube - tendency to get "stuck"; search function depends on mail server functionality which is often broken
The problems with each of these packages may have been resolved since I last used them, or it may be necessary to dig into the code to fix the issues, or maybe there is another package I haven't discovered yet that would work better. Supposedly Usermin has email capabilities...