How do I change Dovecot virtual user passwords?

You can use the doveadm utility that comes with Dovecot:

$ doveadm pw -s CRYPT
Enter new password: 
Retype new password: 

You can use the Apache utility htpasswd. It uses crypt() to encrypt passwords by default on Linux platforms. The following will prompt you for the new password for the user jscott and will update the file /etc/dovecot/dovecot.passwd.

htpasswd /etc/dovecot/dovecot.passwd jscott

or to avoid the prompts do:

doveadm pw -s CRYPT -p yourpassword -u user