On 28.2.2012, at 19.45, Steve Platt wrote:
Most of this is working but I'm stuck on how to convert users' mail folders from the existing setup to the new one. I'm using the convert plugin but of course the problem is that the plugin executes as the "vmail" user and cannot access the existing mail folders that belong to the users: and I'd be worried if it could, of course!
Convert plugin also has some other problems.
I have the idea that I should be able to run some command (as a privileged user) on the mail server and have it do the conversion for me, changing the ownership/permissions on the way.
Can convert-tool do this?
Possibly, but I remember it had some problems. The best solution would be to use Dovecot v2.0's dsync. Also you can use one of the scripts in http://wiki2.dovecot.org/Migration/MailFormat such as mb2md.
I'd prefer to go with the automatic (plugin) conversion if I can bodge the ownership issues somehow. Failing that, some tool or script may be the next best answer.
You could set mail_drop_priv_before_exec=yes, mail_access_groups=vmail and chgrp vmail, chmod g+rw the old mailboxes.