Re: Move mails between folders on different backend servers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Frank,

Backend (target):
<1648127910<6 Append {13+}
group.fritest (\Seen $Label4 NonJunk) "23-Mar-2022 19:55:11 +0100" {3129+}
Return-Path: …
>1648127910>6 OK [APPENDUID 1611826992 15] Completed
<1648127910<Q01 LOGOUT
>1648127910>* BYE LOGOUT received
Q01 OK Completed

I think the problems all stem from here -- notice the APPENDUID on the backend only has two numbers...

It looks like, when MOVE is moving messages from the local server to a remote server, they're APPENDed to the remote server, and then the APPENDUID response from the remote server is used as the COPYUID response back to the client.  This happens here: https://github.com/cyrusimap/cyrus-imapd/blob/7f17801c814e22ede72368d7dbfa8e6f4bc3f4d0/imap/imapd.c#L6698-L6707

And a similar pattern also happens in imap/imap_proxy.c.  I'm not sure which of these you're hitting, but either way, if the APPENDUID is only two values, then the COPYUID will also only be two values.

Why is the APPENDUID only two values?  Looks like it's supposed to be two values! https://datatracker.ietf.org/doc/html/rfc4315#section-3  So using it as the COPYUID response isn't quite right at all.  I've opened https://github.com/cyrusimap/cyrus-imapd/issues/4027 about this.

Cheers,

ellie

On Fri, 8 Apr 2022, at 2:16 AM, Frank Richter wrote:
Hello,
unfortunately we'e facing ongoing problems after migration from 2.4 tu 3.2.9 (first try was the 3.2.6. Debian 11 package).
Our setup: traditional murder: 2 frontends, MUPDATE, 2 backend servers.

I can reproduce bugs with MOVE when 2 different backend servers are involved – even now with Thunderbird (alpine always uses COPY then \Deleted).
The problem seems to be with MOVE.

So I disabled MOVE, and XMOVE with this in /etc/imapd.conf
suppress_capabilities: MOVE XMOVE

We're watching this now … Has anybody seen similar problems?

Thanks,
Frank

Am 24.03.22 um 14:48 schrieb Frank Richter:


Hello,
we have a traditional murder (frontend with 2 backend servers – cyrus-imapd-3.2.6-Debian-3.2.6-2+deb11u1).
We use shared folder (group namesapce).
Moving e-mails between folders on different backend servers (from backend1 to backend2) works with Thunderbird, alpine etc. With Horde Webmail there is an error, see below.


IMAP logs:


OK:                                                                             
Frontend:
<1648127917<6 UID MOVE 855056 group.fritest2
>1648127917>* OK [COPYUID 1647952540 855056 11] Completed

Backend (same source and target)
<1648127917<6 UID Move 855056 {14+}
>1648127917>* OK [COPYUID 1647952540 855056 11] Completed

NOT OK:
Frontend:
<1648127910<6 UID MOVE 855054 group.fritest
>1648127910>6 OK [COPYUID 1611826992 15] Completed

Backend (source):
<1648127910<6 Uid Fetch 855054 (Flags Internaldate)
>1648127910>* 1981 FETCH (FLAGS (\Seen $Label4 NonJunk) UID 855054 INTERNALDATE "23-Mar-2022 19:55:11 +0100")
6 OK Completed (0.000 sec)
<1648127910<PROXY2 Uid Fetch 855054 (Rfc822.peek)
>1648127910>* 1981 FETCH (UID 855054 RFC822 {3129}
Return-Path: …
PROXY2 OK Completed (0.000 sec)

Backend (target):
<1648127910<6 Append {13+}
group.fritest (\Seen $Label4 NonJunk) "23-Mar-2022 19:55:11 +0100" {3129+}
Return-Path: …
>1648127910>6 OK [APPENDUID 1611826992 15] Completed
<1648127910<Q01 LOGOUT
>1648127910>* BYE LOGOUT received
Q01 OK Completed


So the responses on COPYUID are different.

When moving between different backend servers, Horde Webmail throws warnings and errors in its log file:

2022-03-24T14:18:30 WARNING: HORDE: [imp] PHP ERROR: array_combine(): Both parameters should have an equal number of elements [pid 64686 on line 4905 of "/usr/share/pear/Horde/Imap/Client/Socket.php"]

PHP source is:


       case 'COPYUID':                                                                                                                                                                                  
            // Defined by RFC 4315
            // COPYUID: [0] = UIDVALIDITY, [1] = UIDFROM, [2] = UIDTO
            $pipeline->data['copyuid'] = array_combine(
                $this->getIdsOb($rc->data[1])->ids,
                $this->getIdsOb($rc->data[2])->ids
            );


So the IMAP client in Horde expects 3 values for COPYUID response (and doesn't handle if there are 2 values only – it throws errors in the following processing).

Is cyrus-imapd wrong in this case returning 2 values only (missing the source UID of the moved message)?



Thanks,
Frank



--
Chemnitz University of Technology, Germany


en 62 | R. B302A
09111 Chemnitz
Germany

Tel:     +49 371 531 31879
frank.richter@xxxxxxxxxxxxxxxxxx
www.tu-chemnitz.de/urz


Attachments:


[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux