Menu

#69 in case of error, isync tries to create already existing boxes

1.4.4
fixed
None
1.5.0
5
2024-08-01
2023-01-09
plokid
No

It can't recognize remote folder already exist

▶ mbsync -a
Notice: SSLType is deprecated. Use TLSType instead.
IMAP command 'CREATE "INBOX"' returned an error: CREATE Folder exist
IMAP command 'CREATE "&V4NXPpCuTvY-"' returned an error: CREATE Folder exist
IMAP command 'CREATE "&XfJSIJZk-"' returned an error: CREATE Folder exist
IMAP command 'CREATE "&XfJT0ZAB-"' returned an error: CREATE Folder exist
IMAP command 'CREATE "&dcVr0mWHTvZZOQ-"' returned an error: CREATE Folder exist
IMAP command 'CREATE "&g0l6P3ux-"' returned an error: CREATE Folder exist
Processed 6 box(es) in 1 channel(s),
pulled 0 new message(s) and 0 flag update(s),
expunged 0 message(s) from near side,
pushed 0 new message(s) and 0 flag update(s),
expunged 0 message(s) from far side.

▶ ls
病毒文件夹  草稿箱  垃圾邮件  已发送  已删除  INBOX

here is my configuration

IMAPStore wanshiwen@yeah.net-remote
Host imap.yeah.net
Port 993
User wanshiwen@yeah.net
PassCmd "pass wanshiwen@yeah.net"
AuthMechs LOGIN
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

MaildirStore wanshiwen@yeah.net-local
Subfolders Verbatim
Path /home/ploki/.local/share/mail/wanshiwen@yeah.net/
Inbox /home/ploki/.local/share/mail/wanshiwen@yeah.net/INBOX

Channel wanshiwen@yeah.net
Expunge Both
Far :wanshiwen@yeah.net-remote:
Near :wanshiwen@yeah.net-local:
Patterns * !"[Gmail]/All Mail"
Create Both
SyncState *
MaxMessages 0
ExpireUnread no
1 Attachments

Discussion

  • Oswald Buddenhagen

    please attach (or mail me) a log from mbsync -a -D.

     
    • plokid

      plokid - 2023-01-09
       mbsync -a -D
      isync 1.5.0 called with: '-a' '-D'
      Reading configuration file /home/ploki/.mbsyncrc
      Notice: SSLType is deprecated. Use TLSType instead.
      merge ops (in Channel 'wanshiwen@yeah.net'):
        common: OP_EXPUNGE,OP_CREATE
        far: XOP_HAVE_EXPUNGE,XOP_HAVE_CREATE
        near: 
        => far: OP_EXPUNGE,OP_CREATE,XOP_HAVE_EXPUNGE,XOP_HAVE_CREATE
        => near: OP_EXPUNGE,OP_CREATE
      channel ops (wanshiwen@yeah.net):
        far: 
        near: 
      Channel wanshiwen@yeah.net
      Opening far side store wanshiwen@yeah.net-remote...
      F: [ 1] Enter connect_store
      Resolving imap.yeah.net...
      F: [ 1] Leave connect_store
      Opening near side store wanshiwen@yeah.net-local...
      N: [ 2] Enter connect_store
      N: [ 2] Callback enter connect_store, sts=0
      pattern '*' (effective '*'): Path, no INBOX
      N: [ 3] Enter list_store, flags=2
      N: [ 3] Callback enter list_store, sts=0
        病毒文件夹
        已发送
        垃圾邮件
        已删除
        草稿箱
      N: [ 3] Callback leave list_store
      N: [ 3] Leave list_store
      N: [ 2] Callback leave connect_store
      N: [ 2] Leave connect_store
      Connecting to imap.yeah.net ([2407:ae80:100:1000:123:58:178:176]:993)... 
      Connection is now encrypted
      F: * OK Coremail System IMap Server Ready(yeah[462f053f8e52ea4f04a77e3568be9a49])
      F: >>> 1 CAPABILITY
      F: * CAPABILITY IMAP4rev1 XLIST SPECIAL-USE ID LITERAL+ STARTTLS APPENDLIMIT=71680000 XAPPLEPUSHSERVICE UIDPLUS X-CM-EXT-1 SASL-IR AUTH=XOAUTH2
      F: 1 OK CAPABILITY completed
      Logging in...
      F: >>> 2 LOGIN <user> <pass>
      F: 2 OK LOGIN completed
      F: >>> 3 CAPABILITY
      F: * CAPABILITY IMAP4rev1 XLIST SPECIAL-USE ID LITERAL+ STARTTLS APPENDLIMIT=71680000 XAPPLEPUSHSERVICE UIDPLUS X-CM-EXT-1 SASL-IR AUTH=XOAUTH2
      F: 3 OK CAPABILITY completed
      F: [ 1] Callback enter connect_store, sts=0
      pattern '*' (effective '*'): Path, no INBOX
      F: [ 4] Enter list_store, flags=2
      F: >>> 4 LIST "" "*"
      F: [ 4] Leave list_store
      F: [ 1] Callback leave connect_store
      F: * LIST () "/" "INBOX"
      F: * LIST (\Drafts) "/" "&g0l6P3ux-"
      F: * LIST (\Sent) "/" "&XfJT0ZAB-"
      F: * LIST (\Trash) "/" "&XfJSIJZk-"
      F: * LIST (\Junk) "/" "&V4NXPpCuTvY-"
      F: * LIST () "/" "&dcVr0mWHTvZZOQ-"
      F: 4 OK LIST Completed
      F: [ 4] Callback enter list_store, sts=0
        病毒文件夹
        垃圾邮件
        已删除
        已发送
        草稿箱
        INBOX
      F: Called get_caps, ret=0x7
      N: Called get_caps, ret=0
      F: Enter select_box, name=INBOX
      F: Leave select_box, ret=0
      N: Enter select_box, name=INBOX
      N: Leave select_box, ret=0
      N: Called get_box_path, ret=/home/ploki/.local/share/mail/wanshiwen@yeah.net/INBOX
      Opening far side box INBOX...
      F: [ 5] Enter open_box
      F: >>> 5 SELECT "INBOX"
      F: [ 5] Leave open_box
      Opening near side box INBOX...
      N: [ 6] Enter open_box
      N: [ 6] Callback enter open_box, sts=0, uidvalidity=1673262028
      N: [ 6] Callback leave open_box
      N: [ 6] Leave open_box
      F: [ 4] Callback leave list_store
      F: 5 NO SELECT Unsafe Login. Please contact kefu@188.com for help
      F: [ 5] Callback enter open_box, sts=2
      Creating far side box INBOX...
      F: [ 7] Enter create_box
      F: >>> 6 CREATE "INBOX"
      F: [ 7] Leave create_box
      F: [ 5] Callback leave open_box
      F: 6 NO CREATE Folder exist
      IMAP command 'CREATE "INBOX"' returned an error: CREATE Folder exist
      F: [ 7] Callback enter create_box, sts=2
      F: [ 8] Enter cancel_cmds
      F: [ 8] Callback enter cancel_cmds
      F: [ 8] Callback leave cancel_cmds
      F: [ 8] Leave cancel_cmds
      N: [ 9] Enter cancel_cmds
      N: [ 9] Callback enter cancel_cmds
      F: Called get_caps, ret=0x7
      N: Called get_caps, ret=0
      F: Enter select_box, name=垃圾邮件
      F: Leave select_box, ret=0
      N: Enter select_box, name=垃圾邮件
      N: Leave select_box, ret=0
      N: Called get_box_path, ret=/home/ploki/.local/share/mail/wanshiwen@yeah.net/垃圾邮件
      Opening far side box 垃圾邮件...
      F: [ 10] Enter open_box
      F: >>> 7 SELECT "&V4NXPpCuTvY-"
      F: [ 10] Leave open_box
      Opening near side box 垃圾邮件...
      N: [ 11] Enter open_box
      N: [ 11] Callback enter open_box, sts=0, uidvalidity=1673262188
      N: [ 11] Callback leave open_box
      N: [ 11] Leave open_box
      N: [ 9] Callback leave cancel_cmds
      N: [ 9] Leave cancel_cmds
      F: [ 7] Callback leave create_box
      F: 7 NO SELECT Unsafe Login. Please contact kefu@188.com for help
      F: [ 10] Callback enter open_box, sts=2
      Creating far side box 垃圾邮件...
      F: [ 12] Enter create_box
      F: >>> 8 CREATE "&V4NXPpCuTvY-"
      F: [ 12] Leave create_box
      F: [ 10] Callback leave open_box
      F: 8 NO CREATE Folder exist
      IMAP command 'CREATE "&V4NXPpCuTvY-"' returned an error: CREATE Folder exist
      F: [ 12] Callback enter create_box, sts=2
      F: [ 13] Enter cancel_cmds
      F: [ 13] Callback enter cancel_cmds
      F: [ 13] Callback leave cancel_cmds
      F: [ 13] Leave cancel_cmds
      N: [ 14] Enter cancel_cmds
      N: [ 14] Callback enter cancel_cmds
      F: Called get_caps, ret=0x7
      N: Called get_caps, ret=0
      F: Enter select_box, name=已删除
      F: Leave select_box, ret=0
      N: Enter select_box, name=已删除
      N: Leave select_box, ret=0
      N: Called get_box_path, ret=/home/ploki/.local/share/mail/wanshiwen@yeah.net/已删除
      Opening far side box 已删除...
      F: [ 15] Enter open_box
      F: >>> 9 SELECT "&XfJSIJZk-"
      F: [ 15] Leave open_box
      Opening near side box 已删除...
      N: [ 16] Enter open_box
      N: [ 16] Callback enter open_box, sts=0, uidvalidity=1673262624
      N: [ 16] Callback leave open_box
      N: [ 16] Leave open_box
      N: [ 14] Callback leave cancel_cmds
      N: [ 14] Leave cancel_cmds
      F: [ 12] Callback leave create_box
      F: 9 NO SELECT Unsafe Login. Please contact kefu@188.com for help
      F: [ 15] Callback enter open_box, sts=2
      Creating far side box 已删除...
      F: [ 17] Enter create_box
      F: >>> 10 CREATE "&XfJSIJZk-"
      F: [ 17] Leave create_box
      F: [ 15] Callback leave open_box
      F: 10 NO CREATE Folder exist
      IMAP command 'CREATE "&XfJSIJZk-"' returned an error: CREATE Folder exist
      F: [ 17] Callback enter create_box, sts=2
      F: [ 18] Enter cancel_cmds
      F: [ 18] Callback enter cancel_cmds
      F: [ 18] Callback leave cancel_cmds
      F: [ 18] Leave cancel_cmds
      N: [ 19] Enter cancel_cmds
      N: [ 19] Callback enter cancel_cmds
      F: Called get_caps, ret=0x7
      N: Called get_caps, ret=0
      F: Enter select_box, name=已发送
      F: Leave select_box, ret=0
      N: Enter select_box, name=已发送
      N: Leave select_box, ret=0
      N: Called get_box_path, ret=/home/ploki/.local/share/mail/wanshiwen@yeah.net/已发送
      Opening far side box 已发送...
      F: [ 20] Enter open_box
      F: >>> 11 SELECT "&XfJT0ZAB-"
      F: [ 20] Leave open_box
      Opening near side box 已发送...
      N: [ 21] Enter open_box
      N: [ 21] Callback enter open_box, sts=0, uidvalidity=1673262701
      N: [ 21] Callback leave open_box
      N: [ 21] Leave open_box
      N: [ 19] Callback leave cancel_cmds
      N: [ 19] Leave cancel_cmds
      F: [ 17] Callback leave create_box
      F: 11 NO SELECT Unsafe Login. Please contact kefu@188.com for help
      F: [ 20] Callback enter open_box, sts=2
      Creating far side box 已发送...
      F: [ 22] Enter create_box
      F: >>> 12 CREATE "&XfJT0ZAB-"
      F: [ 22] Leave create_box
      F: [ 20] Callback leave open_box
      F: 12 NO CREATE Folder exist
      IMAP command 'CREATE "&XfJT0ZAB-"' returned an error: CREATE Folder exist
      F: [ 22] Callback enter create_box, sts=2
      F: [ 23] Enter cancel_cmds
      F: [ 23] Callback enter cancel_cmds
      F: [ 23] Callback leave cancel_cmds
      F: [ 23] Leave cancel_cmds
      N: [ 24] Enter cancel_cmds
      N: [ 24] Callback enter cancel_cmds
      F: Called get_caps, ret=0x7
      N: Called get_caps, ret=0
      F: Enter select_box, name=病毒文件夹
      F: Leave select_box, ret=0
      N: Enter select_box, name=病毒文件夹
      N: Leave select_box, ret=0
      N: Called get_box_path, ret=/home/ploki/.local/share/mail/wanshiwen@yeah.net/病毒文件夹
      Opening far side box 病毒文件夹...
      F: [ 25] Enter open_box
      F: >>> 13 SELECT "&dcVr0mWHTvZZOQ-"
      F: [ 25] Leave open_box
      Opening near side box 病毒文件夹...
      N: [ 26] Enter open_box
      N: [ 26] Callback enter open_box, sts=0, uidvalidity=1673262701
      N: [ 26] Callback leave open_box
      N: [ 26] Leave open_box
      N: [ 24] Callback leave cancel_cmds
      N: [ 24] Leave cancel_cmds
      F: [ 22] Callback leave create_box
      F: 13 NO SELECT Unsafe Login. Please contact kefu@188.com for help
      F: [ 25] Callback enter open_box, sts=2
      Creating far side box 病毒文件夹...
      F: [ 27] Enter create_box
      F: >>> 14 CREATE "&dcVr0mWHTvZZOQ-"
      F: [ 27] Leave create_box
      F: [ 25] Callback leave open_box
      F: 14 NO CREATE Folder exist
      IMAP command 'CREATE "&dcVr0mWHTvZZOQ-"' returned an error: CREATE Folder exist
      F: [ 27] Callback enter create_box, sts=2
      F: [ 28] Enter cancel_cmds
      F: [ 28] Callback enter cancel_cmds
      F: [ 28] Callback leave cancel_cmds
      F: [ 28] Leave cancel_cmds
      N: [ 29] Enter cancel_cmds
      N: [ 29] Callback enter cancel_cmds
      F: Called get_caps, ret=0x7
      N: Called get_caps, ret=0
      F: Enter select_box, name=草稿箱
      F: Leave select_box, ret=0
      N: Enter select_box, name=草稿箱
      N: Leave select_box, ret=0
      N: Called get_box_path, ret=/home/ploki/.local/share/mail/wanshiwen@yeah.net/草稿箱
      Opening far side box 草稿箱...
      F: [ 30] Enter open_box
      F: >>> 15 SELECT "&g0l6P3ux-"
      F: [ 30] Leave open_box
      Opening near side box 草稿箱...
      N: [ 31] Enter open_box
      N: [ 31] Callback enter open_box, sts=0, uidvalidity=1673262701
      N: [ 31] Callback leave open_box
      N: [ 31] Leave open_box
      N: [ 29] Callback leave cancel_cmds
      N: [ 29] Leave cancel_cmds
      F: [ 27] Callback leave create_box
      F: 15 NO SELECT Unsafe Login. Please contact kefu@188.com for help
      F: [ 30] Callback enter open_box, sts=2
      Creating far side box 草稿箱...
      F: [ 32] Enter create_box
      F: >>> 16 CREATE "&g0l6P3ux-"
      F: [ 32] Leave create_box
      F: [ 30] Callback leave open_box
      F: 16 NO CREATE Folder exist
      IMAP command 'CREATE "&g0l6P3ux-"' returned an error: CREATE Folder exist
      F: [ 32] Callback enter create_box, sts=2
      F: [ 33] Enter cancel_cmds
      F: [ 33] Callback enter cancel_cmds
      F: [ 33] Callback leave cancel_cmds
      F: [ 33] Leave cancel_cmds
      N: [ 34] Enter cancel_cmds
      N: [ 34] Callback enter cancel_cmds
      F: Enter free_store
      F: Leave free_store
      N: Enter free_store
      N: Leave free_store
      F: >>> 17 LOGOUT
      N: [ 34] Callback leave cancel_cmds
      N: [ 34] Leave cancel_cmds
      F: [ 32] Callback leave create_box
      F: * BYE IMAP4rev1 Server logging out
      F: 17 OK LOGOUT completed
      Processed 6 box(es) in 1 channel(s),
      pulled 0 new message(s) and 0 flag update(s),
      expunged 0 message(s) from near side,
      pushed 0 new message(s) and 0 flag update(s),
      expunged 0 message(s) from far side.
      
       
  • plokid

    plokid - 2023-01-10

    I find this is the problem of the mail service provider, sorry for waste your time.

     
    • Oswald Buddenhagen

      yeah, looks like it. but on the upside, you found a real bug in the error handling: isync should not try to create the boxes.

       
  • Oswald Buddenhagen

    • labels: utf-7 -->
    • summary: Support for utf-7 doesn't work well --> in case of error, isync tries to create already existing boxes
    • status: reported --> open
    • assigned_to: Oswald Buddenhagen
     
  • Oswald Buddenhagen

    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1 @@
    +0001-don-t-try-to-create-already-existing-boxes.patch (1.6 kB; text/x-patch)
    
     
  • Oswald Buddenhagen

    if you can still provoke the server problem, you may give the attached patch a try to see whether it improves the error handling.

     
    • shanyi

      shanyi - 2024-02-25

      After git apply 0001-don-t-try-to-create-already-existing-boxes.patch in e70c300f7446ba6ec1259f459a0f0e1d2d592ed9, I try to mbsync -aD, then

      Connecting to imap.yeah.net ([2407:ae80:100:1000:123:58:178:176]:993)...
      Connection is now encrypted
      F: * OK Coremail System IMap Server Ready(yeah[462f053f8e52ea4f04a77e3568be9a49])
      F: >>> 1 CAPABILITY
      F: * CAPABILITY IMAP4rev1 XLIST SPECIAL-USE ID LITERAL+ STARTTLS APPENDLIMIT=71680000 XAPPLEPUSHSERVICE UIDPLUS X-CM-EXT-1 SASL-IR AUTH=XOAUTH2
      F: 1 OK CAPABILITY completed
      Logging in...
      F: >>> 2 LOGIN <user> <pass>
      F: 2 OK LOGIN completed
      F: >>> 3 CAPABILITY
      F: * CAPABILITY IMAP4rev1 XLIST SPECIAL-USE ID LITERAL+ STARTTLS APPENDLIMIT=71680000 XAPPLEPUSHSERVICE UIDPLUS X-CM-EXT-1 SASL-IR AUTH=XOAUTH2
      F: 3 OK CAPABILITY completed
      F: [ 53] Callback enter connect_store, sts=0
      pattern '*' (effective '*'): Path, no INBOX
      F: [ 56] Enter list_store, flags=2
      F: >>> 4 LIST "" "*"
      F: [ 56] Leave list_store
      F: [ 53] Callback leave connect_store
      F: * LIST () "/" "INBOX"
      F: * LIST (\Drafts) "/" "&g0l6P3ux-"
      F: * LIST (\Sent) "/" "&XfJT0ZAB-"
      F: * LIST (\Trash) "/" "&XfJSIJZk-"
      F: * LIST (\Junk) "/" "&V4NXPpCuTvY-"
      F: * LIST () "/" "&dcVr0mWHTvZZOQ-"
      F: 4 OK LIST Completed
      F: [ 56] Callback enter list_store, sts=0
        病毒文件夹
        垃圾邮件
        已删除
        已发送
        草稿箱
        INBOX
      F: Called get_caps, ret=0x7
      N: Called get_caps, ret=0
      F: Enter select_box, name=INBOX
      F: Leave select_box, ret=0
      N: Enter select_box, name=INBOX
      N: Leave select_box, ret=0
      N: Called get_box_path, ret=/Users/xxx/Mail/163account1/INBOX
      Opening far side box INBOX...
      F: [ 57] Enter open_box
      F: >>> 5 SELECT "INBOX"
      F: [ 57] Leave open_box
      Opening near side box INBOX...
      N: [ 58] Enter open_box
      N: [ 58] Callback enter open_box, sts=0, uidvalidity=1708802162
      N: [ 58] Callback leave open_box
      N: [ 58] Leave open_box
      F: [ 56] Callback leave list_store
      F: 5 NO SELECT Unsafe Login. Please contact kefu@188.com for help
      F: [ 57] Callback enter open_box, sts=2
      Error: channel 163account1: far side box INBOX cannot be opened.
      F: [ 59] Enter cancel_cmds
      F: [ 59] Callback enter cancel_cmds
      F: [ 59] Callback leave cancel_cmds
      F: [ 59] Leave cancel_cmds
      N: [ 60] Enter cancel_cmds
      N: [ 60] Callback enter cancel_cmds
      F: Called get_caps, ret=0x7
      N: Called get_caps, ret=0
      F: Enter select_box, name=垃圾邮件
      F: Leave select_box, ret=0
      N: Enter select_box, name=垃圾邮件
      N: Leave select_box, ret=0
      N: Called get_box_path, ret=/Users/xxx/Mail/163account1/垃圾邮件
      Opening far side box 垃圾邮件...
      F: [ 61] Enter open_box
      F: >>> 6 SELECT "&V4NXPpCuTvY-"
      F: [ 61] Leave open_box
      Opening near side box 垃圾邮件...
      N: [ 60] Callback leave cancel_cmds
      N: [ 60] Leave cancel_cmds
      F: [ 57] Callback leave open_box
      F: 6 NO SELECT Unsafe Login. Please contact kefu@188.com for help
      F: [ 61] Callback enter open_box, sts=2
      Error: channel 163account1: far side box 垃圾邮件 cannot be opened.
      
       
      • Oswald Buddenhagen

        thanks for testing. this looks about right.

         
  • shanyi

    shanyi - 2024-02-24

    The same problem exists here. #73

    “NO SELECT Unsafe Login. Please contact kefu@188.com for help”

     
  • Oswald Buddenhagen

    • status: open --> fixed
    • Fixed In: unknown --> 1.5.0
     
  • Oswald Buddenhagen

    fixed in master in commit 84194a7a.

     

Log in to post a comment.