[Dovecot] Loginname - mapping

Roald Amundsen roalda at gmail.com
Sat Nov 29 22:49:37 EET 2008


I have a server with a few thousand mailboxes (for a few hundred 
domains) on it. The usernames are following several naming conventions:


The reason for this chaos is that the accounts were set up on different 
mailservers, some imail, some linux, some with virtualmin and some 
manually and through aquisitons etc it has all ended up in one server.

Now we are setting up atmail to replace imp. The loginprocess of atmail 
is a bit different in that you just type in your mail address and atmail 
tries a few combinations of loginnames to login.

However, some of the combinations over atmail cant login to. Some of 
them works fine when using this line in dovecot.conf

auth_username_translation = @_

Is there any facility to let dovecot do username mapping?

If I eg have a file: usermapping that looks like this:

user at domain1.com	domain1_user
user at domain2.com	user_domain2
user at domain3.com	domain3.user

And yes, I know that the best way is to start again and use virtual 
domains and get all into one naming standard, but unfortunately, that is 
not going to happen.

The other alternative is of course to hack into the source code of 
atmail, but I am not that confident in PHP.

Any ideas?

Regards Roald Amundsen

More information about the dovecot mailing list