6.0.0-alpha14
6/30/25

[#14800] when moving emails it doesnt appear to be set deleted flag
Summary when moving emails it doesnt appear to be set deleted flag
Queue IMP
Queue Version 6.2.21
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester simonsmith5521 (at) gmail (dot) com
Created 03/29/2018 (2650 days ago)
Due
Updated 03/31/2018 (2648 days ago)
Assigned
Resolved 03/31/2018 (2648 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/31/2018 07:09:00 PM Michael Rubinsky State ⇒ Not A Bug
Priority ⇒ 1. Low
 
03/30/2018 07:40:25 PM simonsmith5521 (at) gmail (dot) com Comment #10 Reply to this comment
a patch would be amazing!
as everything in horde works perfectly with the imap server!
not found one fault so far! (apart from the not deleting correctly)

i will look into possibly moving, but it will be tricky as i said a 
lot of data and LIVE being used 7am-7pm 365days

a simply fix i found to work was to change
isset($resp->data['copyuid'] to !isset($resp->data['copyuid']
just add an ! and it works
03/30/2018 06:54:47 PM arjen+horde (at) de-korte (dot) org Comment #9 Reply to this comment
That is a pretty minimalistic commandset your IMAP server lists. It 
*may* be possible to patch Horde to run with just this, but I doubt 
that this will give satisfactory performance.

See https://www.horde.org/apps/imp/docs/PERFORMANCE

I would opt to migrate to a more capable IMAP server. There are tools 
available to migrate from one IMAP server to another without using 
drag-and-drop. Google is your friend.
03/30/2018 12:27:14 PM simonsmith5521 (at) gmail (dot) com Comment #8 Reply to this comment
https://pastebin.com/HgFHVDDd

its the same value both BEFORE and AFTER login, unless im running the 
command wrong in telnet?
0 capability
* CAPABILITY IMAP4rev1 IDLE LITERAL+ UIDPLUS CHILDREN AUTH=PLAIN
AUTH=CRAM-MD5 AUTH=CRAM-SHA1
0 OK CAPABILITY completed.
I told you to login before sending the CAPABILITY command. If the 
above is what you get after you logged in, your IMAP server is badly 
broken.
03/30/2018 12:23:46 PM arjen+horde (at) de-korte (dot) org Comment #7 Reply to this comment
0 capability
* CAPABILITY IMAP4rev1 IDLE LITERAL+ UIDPLUS CHILDREN AUTH=PLAIN 
AUTH=CRAM-MD5 AUTH=CRAM-SHA1
0 OK CAPABILITY completed.
I told you to login before sending the CAPABILITY command. If the 
above is what you get after you logged in, your IMAP server is badly 
broken.
03/30/2018 12:06:40 PM simonsmith5521 (at) gmail (dot) com Comment #6 Reply to this comment
when the IMAP debug is enabled i can see the imap server replies with just OK

C: 4 UID COPY 4002 Deleted
S: 4 OK COPY completed.

[Show Quoted Text - 9 lines]
03/30/2018 12:01:50 PM simonsmith5521 (at) gmail (dot) com Comment #5 Reply to this comment
0 capability
* CAPABILITY IMAP4rev1 IDLE LITERAL+ UIDPLUS CHILDREN AUTH=PLAIN 
AUTH=CRAM-MD5 AUTH=CRAM-SHA1
0 OK CAPABILITY completed.

sadly i cant replace the email server as the is over 50GB of emails 
and 30 email accounts, so it would takes ages to move them all 1 by 1 
using outlook copy and paste
The MOVE command is pretty common nowadays, so I'm surprised your 
IMAP server doesn't support this. Chances are that it doesn't 
support other (more advanced like CONDSTORE/QRESYNC) IMAP commands 
either, so the best advice *may* be to switch to a more capable IMAP 
server.

What does the output of the CAPABILITY command (after logging into 
your IMAP server) show?
03/30/2018 07:20:50 AM arjen+horde (at) de-korte (dot) org Comment #4 Reply to this comment
The MOVE command is pretty common nowadays, so I'm surprised your IMAP 
server doesn't support this. Chances are that it doesn't support other 
(more advanced like CONDSTORE/QRESYNC) IMAP commands either, so the 
best advice *may* be to switch to a more capable IMAP server.

What does the output of the CAPABILITY command (after logging into 
your IMAP server) show?
03/30/2018 01:11:14 AM simonsmith5521 (at) gmail (dot) com Comment #3 Reply to this comment
i have found the problem inside imap_client_socket !

https://github.com/horde/Imap_Client/blob/FRAMEWORK_5_2/lib/Horde/Imap/Client/Socket.php#L3696

our server DOESNT support the MOVE command AND it doesnt return 
copyuid from the previous command to COPY the email to the folder

so its completely missing the command to expunge the email

is the a way i can fix this? without editing the raw php files?
03/29/2018 10:12:05 PM simonsmith5521 (at) gmail (dot) com Comment #2 Reply to this comment
------------------------------
Thu, 29 Mar 2018 22:11:29 +0000
Connection to: imap://192.168.68.xxxx/
Server connection took 0.0004 seconds.
S: * OK Welcome to mail1.xxxxx.org, with Code Crafters Ability Mail Server.
C: 1 [INITIAL CLIENT RESPONSE (username: simonsmith@xxxxx.org)]
S: +
C: 
c2ltb25zbWl0aEBmaXJzdHRydXN0aG9zcGl0YWwub3JnAHNpbW9uc21pdGhAZmlyc3R0cnVzdGhvc3BpdGFsLm9yZwBnYXR0aTU1MjE=
S: 1 OK AUTHENTICATE completed.
Command 1 took 0.0057 seconds.
CACHE: Using the Horde_Imap_Client_Cache_Backend_Cache storage driver.
C: 2 SELECT INBOX
S: * 123 EXISTS
S: * 0 RECENT
S: * FLAGS (\Seen \Answered \Deleted \Flagged \Draft $MDNSent)
S: * OK [PERMANENTFLAGS (\Seen \Answered \Deleted \Flagged \Draft 
$MDNSent)] Limited to these flags.
S: * OK [UIDNEXT 3950] Next mail UID number.
S: * OK [UIDVALIDITY 1] UIDVALIDITY value.
S: 2 OK [READ-WRITE] SELECT completed.
Command 2 took 0.0484 seconds.
C: 3 LIST "" ""
S: * LIST (\Noselect \HasChildren) "." ""
S: 3 OK LIST completed.
Command 3 took 0.047 seconds.
C: 4 UID COPY 3927 MyFolder
S: 4 OK COPY completed.
Command 4 took 0.0096 seconds.
C: 5 SEARCH UNSEEN
S: * SEARCH
S: 5 OK SEARCH completed.
Command 5 took 0.0437 seconds.
C: 6 LOGOUT
S: * BYE IMAP4rev1 Server logging out.
S: 6 OK LOGOUT completed.
Command 6 took 0.002 seconds.
03/29/2018 08:58:35 PM simonsmith5521 (at) gmail (dot) com Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ when moving emails it doesnt appear to be set deleted flag
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Im hoping this is a simply fix or maybe something im doing wrong completely!

Ive setup horde and working perfectly!

Apart from for some reason when I move an email, it says its moved the 
email to the other folder on my IMAP server, but in fact its done is 
COPY and LOGOUT

So im abit confused if I have mis-configure something somewhere or ive 
done something to, break horde?

https://pastebin.com/sK3Dj3x6 - here is a DEBUG log from out IMAP server
(its a windows based one, not linux)

The log above is actually of when i move an email to another folder 
that I created using the Horde

It just does COPY then LOGOUT ?

So when you re-fresh the page or even when I check the files on the 
IMAP server, the email is STILL in the original location ?

Saved Queries