This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.

I wanted to use Dovecot to deal with mailboxes of non-unix users.

Assumptions

Making dovecot use these mailboxes

 auth = default
 auth_userdb = static uid=500 gid=500 home=/home/dovecot/users/%u
 auth_passdb = passwd-file /home/dovecot/passwd
 auth_user = dovecot

By the way, I did not bother making another set of configs to deal with non-virtual users - I use perdition for that in my migration scenario.

Making exim deliver to those virtual users

 # Transport to send any mail for who a dovecot user exists to the appropriate maildir box
 # Transports are evaluated in order of configuration, so if you place this 
 # above the local_delivery director this will play nice:
 # If there is a virtual user in the dovecot dirs it will use that
 # If not, it will try normal local delivery
 dovecot_transport:
   driver = appendfile
   user = dovecot
   group = dovecot
   mode = 0600
   directory=/home/dovecot/users/${lc:$local_part}/
   maildir_format = true
   mode_fail_narrower = false
   envelope_to_add = true
   return_path_add = true

 # Director to send any mail for who a dovecot user exists to the appropriate maildir box
 dovecot:
   driver = smartuser
   require_files = +/home/dovecot/users/${local_part}/
   transport = dovecot_transport

In order to make this work, exim must be able to read the /home/dovecot/users/ directory, otherwise delivery will not work.

Be carefull how you do this - test it with 'exim -bt <address>' for a few different options