On 6/22/14, deano-dovecot@areyes.com deano-dovecot@areyes.com wrote:
For those of you using virtual users, and SQL, how are you managing your users and their home dirs ? That is, what process do you use for adding/deleting users, creating their home dirs etc ? I suppose it's easy enough to do manually, inserting rows in the database, creating dirs, chown/chmod yada yada, but there must be a better way to do it ... If you're doing dovecot replication then it gets even more cumbersome, having to duplicate the effort in two places (and make sure it's correct).
Simple perl script called directly, or even from control panel or hosting management software that can call hooks to call the script.
but it adds them into the user DB, the mail DB, the http-auth DB and creates their own DB (we give users 1 mysql DB each)
you have a base path (say /var/vmail) you can use variables, substr, and so on to simplify it , once in the DB dovecot LDA automatically creates the users home dir based on mail location and things ;like that
IOW, spending 10 mins to write teh script saves years of manual pain