[Dovecot] Using MySQL For Mailboxes?
I have always seen some people indicate they use MySQL for mailboxes in Postfix and I wondered how difficult something like this would be? I have 300 users on my company Postfix server right now. I am just using Postfix, Dovecot (IMAP4 only), & Roundcube (Webmail). I have MySQL loaded on the machine that runs Postfix but only to manage the database for Roundcube. Do you think that 300+ users is recommended for a MySQL database for mailboxes?
Secondly, how difficult is it to configure this? Right now everyone user has a home directory and a mailbox in their private home folder. Is it hard to configure Postfix & Dovecot to use MySQL mailboxes? Just looking for some suggestions since I couldn't find a log of info via Google.
*PS* I was told that Dovecot doesn't support MySQL mailboxes. I think it does. Am I wrong?
http://howtoforge.com/forums/showthread.php?p=221396#post221396
On Mon, 2010-03-08 at 10:52 -0500, Carlos Mennens wrote:
*PS* I was told that Dovecot doesn't support MySQL mailboxes. I think it does. Am I wrong?
Dovecot supports looking up user information from MySQL, but not actually storing mails there. If you really wanted to store mails on MySQL, you'd have to use dbmail instead of Dovecot.
On Mon, Mar 8, 2010 at 10:55 AM, Timo Sirainen tss@iki.fi wrote:
Dovecot supports looking up user information from MySQL, but not actually storing mails there. If you really wanted to store mails on MySQL, you'd have to use dbmail instead of Dovecot.
Is it even worth it with less than 500 users? I mean I don't have any problems right now creating individual users and their home directories in Linux but I have never used MySQL for mail so can't differentiate the two. I guess I don't even know if this worth the effort to change my configuration especially if it involves changing out my IMAP server for 'dbmail' which I know nothing about until you mentioned it.
On Mon, 2010-03-08 at 11:00 -0500, Carlos Mennens wrote:
On Mon, Mar 8, 2010 at 10:55 AM, Timo Sirainen tss@iki.fi wrote:
Dovecot supports looking up user information from MySQL, but not actually storing mails there. If you really wanted to store mails on MySQL, you'd have to use dbmail instead of Dovecot.
Is it even worth it with less than 500 users?
Why do you think it would be worth it for any amount of users? Performance would definitely become worse. The only good reason I can think of would be if you wanted easy SQL access to all the mails for data mining/statistics/whatever purposes.
On Mar 8, 2010, at 8:00 AM, Carlos Mennens wrote:
On Mon, Mar 8, 2010 at 10:55 AM, Timo Sirainen tss@iki.fi wrote:
Dovecot supports looking up user information from MySQL, but not actually storing mails there. If you really wanted to store mails on MySQL, you'd have to use dbmail instead of Dovecot.
Is it even worth it with less than 500 users? I mean I don't have any problems right now creating individual users and their home directories in Linux but I have never used MySQL for mail so can't differentiate the two. I guess I don't even know if this worth the effort to change my configuration especially if it involves changing out my IMAP server for 'dbmail' which I know nothing about until you mentioned it.
No one will be able to answer what something is worth to you.
If your 500 users are mostly email only then you will probably enjoy
storing email addresses, passwords, paths to mailboxes, quotes etc...
in mysql.
This is how you can use mysql with dovecot. The emails will still be
stored on a file system in one of the popular mailbox formats like
mbox, maildir, etc....
// Brad
-----Oorspronkelijk bericht----- Van: dovecot-bounces+egbert=vandenbussche.nl@dovecot.org [mailto:dovecot-bounces+egbert=vandenbussche.nl@dovecot.org] Namens Bradley Giesbrecht Verzonden: maandag 8 maart 2010 17:06 Aan: Carlos Mennens CC: Dovecot Mailing List Onderwerp: Re: [Dovecot] Using MySQL For Mailboxes?
On Mar 8, 2010, at 8:00 AM, Carlos Mennens wrote:
On Mon, Mar 8, 2010 at 10:55 AM, Timo Sirainen tss@iki.fi wrote:
Dovecot supports looking up user information from MySQL, but not actually storing mails there. If you really wanted to store mails on MySQL, you'd have to use dbmail instead of Dovecot.
Is it even worth it with less than 500 users? I mean I don't have any problems right now creating individual users and their home directories in Linux but I have never used MySQL for mail so can't differentiate the two. I guess I don't even know if this worth the effort to change my configuration especially if it involves changing out my IMAP server for 'dbmail' which I know nothing about until you mentioned it.
No one will be able to answer what something is worth to you.
If your 500 users are mostly email only then you will probably enjoy
storing email addresses, passwords, paths to mailboxes, quotes etc...
in mysql.This is how you can use mysql with dovecot. The emails will still be
stored on a file system in one of the popular mailbox formats like
mbox, maildir, etc....// Brad
You might have a look at PostfixAdmin.
Egbert
On 2010-03-08 11:00 AM, Carlos Mennens wrote:
On Mon, Mar 8, 2010 at 10:55 AM, Timo Sirainen tss@iki.fi wrote:
Dovecot supports looking up user information from MySQL, but not actually storing mails there. If you really wanted to store mails on MySQL, you'd have to use dbmail instead of Dovecot.
Is it even worth it with less than 500 users? I mean I don't have any problems right now creating individual users and their home directories in Linux but I have never used MySQL for mail so can't differentiate the two. I guess I don't even know if this worth the effort to change my configuration especially if it involves changing out my IMAP server for 'dbmail' which I know nothing about until you mentioned it.
???
You aren't listening. Storing *email* in mysql is a totally different concept from storing USER DATA in mysql.
You do NOT have to switch to dbmail to change your config to start using MySQL for managing your user accounts.
Personally, I would use either MySQL or PostgreSQL for managing my users even if I only had 5. But imo, for 25 or more, doing it by hand is nuts. For 500?????
Switch to MySQL for your user management, unless you just like ridiculously busy work.
--
Best regards,
Charles
Em 9/3/2010 08:07, Charles Marcus escreveu:
???
You aren't listening. Storing *email* in mysql is a totally different concept from storing USER DATA in mysql.
You do NOT have to switch to dbmail to change your config to start using MySQL for managing your user accounts.
Personally, I would use either MySQL or PostgreSQL for managing my users even if I only had 5. But imo, for 25 or more, doing it by hand is nuts. For 500?????
Switch to MySQL for your user management, unless you just like ridiculously busy work.
In fact, his original question makes me wonder what he is talking about, storing user info or user mailboxes on mysql. People understood storing mailboxes.
Anyway, a better solution to handle user account information than mysql is ldap (which I personally suggest) with pam. This can also handle all posix accounts, not just mail accounts, and thus improving consistence. I'd use that for any system with more than 3 accounts.
Best regards,
-- Marcio Merlone
On 2010-03-09 6:23 AM, Marcio Merlone wrote:
Anyway, a better solution to handle user account information than mysql is ldap (which I personally suggest) with pam. This can also handle all posix accounts, not just mail accounts, and thus improving consistence. I'd use that for any system with more than 3 accounts.
I guess it depends on your needs and skills. If you don't need posix account support, know mysql, and don't know ldap, then it definitely isn't 'better'... ;)
Supposedly you can use a MySQL backend with Samba, but I haven't done it (no need), so don't know how well it works, if at all.
But yes, if you know ldap well (which I don't), it can definitely work as a single sign on system...
--
Best regards,
Charles
Am 09.03.2010 13:33, schrieb Charles Marcus:
On 2010-03-09 6:23 AM, Marcio Merlone wrote:
Anyway, a better solution to handle user account information than mysql is ldap (which I personally suggest) with pam. This can also handle all posix accounts, not just mail accounts, and thus improving consistence. I'd use that for any system with more than 3 accounts.
I guess it depends on your needs and skills. If you don't need posix account support, know mysql, and don't know ldap, then it definitely isn't 'better'... ;)
Supposedly you can use a MySQL backend with Samba, but I haven't done it (no need), so don't know how well it works, if at all.
But yes, if you know ldap well (which I don't), it can definitely work as a single sign on system...
sql storage would be a nice idea anyway for clustering loadbalancing setups etc
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
On Tue, 2010-03-09 at 14:30 +0100, Robert Schetterer wrote:
sql storage would be a nice idea anyway for clustering loadbalancing setups etc
And NoSQL storage would be even better for that :) My plan is still http://www.dovecot.org/list/dovecot/2009-August/041983.html, that would allow adding SQL FS backend too..
Am 09.03.2010 14:40, schrieb Timo Sirainen:
On Tue, 2010-03-09 at 14:30 +0100, Robert Schetterer wrote:
sql storage would be a nice idea anyway for clustering loadbalancing setups etc
And NoSQL storage would be even better for that :) My plan is still http://www.dovecot.org/list/dovecot/2009-August/041983.html, that would allow adding SQL FS backend too..
Hi Timo, sounds great !
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
On Tue, 2010-03-09 at 14:41 +0100, Marcus Rueckert wrote:
On 2010-03-09 14:30:14 +0100, Robert Schetterer wrote:
sql storage would be a nice idea anyway for clustering loadbalancing setups etc
looked into drbd?
DRBD is nice when all your users fit into a single server that is replicated for HA. For more servers it gets tricky.
Am 09.03.2010 14:41, schrieb Marcus Rueckert:
On 2010-03-09 14:30:14 +0100, Robert Schetterer wrote:
sql storage would be a nice idea anyway for clustering loadbalancing setups etc
looked into drbd?
darix
jep, i ve tested it allready and will implement it soon but nevertheless having all in sql ( mail storage and dovecot setup as well as horde , spamassassin etc ) seems to make ha setup more easy, but youre right for drbd with maildir is good enough for me yet
-- Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
On 2010-03-08 10:52 AM, Carlos Mennens wrote:
*PS* I was told that Dovecot doesn't support MySQL mailboxes. I think it does. Am I wrong?
You're confusing 'mailboxes' with user mail 'settings' and/or user management.
Dovecot does not currently support storing users mail in any sql database, although 2.0 is supposedly going to make it easier to implement this with a plugin for anyone wants to write the code.
What you are reading about re: dovecot+mysql is simply using MySQL as the backend for your user info. It can be as simple as username and password, or you can add quota management, and even more (custom user storage locations, etc) with extra_fields:
http://wiki.dovecot.org/UserDatabase/ExtraFields
Dovecot is extremely flexible with respect to configuration management.
--
Best regards,
Charles
participants (8)
-
Bradley Giesbrecht
-
Carlos Mennens
-
Charles Marcus
-
Egbert Jan van den Bussche
-
Marcio Merlone
-
Marcus Rueckert
-
Robert Schetterer
-
Timo Sirainen