Ispconfig, using its step by step Perfect Server guide, let you setup a self managed server, suitable to manage mail accounts.
It uses dovecot, postfix, roundcube, spamassassin, mailman and other first class libre software.
You need pay for a server, in this case, a cloud vps from Iwstack, for 2€/month. You can avoid this cost using your web server to manage your mail too.