emiliojoel
2010-May-03 10:15 UTC
[Dovecot] Migrating domain with diferent default_pass_scheme
Hi I have now my main mail server using dovecot with diferents domains and for user auth using mysql with default_pass_scheme = PLAIN, Now I am migrating a new domain from other server with dovecot using mysql with default_pass_scheme = MD5. My question is: Is possible have a different default_pass_scheme depending of the domain? could I use dovecot with domains using mysql auth with default_pass_scheme = PLAIN and other with default_pass_scheme = MD5? any sugestion? thanks Emilio -- View this message in context: http://old.nabble.com/Migrating-domain-with-diferent-default_pass_scheme-tp28433456p28433456.html Sent from the Dovecot mailing list archive at Nabble.com.
Oli Schacher
2010-May-03 13:45 UTC
[Dovecot] Migrating domain with diferent default_pass_scheme
Hi Emilio For this purpose we used dovecot proxy & mysql with a view that would prepend the pass scheme depending on if an account is already migrated (pointing to old or new IP): create or replace view v_proxy as concat(if(proxyhost='<ip of new server>','{MD5}','{PLAIN}'),<old or new password>) as password, [... other fields you might need...] from accounts; Basically you ignore the default_pass_scheme and let mysql prepend the correct scheme based on whatever property you like, in your case the domain name. You could do this in the target database directly but if you need the different pass schemes only while migrating (and update the old passwords to the new format) I'd recommend using dovecot proxy so you don't have to change your target user table. This also has the advantage that users don't need to set new hostnames in their clients - you simply point the hostname to your dovecot proxy and after the migration is completed point it to the new system. hth Oli