[Dovecot] A Postfix/Dovecot example with SQLite backend [crossposted]
rob0 at gmx.co.uk
Sun Feb 19 20:09:27 EET 2012
There are many mail howtos on the web ... can one more hurt?
http://rob0.nodns4.us/howto/latest.tar.gz (all files)
(Sorry, not HTML yet. That is on the agenda.)
This is a multiple address class sample implementation of a Postfix
MTA and Dovecot IMAP server using a SQLite3 data backend. Domain
lookups, user maps, access and transport maps: all using a single,
shared SQLite database file.
What, other than the SQLite backend, distinguishes this from other
mail system howtos?
The Postfix high points include a complete implementation of all
address classes and per-address transport(5) maps, virtual(8)
UID/GID maps, and smtpd(8) recipient access(5) maps. (The latter is
using smtpd_restriction_classes, which are not discussed in detail,
but are implemented in an interesting way.)
On the Dovecot side, it's mostly standard stuff. The SQL deny userdb
implementation, and the seamless integration of system and SQL users,
might be interesting.
I think the database itself is the best part of this example. It's as
close to "normalized" as I think it can reasonably be. A significant
fact is that each revision of the system has tended to simplify the
schema. That's a good sign, I think.
One central Domain table lists all domains and hostnames to which the
server makes reference. Likewise, a central Address table lists all
addresses (with a pointer to the Domain table for each record.) The
Alias table defines relationships between Address entries. (Both
local(8) and virtual(5) alias maps exist in that table.)
Comments and suggestions are welcome, on-list if it's topical to
whichever list (please don't crosspost unless comments are relevant
to both lists), or offlist to the address in the README file (or as
detailed below.) Thanks for your interest.
http://rob0.nodns4.us/ -- system administration and consulting
Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
More information about the dovecot