Smailr is a CLI tool which lets you manage your virtual mailhosting setup from the shell. It currently uses SQLite as a backend, samples for Dovecot/Exim provided.