[Dovecot] What best decision to make for flatfiles or SQL when I use Dovecot2 + Postfix together?

Nick Rosier nick+dovecot at bunbun.be
Wed Sep 28 16:04:17 EEST 2011


terryjames9461 at mm.st wrote:
> Hello Nick,
>
> On Tuesday, September 27, 2011 9:47 PM, "Nick Rosier"
> <nick+dovecot at bunbun.be>  wrote:
>
>> +1 one on PostfixAdmin. Wouldn't want to live without it. The main
>> advantage of using a DB is that all information is stored in 1 location
>> and available in the right format through SQL-queries. My 1st config
>> used flat-files and the biggest issue was keeping the different files in
>> sync (i.e. when creating/deleting users making sure to update all the
>> necessary files).
>
> Did you try that system with flatfiles in Dovecot v2 or v1? I think that
> this instructed possibility,
> http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix, is only for
> v2?
This was back with v1. It was working with a little script I wrote.
A problem was delegating management of all the domains. My servers hosts 
a number of domains which are owned by different people 
(family+friends). With PostfixAdmin you can define which user 
administers which domains (another perk).
>
> Its that sync of the different files that I hope to avoid.  If I can
> with flatfiles, all the better.  If not then maybe I will have to use
> SQL.  And then the Postfix Admin looks interesting.
An additional advantage I found with PostfixAdmin is the possibility to 
run post-creation/editing/deleting scripts on mailboxes and domains. I'm 
using Amavisd-new and have the post-creation script create users in the 
Amavis-DB with e.g. the default policies for a user and populating some 
tables used by other tools (quarReminder etc...).

Rgds,
N.

PS: my mailserver only hosts a couple of domains and less than 100 
mailboxes. I could have done this with flat-files but the possibility to 
delegate mailbox creation/deletion to the domain owners was worth the 
"trouble" using a DB which I was using anyway for other services.


More information about the dovecot mailing list