Re: [Skunkworks] Postfix maildir.

On Postfix setup thread. First of all, there is no such thing as storing mail in a database -mysql or otherwise. The only stuff that would go into the database would be user credentials. Secondly for performance use the "maildir" format, which supports indexing and hence scales well with speed of retrieving mail, indexing the mailboxes, etc. The alternative "mbox" format stores all mail in a single file, and this does not scale well. Enjoy! --- On Wed, 5/27/09, Steve Muchai <smuchai@gmail.com> wrote: From: Steve Muchai <smuchai@gmail.com> Subject: Re: [Skunkworks] Postfix maildir. To: "Skunkworks forum" <skunkworks@lists.my.co.ke> Date: Wednesday, May 27, 2009, 5:41 AM On Wed, May 27, 2009 at 3:04 PM, David Ndambuki <damundx@gmail.com> wrote: [.......]
And yes, I would like to store the e-mails in a mysql database instead of a home directory (maildir format).
What's the motivation behind this? I remember seeing some posts on exim-users or similar list some time back, arguing the merits and demerits of storing the actual email content in a database. I can't remember any of the arguments for/against this, however. IMHO, storing user info in a database is as far as I'd go (actually, have done) and leave the mail on the good old filesystem, but it would be great to know of any compelling reasons to go the whole 9 yards. I'm not saying you're doing the wrong or right thing, I'd just like to learn from your point of view.
I've already started on it, will get back to you soon.
Watching this thread...please keep us posted. Including any gotchas.... Regards, Steve -- "A democracy is a sheep and two wolves deciding on what to have for lunch. Freedom is a well armed sheep contesting the results of the decision." - Stolen from someone else's sig. _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Skunkworks announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science - http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi - http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general

On Wed, May 27, 2009 at 9:39 PM, Broken Maize <brokenmaize@yahoo.com> wrote:
On Postfix setup thread. First of all, there is no such thing as storing mail in a database -mysql or
Actually there is. Lots of proprietary systems store mail in databases. Even some open-source: look at http://search.cpan.org/~rjbs/Email-Store-0.255/lib/Email/Store.pm.
otherwise. The only stuff that would go into the database would be user credentials.
Agreed, IMHO only user credentials should go into the database, plus other stuff like location of mailbox, status of account (enabled/disabled/vacation etc), quota details..... which is why I asked what's the reasoning behind wanting to store the actual messages in a database.
Secondly for performance use the "maildir" format, which supports indexing and hence scales well with speed of retrieving mail, indexing the mailboxes, etc. The alternative "mbox" format stores all mail in a single file, and this does not scale well. Enjoy!
Totally agreed. Maildir works great, mbox doesn't scale well and is plagued with file locking issues. Regards, Steve -- "A democracy is a sheep and two wolves deciding on what to have for lunch. Freedom is a well armed sheep contesting the results of the decision." - Stolen from someone else's sig.

Steve Muchai wrote:
Agreed, IMHO only user credentials should go into the database, plus other stuff like location of mailbox, status of account (enabled/disabled/vacation etc), quota details..... which is why I asked what's the reasoning behind wanting to store the actual messages in a database.
Two things mainly, ease of backup and speed (on large sites) The cons on the other hand will range from high database maintenance since DB will easly grow to TB without any management.
Totally agreed. Maildir works great, mbox doesn't scale well and is plagued with file locking issues.
For such a small site (less than 1000) the cost of investing in a RAID system with high capacity disks and high rpm is far cheaper than the headache of maintaining a db system. Nowadays Raid controllers are relatively inexpensive hence worth considering. I would look at it this way - go the DB way and reduce on the quota's or go the maildir and have your users with bigger quotas. Am sure the users will go with the latter. Regards, Mich.
participants (3)
-
Broken Maize
-
Michuki Mwangi
-
Steve Muchai