Notes on Roundcube Mail

These are some notes for my future self on how to get data out of the roundcube mail database. This assume sqlite3 database but the SQL should also work with MySQL or PostgreSQL databases as well.

View schema

sqlite3 rc_sqlite.db ".schema"

cli for showing roundcube database schema

List users

sqlite3 rc_sqlite.db "select user_id,username from users;"

cli for listing roundcube users from database

Export contacts in vcard format

sqlite3 rc_sqlite.db "select vcard from contacts where user_id = NN;" > username_contacts.vcf

# where the NN is the user_id number for the list users output

cli for extracting vcard contact information