[Dovecot] Renaming user account / mailbox
Hello,
I am running dovecot-2.0.13-1_128.el5 x86_64 RPM on CentOS 5.7.
All accounts are virtual, hosted on LDAP Server. We are using Maildir mailboxes.
The question: What is the process to rename an existing account/mailbox?
I would like to rename userx with email: userx@example.com to ux@example.com with a mailbox of ux (currently: userx)
Of course the idea is that new mail will continue to be delivered to the same mailbox, although it has been renamed.
How can I achieve it? Would it be enough (after changing the associated data in the associated LDAP entry) to simply rename the virtual user directory name, e.g. from /home/vmail/userx to /home/vmail/ux ?
Thanks in advance, Nick
On 31.1.2012, at 14.07, Nikolaos Milas wrote:
I am running dovecot-2.0.13-1_128.el5 x86_64 RPM on CentOS 5.7.
I would like to rename userx with email: userx@example.com to ux@example.com with a mailbox of ux (currently: userx)
Of course the idea is that new mail will continue to be delivered to the same mailbox, although it has been renamed.
How can I achieve it? Would it be enough (after changing the associated data in the associated LDAP entry) to simply rename the virtual user directory name, e.g. from /home/vmail/userx to /home/vmail/ux ?
Yes, you can just kill the user's existing connections, rename the directory and update the LDAP entry. If you do all of that quickly in a script, it's unlikely that you'll run into trouble. If a mail is being delivered at the same time, it could tempfail but will be retried again. (A more complex method would be using dsync, but probably not worth the trouble.)
On 1/2/2012 10:29 μμ, Timo Sirainen wrote:
Yes, you can just kill the user's existing connections, rename the directory and update the LDAP entry. If you do all of that quickly in a script, it's unlikely that you'll run into trouble.
Thanks Timo,
In fact, I could have the luxury to bring down the mail server (Postfix and Dovecot) for a couple of minutes and complete the changes.
There is a mail gateway device queuing for delivery when the mail server is down.
Nick
participants (2)
-
Nikolaos Milas
-
Timo Sirainen