Archive or moving messages between IMAP Accounts

Hi!

I am having an issue with evolution when trying to archive or move messages between IMAP accounts. I habe Account 1 where I am getting short on storage but i have to archive every message. I want to move or use archive feature to move or archive the selected emails to Account 2 Archive folder.

As an example how to reproduce Error

Set two email IMAP accounts. Set on Account 1 archive folder from Account 2. Use Archive or Move on any message.

Error:

Błąd podczas „Przenoszenie wiadomości do „folder://24575c897b27760705f2bb936d6cf98d5fc31d98/Archives/2022””.

Błąd podczas dołączania wiadomości: Error in IMAP command received by server.

[On Polish says that Error "when moving message to folder (…)]

BUT if i select a message from Account 2 an use Archive Feature [Folder on Account 2] it works as designed. It archives message where it should be.

I was using Thunderbird earlier where archive between IMAP accounts or moving mails between accounts was working. Due to poor performance on TB i moved to Evolution. Just this one feature is not working properly.

I am using Evolution v. 3.36.5-ubuntu1 on Linux Mint 20.3 x86_64.

Thank You for help! Please excuse my English! Kind Regards from Poland.

Hi,
you’ve been too quick on the IRC, I noticed your question about
30 minutes after you left. IRC is not exact instant messaging, at least
for me, when I check it only sometimes. Not a problem, just an
unrelated note.

I am having an issue with evolution when trying to archive or move
messages between IMAP accounts.

The Archiving function is effectively a move-to-preselected-folder,
thus you should have consistent behavior regardless you use Archive or
Move to Folder functions, as long as Archive just moves the message.

When moving between two distinct accounts, the code appends the message
to the destination folder and then deletes it from the source folder.
There can be done “shortcuts” only within a single account and when the
server supports certain IMAP extension.

Could you run Evolution from a terminal like this:

$ CAMEL_DEBUG=imapx:io evolution

then wait until the output on the terminal stops adding (it logs for
all your IMAP accounts), then mark this place in the terminal and then
move a message to that destination folder of the other account, please?
The added output in the terminal contains the interesting data, which
will show what had been sent to the server and what the server
returned. Be careful when sharing the part of the log, it contains raw
communication between the server and the libcamel (a library Evolution
uses for the Mail). Some parts can be encoded, not readable by the
humans, but then can be decoded by the machine, thus do not share
anything you cannot read. The log can contain also the message content
you’ll move to the other server - there’s no need to share it, you can
remove the related portion of it.

I think the log will also contain the error message you see in the GUI,
aka that “Error in IMAP command received by server”, but I can be
wrong.

I tried it here and I can move messages between two IMAP accounts with
no problem, by drag & drop. I’m on the current development version
though, thus after the 3.47.2 release. I’m pretty sure any 3.46.x
version will behave the same as the development version in this regard.

Bye,
Milan

Hello Milan,

thank you for looking into my problem!

Here is the code that you was asking for:

[imapx:A] I/O: '+ entering idle mode'
[imapx:A] I/O: '+ idling'
[imapx:A] I/O: ''
[imapx:A] I/O: 'DONE'
[imapx:A] I/O: ''
[imapx:A] I/O: 'A00071 OK IDLE completed.'
[imapx:A] I/O: 'A00073 SELECT Archives/2021'
[imapx:A] I/O: '* 2041 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
A00073 OK [READ-WRITE] SELECT completed.'
[imapx:A] I/O: 'A00074 APPEND Archives/2021 (\SEEN NonJunk) "14-Jan-2021 14:25:29 +0000" {2013389}'
[imapx:A] I/O: 'A00074 NO Error in IMAP command received by server.'
[imapx:A] I/O: 'A00075 SELECT INBOX'
[imapx:A] I/O: '* 1491 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
A00075 OK [READ-WRITE] SELECT completed.'
[imapx:A] I/O: 'A00076 IDLE'
[imapx:A] I/O: '+ entering idle mode'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* BYE Closing connection because of long inactivity.'
[imapx:A] I/O: ''
[imapx:A] I/O: '* OK Still here'

I used the option → left click on message → in dropdown menu “Archive”.

To compare i tried to archive a message from another account. Same method

[imapx:A] I/O: '+ idling'
[imapx:A] I/O: ''
[imapx:A] I/O: 'DONE'
[imapx:A] I/O: ''
[imapx:A] I/O: 'A00071 OK IDLE completed.'
[imapx:A] I/O: 'A00073 SELECT Archives/2021'
[imapx:A] I/O: '* 2041 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
A00073 OK [READ-WRITE] SELECT completed.'
[imapx:A] I/O: 'A00074 APPEND Archives/2021 (\SEEN NonJunk) "14-Jan-2021 14:25:29 +0000" {2013389}'
[imapx:A] I/O: 'A00074 NO Error in IMAP command received by server.'
[imapx:A] I/O: 'A00075 SELECT INBOX'
[imapx:A] I/O: '* 1491 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
A00075 OK [READ-WRITE] SELECT completed.'
[imapx:A] I/O: 'A00076 IDLE'
[imapx:A] I/O: '+ entering idle mode'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* BYE Closing connection because of long inactivity.'
[imapx:A] I/O: ''
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: ''
[imapx:A] I/O: 'DONE'
[imapx:A] I/O: ''
[imapx:A] I/O: 'A00072 OK Idle completed (416.173 + 416.173 + 416.172 secs).'
[imapx:A] I/O: 'A00077 UID FETCH 9179 (BODY.PEEK[])'
[imapx:A] I/O: '* 1 FETCH (UID 9179 BODY[] {267264}


[I REMOVED THE UNREADABLE CONTENT]


[imapx:A] I/O: ')
A00077 OK Fetch completed (0.006 + 0.000 + 0.005 secs).'
[imapx:B] I/O: 'B00080 SELECT Archives/2021'
[imapx:B] I/O: '* BYE Closing connection because of long inactivity.'
[imapx:B] I/O: 'B00081 APPEND Archives/2021 (\FLAGGED \SEEN NonJunk $Label3) "16-Jan-2021 17:07:24 +0000" {267354}'
[imapx:B] I/O: ''
[imapx:B] I/O: ''
[imapx:C] I/O: '* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN] IMAP4 ready.'
[imapx:C] I/O: 'C00082 LOGIN ...'
[imapx:C] I/O: 'C00082 OK Success.'
[imapx:C] I/O: 'C00083 CAPABILITY'
[imapx:C] I/O: '* CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN
C00083 OK CAPABILITY completed.'
[imapx:C] I/O: 'C00084 NAMESPACE'
[imapx:C] I/O: '* NAMESPACE (("" "/")) NIL NIL
C00084 OK NAMESPACE completed.'
[imapx:C] I/O: 'C00085 SELECT Archives/2021'
[imapx:C] I/O: '* 2041 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
C00085 OK [READ-WRITE] SELECT completed.'
[imapx:C] I/O: 'C00086 APPEND Archives/2021 (\FLAGGED \SEEN NonJunk $Label3) "16-Jan-2021 17:07:24 +0000" {267354}'
[imapx:C] I/O: 'C00086 NO Error in IMAP command received by server.'
[imapx:C] I/O: 'C00087 SELECT INBOX'
[imapx:A] I/O: 'A00088 IDLE'
[imapx:A] I/O: '+ idling'
[imapx:C] I/O: '* 1491 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
C00087 OK [READ-WRITE] SELECT completed.'
[imapx:C] I/O: 'C00089 IDLE'
[imapx:C] I/O: '+ entering idle mode'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'

I tried to move the message to archive folder. Here the code:

[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: ''
[imapx:A] I/O: 'DONE'
[imapx:A] I/O: ''
[imapx:A] I/O: 'A00070 OK Idle completed (987.361 + 987.360 + 987.360 secs).'
[imapx:A] I/O: 'A00090 UID FETCH 2594 (BODY.PEEK[])'
[imapx:A] I/O: '* 6 FETCH (UID 2594 BODY[] {11888}'
[imapx:A] I/O: 'Return-Path: <Schatz-Evi@web.de>

[I REMOVED THE UNREADABLE CONTENT]

[imapx:A] I/O: ')
A00090 OK Fetch completed (0.015 + 0.000 + 0.014 secs).'
[imapx:D] I/O: '* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN] IMAP4 ready.'
[imapx:D] I/O: 'D00093 LOGIN ...'
[imapx:D] I/O: 'D00093 OK Success.'
[imapx:D] I/O: 'D00094 CAPABILITY'
[imapx:D] I/O: '* CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN
D00094 OK CAPABILITY completed.'
[imapx:D] I/O: 'D00095 NAMESPACE'
[imapx:D] I/O: '* NAMESPACE (("" "/")) NIL NIL
D00095 OK NAMESPACE completed.'
[imapx:D] I/O: 'D00096 SELECT Archives/2021'
[imapx:D] I/O: '* 2041 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
D00096 OK [READ-WRITE] SELECT completed.'
[imapx:D] I/O: 'D00097 APPEND Archives/2021 (\FLAGGED \SEEN NonJunk $Label1) "16-Jan-2021 09:05:53 +0000" {11957}'
[imapx:D] I/O: 'D00097 NO Error in IMAP command received by server.'
[imapx:A] I/O: 'A00098 IDLE'
[imapx:A] I/O: '+ idling'

Here the code when I try to use achive folder [not subfolder like 2021 or 2020].

[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: ''
[imapx:A] I/O: 'DONE'
[imapx:A] I/O: ''
[imapx:A] I/O: 'A00070 OK Idle completed (987.361 + 987.360 + 987.360 secs).'
[imapx:A] I/O: 'A00090 UID FETCH 2594 (BODY.PEEK[])'
[imapx:A] I/O: '* 6 FETCH (UID 2594 BODY[] {11888}'
[imapx:A] I/O: 'Return-Path: <Schatz-Evi@web.de>

[I REMOVED THE UNREADABLE CONTENT]

A00090 OK Fetch completed (0.015 + 0.000 + 0.014 secs).'
[imapx:D] I/O: '* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN] IMAP4 ready.'
[imapx:D] I/O: 'D00093 LOGIN ...'
[imapx:D] I/O: 'D00093 OK Success.'
[imapx:D] I/O: 'D00094 CAPABILITY'
[imapx:D] I/O: '* CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN
D00094 OK CAPABILITY completed.'
[imapx:D] I/O: 'D00095 NAMESPACE'
[imapx:D] I/O: '* NAMESPACE (("" "/")) NIL NIL
D00095 OK NAMESPACE completed.'
[imapx:D] I/O: 'D00096 SELECT Archives/2021'
[imapx:D] I/O: '* 2041 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
D00096 OK [READ-WRITE] SELECT completed.'
[imapx:D] I/O: 'D00097 APPEND Archives/2021 (\FLAGGED \SEEN NonJunk $Label1) "16-Jan-2021 09:05:53 +0000" {11957}'
[imapx:D] I/O: 'D00097 NO Error in IMAP command received by server.'
[imapx:A] I/O: 'A00098 IDLE'
[imapx:A] I/O: '+ idling'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:A] I/O: '* OK Still here'
[imapx:D] I/O: 'D00099 SELECT Archives'
[imapx:D] I/O: '* BYE Closing connection because of long inactivity.'
[imapx:D] I/O: 'D00100 APPEND Archives (\ANSWERED \FLAGGED \SEEN NonJunk $Label2) "14-Jan-2021 12:30:08 +0000" {1264629}'
[imapx:D] I/O: ''
[imapx:D] I/O: ''
[imapx:E] I/O: '* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN] IMAP4 ready.'
[imapx:E] I/O: 'E00101 LOGIN ...'
[imapx:E] I/O: 'E00101 OK Success.'
[imapx:E] I/O: 'E00102 CAPABILITY'
[imapx:E] I/O: '* CAPABILITY IMAP4rev1 UIDPLUS CHILDREN ID XLIST NAMESPACE IDLE AUTH=PLAIN
E00102 OK CAPABILITY completed.'
[imapx:E] I/O: 'E00103 NAMESPACE'
[imapx:E] I/O: '* NAMESPACE (("" "/")) NIL NIL
E00103 OK NAMESPACE completed.'
[imapx:E] I/O: 'E00104 SELECT Archives'
[imapx:E] I/O: '* 1 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent $Forwarded)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen $Forwarded)] Limited
* OK [UIDVALIDITY 1] UIDVALIDITY value
E00104 OK [READ-WRITE] SELECT completed.'
[imapx:E] I/O: 'E00105 APPEND Archives (\ANSWERED \FLAGGED \SEEN NonJunk $Label2) "14-Jan-2021 12:30:08 +0000" {1264629}'
[imapx:E] I/O: 'E00105 NO Error in IMAP command received by server.'

I hope this will help!


[imapx:B] I/O: ‘* BYE Closing connection because of long inactivity.’
[imapx:B] I/O: ‘B00081 APPEND Archives/2021 (\FLAGGED \SEEN NonJunk
$Label3) “16-Jan-2021 17:07:24 +0000” {267354}’

… reconnecting to the server …

[imapx:C] I/O: ‘C00086 APPEND Archives/2021 (\FLAGGED \SEEN NonJunk
$Label3) “16-Jan-2021 17:07:24 +0000” {267354}’
[imapx:C] I/O: ‘C00086 NO Error in IMAP command received by server.’

Hi,

thanks for the update. I quoted above the two parts, which are
interesting in all your logs/situations. The first is the * BYE
untagged response. Your server seems to be setup to be pinged more
often times. I cannot tell what timeout they have set, but you can
tweak it with automatic update interval in the account
Properties->Receiving Options tab. I do not think it has any influence
here, the command realized the problem, reconnected and tried again.

The server rejected the Append with the error you see in the GUI, aka
with “Error in IMAP command received by server.”. This is common for
all your tries.

I tried to copy a message from a different account to a Gmail account
and it accepts it with no error:

[imapx:A] I/O: ‘A00012 APPEND INBOX/test/test2 () “12-Jan-2023
14:00:39 +0000” {9836}’
[imapx:A] I/O: ‘+ go ahead’
{message content}
[imapx:A] I/O: ‘’
[imapx:A] I/O: ‘* 32 EXISTS
A00012 OK [APPENDUID 28 41] (Success)’

The “+ go ahead” is returned by the Gmail server, confirming it’s
awaiting the message data. This works fine for many servers, and for a
long time, it would be weird if all the servers ignored some typo in
the command except of that yours.

Both the flags and the date/time string are optional, but libcamel
writes there both. I checked in RFC 9051: Internet Message Access Protocol (IMAP) - Version 4rev2
(which seems pretty the same as in the 4rev1 RFFC:
RFC 3501: INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 ), that the
format of the date or the flags is correct, which makes me thing that
the problem is not with the libcamel, but with the server you connect
to. I’d try to ask the admins of it to check what can be wrong, a more
detailed information about the reason would help a lot.

As a summary, there is some problem wit the server. Ideally ask the
server admins what can be wrong.

Bye,
Milan

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.