folder2sql --domain domain --user user folder
It is installed in /usr/lib/linuxconf/lib
To better support IMAP, the SQL database schema was changed, so if you have working setup, it will have to be re-install. I did not write any conversion utility as I don't think anyone has this in production yet. If this is not the case, let me know. The change involves the folder field in the messages table. It has been changed to folderid as a int and another table, folders have been created to provide the ids.
This change involves also the account creation process. A folder named inbox must be created for every account in the folders table.
A new dialog was created to enter those settings.
mailsql can handle any message size, but you must configure it on a per domain basis.
Existing database will need to be changed.