[GH-ISSUE #158] Cannot MOVE email to another folder #127

Closed
opened 2026-02-25 21:34:14 +03:00 by kerem · 14 comments
Owner

Originally created by @neildarlow on GitHub (Dec 2, 2016).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/158

Originally assigned to: @jasonmunro on GitHub.

Running Cypht in following environment:
FreeBSD-10.3-RELEASE
nginx + PHP-5.6 (FPM)
Cyrus IMAPd 2.4.x and Postfix 3.1.x

I am able to COPY then DELETE an email but any attempt to MOVE an email results in a failure error message.

Originally created by @neildarlow on GitHub (Dec 2, 2016). Original GitHub issue: https://github.com/cypht-org/cypht/issues/158 Originally assigned to: @jasonmunro on GitHub. Running Cypht in following environment: FreeBSD-10.3-RELEASE nginx + PHP-5.6 (FPM) Cyrus IMAPd 2.4.x and Postfix 3.1.x I am able to COPY then DELETE an email but any attempt to MOVE an email results in a failure error message.
kerem 2026-02-25 21:34:14 +03:00
  • closed this issue
  • added the
    bug
    imap
    labels
Author
Owner

@jasonmunro commented on GitHub (Dec 2, 2016):

Hello!
Thanks for the feedback. I recently (12 days ago) fixed a problem with moving messages, hopefully this will fix your issue: github.com/jasonmunro/cypht@ded54fccd5

If not, let me know and we can dig into it deeper.

<!-- gh-comment-id:264591566 --> @jasonmunro commented on GitHub (Dec 2, 2016): Hello! Thanks for the feedback. I recently (12 days ago) fixed a problem with moving messages, hopefully this will fix your issue: https://github.com/jasonmunro/cypht/commit/ded54fccd59baac36526ae62bec21ea384cb0f48 If not, let me know and we can dig into it deeper.
Author
Owner

@neildarlow commented on GitHub (Dec 3, 2016):

Hi Jason,

My install was taken from Github last evening. Not sure of the commit but the comment referred to an updated German translation one day prior.

Would that commit have your recent fix in? If so, then I think it may be a different problem.

Regards,
Neil Darlow

On 2 December 2016 23:35:58 GMT+00:00, Jason Munro notifications@github.com wrote:

Hello!
Thanks for the feedback. I recently (12 days ago) fixed a problem with
moving messages, hopefully this will fix your issue:
github.com/jasonmunro/cypht@ded54fccd5

If not, let me know and we can dig into it deeper.

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/jasonmunro/cypht/issues/158#issuecomment-264591566

--
Sent from my Sony Xperia™ phone with K-9 Mail.

<!-- gh-comment-id:264652382 --> @neildarlow commented on GitHub (Dec 3, 2016): Hi Jason, My install was taken from Github last evening. Not sure of the commit but the comment referred to an updated German translation one day prior. Would that commit have your recent fix in? If so, then I think it may be a different problem. Regards, Neil Darlow On 2 December 2016 23:35:58 GMT+00:00, Jason Munro <notifications@github.com> wrote: >Hello! >Thanks for the feedback. I recently (12 days ago) fixed a problem with >moving messages, hopefully this will fix your issue: >https://github.com/jasonmunro/cypht/commit/ded54fccd59baac36526ae62bec21ea384cb0f48 > >If not, let me know and we can dig into it deeper. > >-- >You are receiving this because you authored the thread. >Reply to this email directly or view it on GitHub: >https://github.com/jasonmunro/cypht/issues/158#issuecomment-264591566 -- Sent from my Sony Xperia™ phone with K-9 Mail.
Author
Owner

@jasonmunro commented on GitHub (Dec 3, 2016):

Sounds like it is a new problem. Are you moving a message from one IMAP server to another, or on the same server? I will try to reproduce it and let you know if I find anything. Thanks again.

<!-- gh-comment-id:264653902 --> @jasonmunro commented on GitHub (Dec 3, 2016): Sounds like it is a new problem. Are you moving a message from one IMAP server to another, or on the same server? I will try to reproduce it and let you know if I find anything. Thanks again.
Author
Owner

@neildarlow commented on GitHub (Dec 3, 2016):

Hi Jason,

It was a move on the same server.

I use Cyrus IMAPd with folders configured as sub-folders of INBOX.

The move was a Spam e-mail from INBOX to INBOX/Junk.

I use / as the sub-folder delimeter not . but I believe that is acceptable. I've never had any problems with other clients.

Regards,
Neil Darlow

On 3 December 2016 17:45:07 GMT+00:00, Jason Munro notifications@github.com wrote:

Sounds like it is a new problem. Are you moving a message from one IMAP
server to another, or on the same server? I will try to reproduce it
and let you know if I find anything. Thanks again.

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/jasonmunro/cypht/issues/158#issuecomment-264653902

--
Sent from my Sony Xperia™ phone with K-9 Mail.

<!-- gh-comment-id:264657337 --> @neildarlow commented on GitHub (Dec 3, 2016): Hi Jason, It was a move on the same server. I use Cyrus IMAPd with folders configured as sub-folders of INBOX. The move was a Spam e-mail from INBOX to INBOX/Junk. I use / as the sub-folder delimeter not . but I believe that is acceptable. I've never had any problems with other clients. Regards, Neil Darlow On 3 December 2016 17:45:07 GMT+00:00, Jason Munro <notifications@github.com> wrote: >Sounds like it is a new problem. Are you moving a message from one IMAP >server to another, or on the same server? I will try to reproduce it >and let you know if I find anything. Thanks again. > >-- >You are receiving this because you authored the thread. >Reply to this email directly or view it on GitHub: >https://github.com/jasonmunro/cypht/issues/158#issuecomment-264653902 -- Sent from my Sony Xperia™ phone with K-9 Mail.
Author
Owner

@jasonmunro commented on GitHub (Dec 3, 2016):

It's likely not a problem on your end. I don't have a Cyrus setup, but I just did some moves without any issues so not sure what is wrong yet. Could you try doing the move in debug mode to see if anything pertinent is present in the PHP log? Section six here: https://cypht.org/install.html explains how to enable debug mode. If that does not provide a clue I will post a gist with some additional debug info so we can see exactly what we are telling the IMAP server, and what it's responding with.

Thanks again for the feedback and helping to troubleshoot the issue.

<!-- gh-comment-id:264659459 --> @jasonmunro commented on GitHub (Dec 3, 2016): It's likely not a problem on your end. I don't have a Cyrus setup, but I just did some moves without any issues so not sure what is wrong yet. Could you try doing the move in debug mode to see if anything pertinent is present in the PHP log? Section six here: https://cypht.org/install.html explains how to enable debug mode. If that does not provide a clue I will post a gist with some additional debug info so we can see exactly what we are telling the IMAP server, and what it's responding with. Thanks again for the feedback and helping to troubleshoot the issue.
Author
Owner

@jasonmunro commented on GitHub (Dec 3, 2016):

also, I like your avatar :)

<!-- gh-comment-id:264659475 --> @jasonmunro commented on GitHub (Dec 3, 2016): also, I like your avatar :)
Author
Owner

@neildarlow commented on GitHub (Dec 3, 2016):

OK. Enabled debug mode and Debug is shown on the action panel after logging in.

Attempted to move an e-mail from INBOX to INBOX/Junk and it failed as before but nothing logged to my PHP error log.

<!-- gh-comment-id:264661945 --> @neildarlow commented on GitHub (Dec 3, 2016): OK. Enabled debug mode and Debug is shown on the action panel after logging in. Attempted to move an e-mail from INBOX to INBOX/Junk and it failed as before but nothing logged to my PHP error log.
Author
Owner

@conspacer commented on GitHub (Dec 6, 2016):

I have mixed results with moving messages between folders on the same IMAP server. Sometimes it works, other times it times out. I am assuming issues in latency between the Cypht server and the IMAP mail server (but it does work at times).
Moving messages between servers (ala TBird style) times out 10 out of 10 times.

<!-- gh-comment-id:265197029 --> @conspacer commented on GitHub (Dec 6, 2016): I have mixed results with moving messages between folders on the same IMAP server. Sometimes it works, other times it times out. I am assuming issues in latency between the Cypht server and the IMAP mail server (but it does work at times). Moving messages between servers (ala TBird style) times out 10 out of 10 times.
Author
Owner

@jasonmunro commented on GitHub (Dec 9, 2016):

The following will output the conversation(s) with imap servers when trying to move messages: https://gist.github.com/jasonmunro/efd8611bf7cc26ad0c788df5de5018ba

You need to be running in debug mode, and the output should show up in the PHP log file. Hopefully this will provide more insight into what is going wrong.

<!-- gh-comment-id:266077554 --> @jasonmunro commented on GitHub (Dec 9, 2016): The following will output the conversation(s) with imap servers when trying to move messages: https://gist.github.com/jasonmunro/efd8611bf7cc26ad0c788df5de5018ba You need to be running in debug mode, and the output should show up in the PHP log file. Hopefully this will provide more insight into what is going wrong.
Author
Owner

@neildarlow commented on GitHub (Dec 9, 2016):

Hi Jason,

Attached is my nginx error log which contains the conversations you
might be after.

The content is a bit verbose but you can pick-out the packets of
interest I think.

Let me know if I can assist any further.

Regards,
Neil Darlow
On Fri, 2016-12-09 at 09:53 -0800, Jason Munro wrote:

The following will output the conversation(s) with imap servers when
trying to move messages: https://gist.github.com/jasonmunro/efd8611bf
7cc26ad0c788df5de5018ba
You need to be running in debug mode, and the output should show up
in the PHP log file. Hopefully this will provide more insight into
what is going wrong.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<!-- gh-comment-id:266110165 --> @neildarlow commented on GitHub (Dec 9, 2016): Hi Jason, Attached is my nginx error log which contains the conversations you might be after. The content is a bit verbose but you can pick-out the packets of interest I think. Let me know if I can assist any further. Regards, Neil Darlow On Fri, 2016-12-09 at 09:53 -0800, Jason Munro wrote: > The following will output the conversation(s) with imap servers when > trying to move messages: https://gist.github.com/jasonmunro/efd8611bf > 7cc26ad0c788df5de5018ba > You need to be running in debug mode, and the output should show up > in the PHP log file. Hopefully this will provide more insight into > what is going wrong. > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or mute the thread.
Author
Owner

@jasonmunro commented on GitHub (Dec 9, 2016):

@neildarlow, not seeing any attachment. If you are worried about posting that online feel free to send it directly to me at jason@cypht.org. Thanks!

<!-- gh-comment-id:266111913 --> @jasonmunro commented on GitHub (Dec 9, 2016): @neildarlow, not seeing any attachment. If you are worried about posting that online feel free to send it directly to me at jason@cypht.org. Thanks!
Author
Owner

@jasonmunro commented on GitHub (Dec 9, 2016):

@neildarlow thanks for sending the output, found the problem :) Your IMAP server does not support the MOVE extension (https://tools.ietf.org/html/rfc6851) and we don't have code to fallback to COPY/DELETE. Looking at adding support for that now.

<!-- gh-comment-id:266115272 --> @jasonmunro commented on GitHub (Dec 9, 2016): @neildarlow thanks for sending the output, found the problem :) Your IMAP server does not support the MOVE extension (https://tools.ietf.org/html/rfc6851) and we don't have code to fallback to COPY/DELETE. Looking at adding support for that now.
Author
Owner

@jasonmunro commented on GitHub (Dec 9, 2016):

Fix is pushed. If the move extension is not supported, we fall back to copy/delete/expunge. I'm surprised this hasn't come up before. We want to take advantage of any extensions present, but we don't want to rely on them for basic functionality.

If you could pull the latest and see if it resolves your issue, that would be great. Thanks!

<!-- gh-comment-id:266117404 --> @jasonmunro commented on GitHub (Dec 9, 2016): Fix is pushed. If the move extension is not supported, we fall back to copy/delete/expunge. I'm surprised this hasn't come up before. We want to take advantage of any extensions present, but we don't want to rely on them for basic functionality. If you could pull the latest and see if it resolves your issue, that would be great. Thanks!
Author
Owner

@jasonmunro commented on GitHub (Dec 12, 2016):

@conspacer the OP issue is resolved, but that does not explain the errors you are seeing. Any chance you could try the debug I posted and send me the results? Thanks!

<!-- gh-comment-id:266520340 --> @jasonmunro commented on GitHub (Dec 12, 2016): @conspacer the OP issue is resolved, but that does not explain the errors you are seeing. Any chance you could try the debug I posted and send me the results? Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#127
No description provided.