Re: Which imap command to rename a root mailbox while maintaining its partition
Bron Gondwana
brong at fastmailteam.com
Tue Nov 5 03:08:27 EST 2019
Wow - this looks like a bug in partition selection for user rename then :( We should fix that.
https://github.com/cyrusimap/cyrus-imapd/issues/2907
Cheers,
Bron.
On Tue, Nov 5, 2019, at 17:30, Thomas Cataldo wrote:
>
>
> > On 29 Oct 2019, at 13:13, Ken Murchison <murch at fastmail.com> wrote:
> >
> > x RENAME <old> <new> <partition>
> >
> >
> > should work
>
>
> Agree, but it does not :-)
>
> At least with version 3.0.8 :
>
> localhost> info user/ren at devenv.blue
> {user/ren at devenv.blue}:
> private:
> check: NIL
> checkperiod: NIL
> comment: NIL
> sort: NIL
> specialuse: NIL
> thread: NIL
> expire: NIL
> news2mail: NIL
> sieve: NIL
> squat: NIL
> shared:
> check: NIL
> checkperiod: NIL
> comment: NIL
> sort: NIL
> specialuse: NIL
> thread: NIL
> annotsize: 0
> duplicatedeliver: false
> expire: NIL
> lastpop: NIL
> lastupdate: 4-Nov-2019 15:32:13 +0000
> news2mail: NIL
> partition: bm-master__devenv_blue
> pop3newuidl: true
> pop3showafter: NIL
> sharedseen: false
> sieve: NIL
> size: 32310
> squat: NIL
> synccrcs: 2599665889 0
> uniqueid: ee8ede37-153a-4650-bf94-3da7d4f52043
>
>
> An IMAP session as admin :
>
> telnet localhost 1143
> Trying ::1...
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> * OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE AUTH=PLAIN SASL-IR] server ready
> . login admin0 admin
> . OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SEARCH=FUZZY SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES THREAD=REFS ANNOTATEMORE ANNOTATE-EXPERIMENT-1 METADATA LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS LIST-METADATA WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE DIGEST=SHA1 X-REPLICATION URLAUTH URLAUTH=BINARY LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] User logged in SESSIONID=<cyrus-26086-1572885470-1-16005178469193034866>
> . RENAME user/ren at devenv.blue user/rename at devenv.blue bm-master__devenv_blue
> . NO Cross-server or cross-partition move w/rename not supported
> . RENAME user/ren at devenv.blue user/rename at devenv.blue
> * OK rename user/ren at devenv.blue user/rename at devenv.blue
> * OK rename user/ren/Drafts at devenv.blue user/rename/Drafts at devenv.blue
> * OK rename user/ren/Junk at devenv.blue user/rename/Junk at devenv.blue
> * OK rename user/ren/Outbox at devenv.blue user/rename/Outbox at devenv.blue
> * OK rename user/ren/Sent at devenv.blue user/rename/Sent at devenv.blue
> * OK rename user/ren/Trash at devenv.blue user/rename/Trash at devenv.blue
> . OK Completed
>
> But if I use the version without an explicit partition, the new mailbox ends up in :
>
> > info user/rename at devenv.blue
> {user/rename at devenv.blue}:
> private:
> check: NIL
> checkperiod: NIL
> comment: NIL
> sort: NIL
> specialuse: NIL
> thread: NIL
> expire: NIL
> news2mail: NIL
> sieve: NIL
> squat: NIL
> shared:
> check: NIL
> checkperiod: NIL
> comment: NIL
> sort: NIL
> specialuse: NIL
> thread: NIL
> annotsize: 0
> duplicatedeliver: false
> expire: NIL
> lastpop: NIL
> lastupdate: 4-Nov-2019 16:43:36 +0000
> news2mail: NIL
> partition: default
> pop3newuidl: true
> pop3showafter: NIL
> sharedseen: false
> sieve: NIL
> size: 32310
> squat: NIL
> synccrcs: 2599665889 0
> uniqueid: ee8ede37-153a-4650-bf94-3da7d4f52043
>
>
> which forces me issue a second command in my imap session :
>
> . RENAME user/rename at devenv.blue user/rename at devenv.blue bm-master__devenv_blue
> * OK rename user/rename at devenv.blue user/rename at devenv.blue
> * OK rename user/rename/Drafts at devenv.blue user/rename/Drafts at devenv.blue
> * OK rename user/rename/Junk at devenv.blue user/rename/Junk at devenv.blue
> * OK rename user/rename/Outbox at devenv.blue user/rename/Outbox at devenv.blue
> * OK rename user/rename/Sent at devenv.blue user/rename/Sent at devenv.blue
> * OK rename user/rename/Trash at devenv.blue user/rename/Trash at devenv.blue
> . OK Completed
>
>
> Which moves the mailbox to the partition where I want it (its original one).
>
>
> The problem with the non-atomic rename is that our replication target receives data belonging to the default partition, which is not desired or expected.
>
>
>
>
> Thomas Cataldo
> Directeur Technique
>
> (+33) 6 42 25 91 38
>
> BlueMind
> +33 (0)5 81 91 55 60
> Hotel des Télécoms, 40 rue du village d'entreprises
> 31670 Labège, France
> www.bluemind.net / https://blog.bluemind.net/fr/
>
--
Bron Gondwana, CEO, Fastmail Pty Ltd
brong at fastmailteam.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20191105/caa2856e/attachment-0001.html>
More information about the Cyrus-devel
mailing list