Is anyone working on MySQL MIAB version?

Hello there. I want to know is anyone working on mysql/other non-db lock database?
sqlite can’t handle many users and many new emails simultaneously. Sometimes i get many

postfix/smtpd[23273]: fatal: dict_sqlite_lookup: /etc/postfix/virtual-alias-maps.cf: SQL finalize failed for query 'SELECT destination from (SELECT destination, 0 as priority FROM aliases WHERE source='xxx' AND destination<>'' UNION SELECT email as destination, 1 as priority FROM users WHERE email='xx') ORDER BY priority LIMIT 1;': database is locked?
postfix/trivial-rewrite[32074]: warning: dict_sqlite_lookup: /etc/postfix/virtual-alias-maps.cf: SQL step failed for query 'SELECT destination from (SELECT destination, 0 as priority FROM aliases WHERE source='xxx' AND destination<>'' UNION SELECT email as destination, 1 as priority FROM users WHERE email='xxx') ORDER BY priority LIMIT 1;': database is locked?

in logs.
As i understand sqlite can’t handle more than one simultaneously operation. So when it’s 5 or 10 access to database, only one is being processed, the rest are waiting.
MySQL supports row lock, no need to block the whole database.
Thank you.

I’m not the best on this, but my understanding is that postfix isn’t using a database for messages, so it’s users and Nextcloud accounting for the load on sqlite3.

As far using a different RDBMS, on the low end of the spectrum MySQL creates a measurable increase in memory requirements that may cause MiaB to no longer function on a 512MB server, which there are users at this level. At the high end, there are reports of active servers with >120 users not reporting issues related to MiaB. Since MiaB is geared more toward the smaller servers, I’m not clear that if you were to submit a PR it would be accepted, but you are certainly welcome to try.

There is a popular fork called Power Mail-in-a-Box that adds a lot of advanced features to MiaB, but still maintains using SQLite3.

I half wonder if a fork that adds [MySQL/MariaDB/PostgreSQL], one of the newer Dovecot dbox mailbox formats (they do de-duplication, migration of older messages to different storage location, improved search indexing), plus an actual indexing search tool [Solr/Sphinx] would have a niche to fill.

Oh, and I forgot that Roundcube is also using sqlite3. Perhaps if you have a lot of users on Roundcube, you might encourage to use clients and that might reduce the load on sqlite3.

I think it might, and would be a really interesting fork.

@yoq1 in the past for a long time I was using iredmail script for my mail box; it also offers good support both free and payed package. May be more appropriate for heavier use cases.
I like the simplicity of MIAB and its low footprint, adding a full DB will get have trade off as mentioned. I’m sure someone can make a fork with *db but then it will need ongoing support as well so weigh your options and go with solution that best suits your use case.

Cheers,

This topic was automatically closed after 61 days. New replies are no longer allowed.