Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NO [CANNOT] APPEND Contains Deleted flag #420

Open
jk9112605 opened this issue Oct 31, 2023 · 4 comments
Open

NO [CANNOT] APPEND Contains Deleted flag #420

jk9112605 opened this issue Oct 31, 2023 · 4 comments
Assignees
Labels
Gmail Gmail issues Yahoo

Comments

@jk9112605
Copy link

jk9112605 commented Oct 31, 2023

Hello, I am running into APPEND errors when move my gmail to yahoo email.
I just want to move my old emails from gmail to yahoo email.
Here is my command

imapsync \
--host1 imap.gmail.com --user1 user1@gmail.com --password1 xxxxx \
--host2 imap.mail.yahoo.com --user2 user2@yahoo.com.tw --password2 yyyyy \
--exclude "\[Gmail]/&V4NXPmh2-" --errorsmax 3000 --gmail1 --automap --delete1 --expunge1 --minage 3000

I picked 3 errors shown below

- msg [Gmail]/&UWiQ6JD1TvY-/90154 {3146} could not append ( Subject:[=?UTF-8?q?Reply_to_thread_=27=5BROM=5D=5B27=2E01=2E13=5D=5B=E2=98=85=E2=98=85_SMS_=E2=98=85=E2=98=85_=5D_by_=E2=98=85_RSK_TEAM_=E2=98=85_with_AMAZE_CAM_=5BSattelite_Edition=5D=27?=], Date:["29-Jan-2013 07:14:27 +0000"], Size:[3146], Flags:[\Deleted \Seen] ) to folder &UWiQ6JD1TvY-: 245 NO [CANNOT] APPEND Contains Deleted flag
- msg [Gmail]/&UWiQ6JD1TvY-/90165 {21336} could not append ( Subject:[=?big5?B?sPKq97Bswtyzcaq+OrRJqVql/rJ5tsWo6bJ7?=], Date:["29-Jan-2013 12:37:52 +0000"], Size:[21336], Flags:[\Deleted] ) to folder &UWiQ6JD1TvY-: 246 NO [CANNOT] APPEND Contains Deleted flag
- msg [Gmail]/&UWiQ6JD1TvY-/90169 {3087} could not append ( Subject:[=?UTF-8?q?Reply_to_thread_=27=5BROM=5D=5B27=2E01=2E13=5D=5B=E2=98=85=E2=98=85_SMS_=E2=98=85=E2=98=85_=5D_by_=E2=98=85_RSK_TEAM_=E2=98=85_with_AMAZE_CAM_=5BSattelite_Edition=5D=27?=], Date:["29-Jan-2013 12:30:02 +0000"], Size:[3087], Flags:[\Deleted \Seen] ) to folder &UWiQ6JD1TvY-: 247 NO [CANNOT] APPEND Contains Deleted flag

These errors all end in "NO [CANNOT] APPEND Contains Deleted flag".
I am new here, so any help/advice would be appreciated.

@gilleslamiral gilleslamiral self-assigned this Nov 2, 2023
@gilleslamiral gilleslamiral added Gmail Gmail issues Yahoo labels Nov 2, 2023
@gilleslamiral
Copy link
Member

I suggest to not use --delete1 first.
What happens then?
Same issue?

@jk9112605
Copy link
Author

jk9112605 commented Nov 3, 2023

I suggest to not use --delete1 first. What happens then? Same issue?

No, there is no such error occured.
But I checked the log file, there is no message deleted on host1(Gmail). Please refer to the following log file.
For the line: Messages deleted on host1 : 0
Did it really "move" messages to host2? (I mean copied old messages and deleted these in host1)
I went to my gmail, it seems there are still old messages in it.
How can I truly move my old messages from host1 to host2? Thanks.

++++ Statistics
Transfer started on                     : Friday 03 November 2023-11-03 03:09:39 +0000 UTC
Transfer ended on                       : Friday 03 November 2023-11-03 03:37:01 +0000 UTC
Transfer time                           : 1641.7 sec
Folders synced                          : 21/21 synced
Messages transferred                    : 774 
Messages skipped                        : 516
Messages found duplicate on host1       : 242
Messages found duplicate on host2       : 19
Messages found crossduplicate on host2  : 236
Messages void (noheader) on host1       : 0  
Messages void (noheader) on host2       : 0
Messages found in host1 not in host2    : 0 messages
Messages found in host2 not in host1    : 8076 messages
Messages deleted on host1               : 0
Messages deleted on host2               : 0
Total bytes transferred                 : 69850329 (66.614 MiB)
Total bytes skipped                     : 60876273 (58.056 MiB)
Message rate                            : 0.5 messages/s
Average bandwidth rate                  : 41.6 KiB/s
Reconnections to host1                  : 0
Reconnections to host2                  : 0
Memory consumption at the end           : 199.3 MiB (*time 90.9 MiB*h) (started with 162.5 MiB)
Load end is                             : 0.00 0.00 0.00 1/292 on 2 cores
CPU time and %cpu                       : 13.66 sec 0.8 %cpu 0.4 %allcpus
Biggest message transferred             : 7833667 bytes (7.471 MiB)
Memory/biggest message ratio            : 26.7
Start difference host2 - host1          : 7260 messages, 2378881073 bytes (2.216 GiB)
Final difference host2 - host1          : 7278 messages, 2385225002 bytes (2.221 GiB)
The sync looks good, all 806 identified messages in host1 are on host2.
There is no unidentified message on host1.
The sync is not strict, there are 8076 among 8882 identified messages in host2 that are not on host1. Use --delete2 and sync again to delete them and have a strict sync.
Detected 0 errors
Check if a new imapsync release is available by adding --releasecheck
Homepage: https://imapsync.lamiral.info/
Exiting with return value 0 (EX_OK: successful termination) 0/30000 nb_errors/max_errors PID 77058
Removing pidfile /tmp/imapsync.pid

@jk9112605 jk9112605 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2023
@jk9112605
Copy link
Author

Sorry, closed accidently.

@jk9112605 jk9112605 reopened this Nov 3, 2023
@gilleslamiral
Copy link
Member

Deletions are special on Gmail
https://imapsync.lamiral.info/FAQ.d/FAQ.Gmail.txt
https://support.google.com/mail/answer/7401?hl=en#zippy=%2Cempty-your-trash

Q. Gmail does not really delete messages in the folder [Gmail]/All Mail
   What happens? Do you know what I can do?

R. It's true and explained in Gmail documentation at
https://support.google.com/mail/answer/7401?hl=en#zippy=%2Cempty-your-trash

To really remove messages in folder "[Gmail]/All Mail", they have to
be moved to the "Trash" folder and be deleted from "Trash".
....

There is another way with imapsync.

To remove the flags \Deleted from being synced:

https://imapsync.lamiral.info/FAQ.d/FAQ.Flags.txt
...

Windows:   imapsync.exe ... --regexflag "s/\\Deleted//gi" 
Unix:      imapsync ...     --regexflag 's/\\Deleted//gi' 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gmail Gmail issues Yahoo
Projects
None yet
Development

No branches or pull requests

2 participants