I just migrated my operation from CentOS 6 v 3.0--45 to CentOS 7 an ISPConfig version 3.1. Migrated to roundcubemail and expected the mail messages to be stored in the database. That was silly because a simple read of the dovecot.conf file shows the mail location as /var/vmail. is it practical to store the mail messages in mariadb/mysql? Is it advisable? If so what would be the procedure?
I won't do that, which benefit do you expect over storing them in the filesystem? When you migrate a server, then just copy over /var/vmail and /var/www and the mysql databases to keep all your data.
The benefit is the mail gets backed up when mariadb backs up. It can also be replicated to a standby server using Galera.
You can backup files easier than MySQL and you can use dovecot replication if you need HA or a HA file storage solution. But of course you can use Mysql as backend, I just doubt that it will give you any benefits and the current setup of ISPConfig is in use on large setups, e.g. one setup I know hosts more than 5TB of mail data and more than 15 thousand mail accounts on a 5 node iSPConfig cluster with filebased mail storage. But feel free to do it, you will just have to build your own ISPConfig backend plugins for the mail system and your own mail server configuration.