DBMAIL integration

ByteBeam

New member
Joined
Sep 15, 2012
Messages
3
Has anyone ever attempted to integrate DBMAIL as email server backend into directadmin (using directadmin's dovecot as proxy) ?

For sites set up as email servers only, maybe this could be a nice way to add scalability and clustering.
 
Hello,

Not me. Just a question why do you want it to have on Directadmin powered server? And why do you want to keep dovecot as proxy at the same time?

For anyone who might want to read anything of the DBMAIL here are some links
http://www.dbmail.org/
http://www.dbma.ca/
http://en.wikipedia.org/wiki/DBMail_IMAP_and_POP3_server

Because I can't consider using Directadmin for any production site without implementing HA, and while email is a kind of service any reasonable client would expect to be available at all times, I believe it's one of the services most difficult to replicate in real time if the related data is stored directly as a multitude of files, many of them related to a specific state as email entity (read or unread flags, etc...)

While DRBD is very helpful for creating mirroring, my thoughts were that if at least the email side of Directadmin could be redirected to a database system like the one provided by DBMAIL, email could then enjoy clustering.

About continuing to use Directadmin's Dovecot as email front end, the hint came from reading this document:

http://freesoftware.zona-m.net/dbmail-a-great-open-source-email-system-especially-for-lampmysql-administrators/

And more specifically this excerpt:

Why you may want to use Dbmail

Harald: I chose Dbmail because it has a 100% Mysql-backend configuration and the possibility to have a synchronized backup-slave in the network, which you can stop everytime to make consistent snapshots for offsite backups without interrupting the mail server. We are using Dovecot as proxy in front of Dbmail for several reasons:

it supports more auth mechanisms than dbmail
it supports TLS/SSL directly
it supports replaces (% to @) since historically many users are configured with %
postfix supports dovecot directly for SASL-Auth, so you have the same auth-mechs and encryption options for pop3, Imap and smtp
security: I think it would be hard to exploit Dbmail through Dovecot (whereas exploiting directly dovecot seems harder, since it has only the user-logins)
 
I see. I've never used dovecot as a proxy server and for now I have no idea how to configure it as a proxy. Probably I could somehow help you here or privately if you need and want of course. I personally do not need anything of this kind, but I could participate in it for getting new experience.
 
Many of our clients have high demands on availability and we too looked into DRBD and similar technologies for achieving a clustered mail system.. and eventually decided, after MUCH research, on dbmail. This, coupled with a inotify+lsyncd instant file replication of our users' /home folders to standby servers in another datacenter, a global DNS cluster with monitoring and instant failover (or as instant as DNS allows it, that is) and an external MySQL cluster with slaves in multiple DC's, we're building a pretty nifty and high quality HA offering, for peanuts compared to many competitors. Lots of fun :)

We have built a custom mail cluster based on dbmail/postfix/dovecot/saslauthd/spamd. A total of 6+1 servers (6 actives, 1 standby), all with active IP-failover. At the cluster level, we built a custom REST API to communicate with DA. On the DA servers, we have custom _post.sh scripts communicating with the cluster. It all works beautifully in testing, though we've yet to migrate any production servers onto it.

All in all, we're very pleased with the performance increases (especially IMAP speeds for large mailboxes) as well as the high availability setup. Plus having all of our mail in a MySQL cluster gives us the ability to build some really cool features in the year ahead. We've already begun sketching on extending our REST API to allow our users to manipulate their mailboxes with it, which I know many will love for scripting and archiving purposes. We also use imapproxy on our dedicated webmail servers, making the webmail experience incredibly fast and responsive for our users.

I will say this however: It's a somewhat complicated setup if you're not an experienced sysadmin and don't have experience building HA setups. Making it all play together on a stable level will take some effort. If you have questions, I'll try to answer them here when I can. Good luck if you do try to build it.. and expect it to take a lot more time than you plan for!
 
Back
Top