[Dovecot] Rewriting username at login
I am trying to make a switch from Cyrus to Dovecot which has some "historical accidents" to it that I have to deal with and ideally would like to get rid of.
One of them is that about half of the existing accounts have a different format for their login. All the newer accounts have their email address as login, the old ones use a dot instead of an at:
- new: user1@domain.tld
- old: user2.domain.tld
I would like to migrate away from the all-dots notation since it leads to a lot of support questions, and for that I'd like to run in a compatibility-mode for a few months. Effectively, I want to get rid of all the old users and convert them all to the new scheme, and have the username rewritten at login, so every second to last dot gets rewritten to an at.
This would ensure that we have no complaints and allow our users to migrate slowly.
All users are currently stored in a MySQL database for Cyrus, but this will be changed to a Dovecot-LDAP combination.
Is this possible? How could I achieve this?
Kind regards,
Gerry.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 13 Nov 2009, Gerry Demaret wrote:
All users are currently stored in a MySQL database for Cyrus, but this will be changed to a Dovecot-LDAP combination.
Is this possible? How could I achieve this?
Check out the userdb section of the Wiki http://wiki.dovecot.org/UserDatabase, you can return a new "uid". So make sure both spelling variants match the same entry (both for passdb and userdb) and override "uid" in userdb.
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSv1u5XWSIuGy1ktrAQLYBwf/eON1UU0tTv+j/u6SAHKRz7V2Jv7VIU+F fKNIiyzwo19ipXTX+vVkceRdFEPrS8A6o/53U6XH7DKB9qdk0FKnp8xWtjQAFxXt MJbnYkvrVNSyBY0Az0m78F0PPRaiplLzNVbD2fTs5khWIuO7kNi5n5QVXRjGE4K5 TORTVVbCBRuueAsZ/KZB/tKIypdAnoY5DYVra6L1ivR6M4fX4gfO1X76GC9/N/7/ lHKBfF05fZfDWkJ13YrRZMu9nYdzMhlwkc6x+nbiCwGUIBuw9IEr7dQuzZxahXlW 37+sX6Xb4/+JMwPrNU9koGhxEaDVKCeP3vCQtuc4vdys2PLIzxmEYw== =++fT -----END PGP SIGNATURE-----
participants (2)
-
Gerry Demaret
-
Steffen Kaiser