user configuration question

Eric Abrahamsen eric at ericabrahamsen.net
Wed Mar 2 06:49:41 UTC 2016


I've been using mbsync to sync this email account to a local Dovecot
installation. I used to use Gmail, through Google Apps, and a while ago
switched the account to self-hosting.

I didn't want to upload years' worth of old email to my old server, so
I've had two accounts in my MUA: one talking to the local Dovecot
account for the old emails, and a second talking directly to the server
for the new emails.

I'd like to sync the new account to Dovecot as well, and I'm having
trouble wrapping my brain around how to configure the two side-by-side
accounts in Dovecot (I know there are other solutions to this, but I'm
also just trying to figure out how this works).

What I don't grok is the exact effect of the different username fields
in the passdb file, and how they combine with username_format. Right now
my dovecot.conf has this:

passdb {
       driver = passwd-file
       args = username_format=%u /etc/dovecot/passwd
}

userdb {
       driver = static
       args = uid=eric gid=users home=/home/eric/.mail/%d/%n username_format=%u
       default_fields = mail=maildir:/home/eric/.mail/%d/%n/mail
}

And /etc/dovecot/passwd:

eric at ericabrahamsen.net:{PLAIN}password:eric at ericabrahamsen.net

Say I want to keep my existing mail where it is, and have all the new
mail go into ~/.mail/ericabrahamsen.net/eric-new/mail. Ie, when mbsync
connects to the local Dovecot, it does so with the username
eric-new at ericabrahamsen.net.

Now, in Dovecot's conf, do I change the email address in the first field
of /etc/dovecot/passwd, or the third field, or both? And, if it isn't
too much trouble, what is the difference between the two?

Thanks!
Eric



More information about the dovecot mailing list