terryjames9461 at mm.st
2011-Sep-27 15:51 UTC
[Dovecot] What best decision to make for flatfiles or SQL when I use Dovecot2 + Postfix together?
Hello, I'm moving my mail server from Exchange to an opensource one. After a bunch of reading, I decided on building a Dovecot2 + Postfix server in a VirtualUsers-only + Multiple-domains configuration. Since my messages will be stored by Dovecot, and the documentation is really good, I figured that it's smartest to configure Dovecot, then make Postfix 'fit' to it, sharing the data files that way. I read through lots of the Dovecot wiki for v2. There are many ways for storing the database data. My goal is to only have data in one instances, used by both Postfix & Dovecot. I'm a little confused about: to do that sharing-in-one-place, do I have to use SQL or can I use the flatfiles like passwd-db? I think for sure someone already decided the best approach for this, and maybe I'm not understanding the logic to it. The data I think I need to share are: users (user at domain.com) passwords user aliases (mapping user2 at domain.com -> user1 at domain.com) domains domain aliases (domain.com also receives email for domain2.com) And I think all of this can be in passwd-db in Dovecot. But I also want to make sure that Postfix ONLY accepts email for users/domains that exist, so it has to read that data too. Can I do this that way with the flatfiles? Or do I have to use the SQL approach? TJ
Tom Hendrikx
2011-Sep-27 17:29 UTC
[Dovecot] What best decision to make for flatfiles or SQL when I use Dovecot2 + Postfix together?
On 27/09/11 17:51, terryjames9461 at mm.st wrote:> Hello, > > I'm moving my mail server from Exchange to an opensource one. > > After a bunch of reading, I decided on building a Dovecot2 + Postfix > server in a VirtualUsers-only + Multiple-domains configuration. > > Since my messages will be stored by Dovecot, and the documentation is > really good, I figured that it's smartest to configure Dovecot, then > make Postfix 'fit' to it, sharing the data files that way. > > I read through lots of the Dovecot wiki for v2. > > There are many ways for storing the database data. My goal is to only > have data in one instances, used by both Postfix & Dovecot. > > I'm a little confused about: to do that sharing-in-one-place, do I have > to use SQL or can I use the flatfiles like passwd-db? I think for sure > someone already decided the best approach for this, and maybe I'm not > understanding the logic to it. > > The data I think I need to share are: > > users (user at domain.com) > passwords > user aliases (mapping user2 at domain.com -> user1 at domain.com) > domains > domain aliases (domain.com also receives email for domain2.com) > > And I think all of this can be in passwd-db in Dovecot. But I also want > to make sure that Postfix ONLY accepts email for users/domains that > exist, so it has to read that data too. > > Can I do this that way with the flatfiles? Or do I have to use the SQL > approach? >The problem with passwd(like) files is that they are almost never in the correct format to fit both daemons. The easiest way to use a database. You could check out postfixadmin: it contains the database format you need, the documentation to hook postfix and dovecot into it, and a nice web gui for administrating the list of domains, aliases, mailboxes, passwords, etc etc. -- Tom
Voytek
2011-Sep-27 20:27 UTC
[Dovecot] What best decision to make for flatfiles or SQL when I use Dovecot2 + Postfix together?
On Wed, September 28, 2011 2:51 am, terryjames9461 at mm.st wrote:> I'm a little confused about: to do that sharing-in-one-place, do I have > to use SQL or can I use the flatfiles like passwd-db? I think for sure > someone already decided the best approach for this, and maybe I'm not > understanding the logic to it.personally, I'd suggest SQL, that's what I use, used it with CourierIMAP/Postfix, now, with Dovecot/Postfix, it works well, I also use Postfix.admin, for, well, admin Voytek
Jan-Frode Myklebust
2011-Sep-28 06:44 UTC
[Dovecot] What best decision to make for flatfiles or SQL when I use Dovecot2 + Postfix together?
On Tue, Sep 27, 2011 at 08:51:18AM -0700, terryjames9461 at mm.st wrote:> > I'm a little confused about: to do that sharing-in-one-place, do I have > to use SQL or can I use the flatfiles like passwd-db? I think for sure > someone already decided the best approach for this, and maybe I'm not > understanding the logic to it.Best approach is probably to store this in an ldap-directory. Then you can easily have multi-master replication, and avoid any single point of failure for your database. Both postfix and dovecot will be able to lookup the data using ldap. -jf
Robert Schetterer
2011-Sep-28 13:02 UTC
[Dovecot] What best decision to make for flatfiles or SQL when I use Dovecot2 + Postfix together?
Am 27.09.2011 17:51, schrieb terryjames9461 at mm.st:> Hello, > > I'm moving my mail server from Exchange to an opensource one. > > After a bunch of reading, I decided on building a Dovecot2 + Postfix > server in a VirtualUsers-only + Multiple-domains configuration. > > Since my messages will be stored by Dovecot, and the documentation is > really good, I figured that it's smartest to configure Dovecot, then > make Postfix 'fit' to it, sharing the data files that way. > > I read through lots of the Dovecot wiki for v2. > > There are many ways for storing the database data. My goal is to only > have data in one instances, used by both Postfix & Dovecot. > > I'm a little confused about: to do that sharing-in-one-place, do I have > to use SQL or can I use the flatfiles like passwd-db? I think for sure > someone already decided the best approach for this, and maybe I'm not > understanding the logic to it. > > The data I think I need to share are: > > users (user at domain.com) > passwords > user aliases (mapping user2 at domain.com -> user1 at domain.com) > domains > domain aliases (domain.com also receives email for domain2.com) > > And I think all of this can be in passwd-db in Dovecot. But I also want > to make sure that Postfix ONLY accepts email for users/domains that > exist, so it has to read that data too. > > Can I do this that way with the flatfiles? Or do I have to use the SQL > approach? > > > TJi do it all with postfixadmin and mysql, in my eyes you could use plain flat files , if your the only on who admins i.e over ssh etc but if you want a customer friendly mailserver, with parted superadmin/domainadmin/user administration over some i.e. http gui you should better use sql and/or ldap stuff -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria