[Dovecot] SQL mail storage

Ejay Hire ehire at globaloptions.com
Sun Apr 1 05:24:38 EEST 2007


hi.

I'm sure this is on hold in your head, but just in case.. Can this be
V2.0 minimum, please.

Thanks,
Ejay

On Sat, 2007-03-31 at 17:34 +0300, Timo Sirainen wrote:
> I wasted some time yesterday and today implementing a SQL storage
> plugin. It seems to be working, but:
> 
>  - Saving new messages is done in a regular INSERT statement, which is
> bad. PostgreSQL has at least this COPY TO command which could be used
> instead.
>  - It breaks in stress testing
>  - It's not that well optimized. Especially it could support caching
> some commonly requested fields (same as dovecot.index.cache file).
>  - Currently works only with PostgreSQL.
> 
> Nothing is committed to CVS yet. I'm not sure if I should even do that.
> I'm not sure if those lib-sql API changes were that great. Maybe there's
> a better way..
> 
> If you're interested in trying it, you need the latest CVS HEAD sources
> and these patches:
> 
> http://dovecot.org/patches/sql-storage-changes.diff
> http://dovecot.org/patches/sql-storage-plugin.diff
> 
> The SQL schema is in src/plugins/mail-sql/schema.sql file. It creates a
> "tss" named user by default, so you might want to modify that. :)
> 
> Then set:
> 
> mail_location = sql:pgsql:host=localhost dbname=mails user=mailuser
> password=foo
> mail_plugins = mail_sql
> 



More information about the dovecot mailing list