also works fine (though it took some doing to figure out which parameters are required and which are optional… and also the --db cannot be MariaDB or mariadb which might could be shimmed in there, it still did the right thing).
System Settings -> Virtualmin Configuration -> Actions upon server and user creation -> Command to run after making changes to a server
It ends in an error/non-error… it knows that it didn’t error, because it says nothing about running anything at all if you leave “Only on failure” checked on “Always show output from pre and post commands” just below the command:
It says it failed somehow, but the database is created and Roundcube stuff is in it, etc. (It looks similar running from the command line, big blank below the “failed” line, detailed in the thread I linked above.)
Anyway this will work for me for now at least, though I’m sure the built-in one has some sanity checks and such which this does not.
(Also the “–path /” I have just installs Roundcube into the root. Obviously you might want to adjust that.)