How to correctly use readonly=yes with the sqlite driver?
Eduardo M KALINOWSKI
eduardo at kalinowski.com.br
Sun Jul 24 10:52:40 UTC 2022
On 23/07/2022 20:07, oddlama wrote:
> Hi! I want to use a sqlite database in readonly mode, which I found
> mentionend in the docs [1]. Unfortunately no examples were given, so I
> tried to infer the usage by inspecting core/driver-sqlite.c. If I
> interpret it correctly, this should have worked:
>
> /etc/dovecot/dovecot-sql.conf.ext:
> driver = sqlite
> connect = readonly=yes /var/vmail/virtual.sqlite
>
> user_query = #...
>
>
> Unfortunately, dovecot tries to open a file named "readonly=yes
> /var/vmail/virtual.sqlite" instead. I have no idea why the option is
> not parsed. Is this a bug or am I using the feature incorrectly?
>
> Best regards,
> oddlama
>
> [1]: https://doc.dovecot.org/settings/plugin/sql-sqlite/
The documentation mentions that "Prior to v2.3.18, Dovecot uses the
whole value as filename to connect, whitespace included.". Are you
running a new enough version?
--
You may get an opportunity for advancement today. Watch it!
Eduardo M KALINOWSKI
eduardo at kalinowski.com.br
More information about the dovecot
mailing list