** WHAT IS HERE?
This is a mostly-complete implementation of a Postfix MTA and Dovecot
IMAP mail server using a SQLite database for user and other data.
An introduction to this implementation is here:
00-overview.howto
Next, a detailed discussion of the schema is here:
01-sqlite-schema.howto
The sample data is in a SQL file which can be fed into sqlite3(1):
mail.sql
("sqlite3 -init mail.sql /etc/postfix/private/mail.sqlite" creates and
populates the database.)
Or, for those who might actually want to implement this in the real
world, just the schema, and its successor:
schema.sql
new-schema.sql
Postfix configuration is under postfix/ :
main.cf (and other files referenced in main.cf)
query/ contains the query files referenced in main.cf
Most of that mess plus more long-winded commentary is here:
02-postfix-sqlite.howto
Dovecot configuration is under dovecot/ :
README
conf.d/
dovecot.conf
sql-deny.conf.ext
sql.conf.ext
Modular configuration files under dovecot/conf.d/ :
10-auth.conf
10-logging.conf
10-mail.conf
10-master.conf
10-ssl.conf
15-lda.conf
20-imap.conf
20-lmtp.conf
20-pop3.conf
90-acl.conf
90-plugin.conf
auth-deny.conf.ext
auth-master.conf.ext
auth-sql.conf.ext
auth-system.conf.ext
All the Dovecot mess and some more added commentary is here:
03-dovecot-sqlite.howto
I've been keeping a CHANGES file since the first public posting of a
link to this project. If you have been here before, look there to see
what's new. There's also a TODO file which mentions what is yet to come
(including that new schema!)
And finally, a tarball of all the files, e.g.:
postfix-dovecot-sqlite-20120115.tar.gz
With a symbolic link, "latest.tar.gz", pointing to the most recent
version. Old copies are being shuffled off to the versions.old/
directory. You shouldn't care about those unless you were here earlier
and want to see what changed.
** WHY IS IT HERE?
Most third-party mail server howto documentation appears to be written
as an exercise for the author. This is no exception. I am learning SQL
and sqlite3.
But, I do think it might be interesting to postmasters. This isn't one
of those "copy/paste everything it says here to become Instant Gmail."
Certain features you might want/need are not covered.
It has, however, implemented many major features of Postfix in a way
that I think is interesting:
All address classes
All domain lists in a single table
True per-address:
transport(5) maps
virtual(8) UID/GID maps
smtpd(8) recipient access maps (restriction classes)
The transport maps implementation has the stability of local files (BDB
or CDB lookups) with the power of SQL. Likewise, the access lookup,
which leverages Postfix restriction classes, is similar in capability to
a policy service without the reliance on an external process.
** WHO SHOULD CARE?
The target audience is very small. But if you want to learn more about
Postfix, this might teach you something.
Don't take it as authoritative on SQLite: as per above, I am learning.
With luck, maybe someone who is better at it will point out ways in
which I can improve. (I have already gotten some helpful suggestions,
noted in the CHANGES file.)
** BUGS AND ERRATA
The only feature I know to be broken is the restriction class lookup for
catchall addresses. The only way I know to fix it is to add a domain-
only lookup after the per-address one. This would only ever be reached
for catchall addresses. It is shown as a commented example in main.cf
and as an extra query file. You shouldn't use catchalls anyway, and I
got tired of thinking about it, so I took the easy way out.
** COMMENTS AND SUGGESTIONS are solicited and welcome, please write to:
. Thank you for your interest.