Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Error in search mailbox differences #73

Open
Hubbitus opened this issue Feb 15, 2015 · 0 comments
Open

Error in search mailbox differences #73

Hubbitus opened this issue Feb 15, 2015 · 0 comments

Comments

@Hubbitus
Copy link

I have tried copy IMAP folders from Dovecot server to GMail. And search software what could do it reliably. Gilles Lamiral - author of imapsync recommend me try larch. But I may constatate what perhaps there also some bugs present.

I provide 2 small reproduce examples with full message sources.

Base run command:

$ cat run
#!/bin/bash

rm -rf ~/.larch

larch \ 
        --from imaps://$( cat .account.1.host )  --from-folder test.bug_2 --from-pass $( cat .account.1.pass ) --from-user $( cat .account.1.user ) \
        --to   imaps://$( cat .account.2.host )  --to-folder   test/bug_2 --to-pass   $( cat .account.2.pass ) --to-user   $( cat .account.2.user ) \
        --all --expunge --sync-flags \
        --verbosity debug
  1. First, try copy folder test.bug_1 with single message http://fpaste.org/185813/:
    1.1) first run:
[23:05:02] [debug] [<] connecting...
[23:05:02] [info] [<] connected to mail.spb.ant-inform.ru on port 993 using SSL
[23:05:02] [debug] [<] authenticating using PLAIN
[23:05:03] [debug] [<] authenticated using PLAIN
[23:05:03] [debug] [<] updating mailboxes
[23:06:29] [debug] [>] connecting...
[23:06:29] [info] [>] connected to imap.googlemail.com on port 993 using SSL
[23:06:29] [debug] [>] looks like Gmail
[23:06:29] [debug] [>] authenticating using PLAIN
[23:06:29] [debug] [>] authenticated using PLAIN
[23:06:29] [debug] [>] updating mailboxes
[23:21:22] [info] [>] creating mailbox: test/bug_1
[23:21:23] [debug] [>] updating mailboxes
[23:25:18] [info] mail.spb.ant-inform.ru/test.bug_1 -> imap.googlemail.com/test/bug_1
[23:25:18] [debug] [<] test.bug_1: getting mailbox status
[23:25:18] [debug] [<] test.bug_1: examining mailbox
[23:25:19] [info] [<] test.bug_1: fetching message headers 1 through 1...
[23:25:19] [debug] [>] test/bug_1: getting mailbox status
[23:25:19] [debug] [<] test.bug_1: peeking at message: 47d22bb80395bd9b249b8ff6dddc9fa5
[23:25:19] [info] [>] copying uid 1: admin@spb.ant-inform.ru - quota warning
[23:25:19] [debug] [>] test/bug_1: selecting mailbox
[23:25:20] [debug] [>] test/bug_1: appending message: 47d22bb80395bd9b249b8ff6dddc9fa5
[23:25:22] [debug] [<] expunging deleted messages
[23:25:22] [debug] [<] test.bug_1: selecting mailbox
[23:25:22] [debug] [<] test.bug_1: expunging deleted messages
[23:25:23] [info] [<] disconnected
[23:25:23] [info] [>] disconnected
[23:25:23] [info] 1 message(s) copied, 0 failed, 0 deleted out of 1 total
[23:25:23] [debug] performing database maintenance

What interesting - I assume it copy absolutely different message, but by log it seems correct. For exclude some caching issue I have delete ~/.larch each time as you may see in script.

1.2) subsequent run:

[23:41:36] [debug] [<] connecting...
[23:41:37] [info] [<] connected to mail.spb.ant-inform.ru on port 993 using SSL
[23:41:37] [debug] [<] authenticating using PLAIN
[23:41:37] [debug] [<] authenticated using PLAIN
[23:41:37] [debug] [<] updating mailboxes
[23:43:01] [debug] [>] connecting...
[23:43:01] [info] [>] connected to imap.googlemail.com on port 993 using SSL
[23:43:01] [debug] [>] looks like Gmail
[23:43:01] [debug] [>] authenticating using PLAIN
[23:43:01] [debug] [>] authenticated using PLAIN
[23:43:01] [debug] [>] updating mailboxes
[23:58:10] [info] mail.spb.ant-inform.ru/test.bug_1 -> imap.googlemail.com/test/bug_1
[23:58:10] [debug] [<] test.bug_1: getting mailbox status
[23:58:11] [debug] [<] test.bug_1: examining mailbox
[23:58:11] [info] [<] test.bug_1: fetching message headers 1 through 1...
[23:58:11] [debug] [>] test/bug_1: getting mailbox status
[23:58:12] [debug] [>] test/bug_1: examining mailbox
[23:58:12] [info] [>] test/bug_1: fetching message headers 1 through 1...
[23:58:12] [debug] [<] test.bug_1: peeking at message: 47d22bb80395bd9b249b8ff6dddc9fa5
[23:58:12] [info] [>] copying uid 1: admin@spb.ant-inform.ru - quota warning
[23:58:12] [debug] [>] test/bug_1: selecting mailbox
[23:58:12] [debug] [>] test/bug_1: appending message: 47d22bb80395bd9b249b8ff6dddc9fa5
[23:58:14] [debug] [<] expunging deleted messages
[23:58:15] [debug] [<] test.bug_1: selecting mailbox
[23:58:15] [debug] [<] test.bug_1: expunging deleted messages
[23:58:15] [info] [<] disconnected
[23:58:15] [info] [>] disconnected
[23:58:15] [info] 1 message(s) copied, 0 failed, 0 deleted out of 1 total
[23:58:15] [debug] performing database maintenance

That message copied again and again…

Please note I use --verbosity debug option and it give very small amount of information to understand what really happened.

Hubbitus added a commit to Hubbitus/ImapTree that referenced this issue Feb 18, 2015
2) Add cache config section.
3) Add log.imapdebug option to enable JavaMail debug output.
4) Change file pattern of logging to the same as in output used.
5) Bug of copy reproduced in test.bug_1, test.bug_2. Mailed to Giles.
Reported new Larch bug: rgrove/larch#73
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant