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

folder not synced with Davmail #485

Closed
einlandarzt opened this Issue Jul 4, 2017 · 24 comments

Comments

Projects
None yet
2 participants
@einlandarzt

einlandarzt commented Jul 4, 2017

General informations

  • system/distribution (with version):
    Ubuntu 17.04
  • offlineimap version (offlineimap -V):
    7.0.12
  • Python version:
    2.7.13
  • server name or domain:
    mail.campus.unibe.ch
  • CLI options:

Configuration file offlineimaprc

[general]
accounts = unibe
ssl = no
maxsyncaccounts = 1

[Account unibe]
localrepository = unibe-local
remoterepository = unibe-remote
status_backend = sqlite

[Repository unibe-local]
type = Maildir
localfolders = ~/mail/unibe

[Repository unibe-remote]
type = IMAP
remotehost = localhost
remoteuser = redacted
remotepass = redacted
remoteport = 1143
ssl = no
~

pythonfile (if any)

Logs, error

Steps to reproduce the error

offlineimap -a unibe -f Archive

Folder Archive contains thousands of messages on the server, none of which are synced.

@nicolas33 nicolas33 added the question label Jul 4, 2017

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

The -f Archive CLI option makes subfolders to be ignored. -f Archives is about syncing Archives only, not Archives/foo or Archives/sub.

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

Yes, but there are no subfolder in "Archive"; it's about all the messages in the folder "Archive" that are not synced. So maybe my wording was imprecise, it's not about subfolders not being synced, but about a folder, "Archive", that isn't synced. Thanks

@nicolas33 nicolas33 changed the title from Subfolder not synced with Outlook to folder not synced with Outlook Jul 4, 2017

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

Could you provide the output of offlineimap -a unibe -f Archive -d imap?

Are you sure the folder is Archive and not INBOX/Archive?

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

I am indeed. Also, the folder was automatically created locally when I first ran offlineimap, so the remote folder structure was actually replicated. Missing are the messages.
Btw, the same is true for the Sent-folder. It had been created, but no messages have been synced.

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

OfflineIMAP 7.0.12
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
Debug mode: Forcing to singlethreaded.
Now debugging for imap: IMAP protocol debugging
Now debugging for : Other offlineimap related sync messages
Account sync unibe:
[imap]: Using authentication mechanisms ['GSSAPI', 'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
*** Processing account unibe
Establishing connection to localhost:1143 (unibe-remote)
[imap]: Attempting LOGIN authentication
[imap]: Attempting IMAP LOGIN authentication
[]: Filtering out 'Trash'[unibe-remote] due to folderfilter
[]: Filtering out 'Drafts'[unibe-remote] due to folderfilter
[]: Filtering out 'INBOX'[unibe-remote] due to folderfilter
[]: Filtering out 'Junk'[unibe-remote] due to folderfilter
[]: Filtering out 'Unsent Messages'[unibe-remote] due to folderfilter
[]: Filtering out 'Sent'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Konflikte'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Lokale Fehler'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Serverfehler'[unibe-remote] due to folderfilter
[]: Copying folder structure from unibe-remote to unibe-local
Syncing Archive: IMAP -> Maildir
Loading message list for Maildir[Archive]
Message list for Maildir[Archive] loaded: 0 messages
Loading message list for IMAP[Archive]
Syncing messages IMAP[Archive] -> Maildir[Archive]
Syncing messages Maildir[Archive] -> IMAP[Archive]
[]: Not syncing filtered folder 'Drafts'[unibe-remote]
[]: Not syncing filtered folder 'INBOX'[unibe-remote]
[]: Not syncing filtered folder 'Junk'[unibe-remote]
[]: Not syncing filtered folder 'Sent'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Konflikte'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Lokale Fehler'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Serverfehler'[unibe-remote]
[]: Not syncing filtered folder 'Trash'[unibe-remote]
[]: Not syncing filtered folder 'Unsent Messages'[unibe-remote]
*** Finished account 'unibe' in 0:23

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

Do you have the same results with v7.1.1?

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

I don't know, haven't tried. I installed via apt-get and Ubuntu 17.04.

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

It's possible to install offlineimap as a user: remove the currently installed offlineimap and download the zip (or git clone the repository). Then ./offlineimap.py [options].

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

Just tried v7.1.1, the problem is still present.

nicolas33 added a commit to nicolas33/offlineimap that referenced this issue Jul 4, 2017

IMAP: debug: show the loaded messages even when no messages are found
Github-ref: OfflineIMAP#485
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>

nicolas33 added a commit to nicolas33/offlineimap that referenced this issue Jul 4, 2017

folder/IMAP: debug: provide more info while looking for messages
OfflineIMAP#485
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

Please, try this patched version: 520a3b0 with -d imap. We should get more info.

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

OfflineIMAP 7.1.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.55 (system), Python v2.7.13, OpenSSL 1.0.2g 1 Mar 2016
Debug mode: Forcing to singlethreaded.
Now debugging for imap: IMAP protocol debugging
Now debugging for : Other offlineimap related sync messages
Account sync unibe:
[imap]: Using authentication mechanisms ['GSSAPI', 'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
*** Processing account unibe
Establishing connection to localhost:1143 (unibe-remote)
[imap]: Attempting LOGIN authentication
[imap]: Attempting IMAP LOGIN authentication
[]: Filtering out 'Trash'[unibe-remote] due to folderfilter
[]: Filtering out 'Drafts'[unibe-remote] due to folderfilter
[]: Filtering out 'INBOX'[unibe-remote] due to folderfilter
[]: Filtering out 'Junk'[unibe-remote] due to folderfilter
[]: Filtering out 'Unsent Messages'[unibe-remote] due to folderfilter
[]: Filtering out 'Sent'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Konflikte'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Lokale Fehler'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Serverfehler'[unibe-remote] due to folderfilter
[]: Copying folder structure from unibe-remote to unibe-local
Syncing Archive: IMAP -> Maildir
Loading message list for Maildir[Archive]
Message list for Maildir[Archive] loaded: 0 messages
Loading message list for IMAP[Archive]
[imap]: [unibe-remote]Archive: _msgs_to_fetch(): min_date None, min_uid None
[imap]: [unibe-remote]Archive: _msgs_to_fetch: folder looks empty
Message list for IMAP[Archive] loaded: 0 messages
Syncing messages IMAP[Archive] -> Maildir[Archive]
Syncing messages Maildir[Archive] -> IMAP[Archive]
[]: Not syncing filtered folder 'Drafts'[unibe-remote]
[]: Not syncing filtered folder 'INBOX'[unibe-remote]
[]: Not syncing filtered folder 'Junk'[unibe-remote]
[]: Not syncing filtered folder 'Sent'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Konflikte'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Lokale Fehler'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Serverfehler'[unibe-remote]
[]: Not syncing filtered folder 'Trash'[unibe-remote]
[]: Not syncing filtered folder 'Unsent Messages'[unibe-remote]
*** Finished account 'unibe' in 0:23

nicolas33 added a commit to nicolas33/offlineimap that referenced this issue Jul 4, 2017

folder/IMAP: debug: provide more info while looking for messages
OfflineIMAP#485
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

Ok, we get [imap]: [unibe-remote]Archive: _msgs_to_fetch: folder looks empty, so the SELECT IMAP command seems to pretend there is no message.

Please, try the d14406f version so we show the returned response from the server.

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

OfflineIMAP 7.1.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.55 (system), Python v2.7.13, OpenSSL 1.0.2g 1 Mar 2016
Debug mode: Forcing to singlethreaded.
Now debugging for imap: IMAP protocol debugging
Now debugging for : Other offlineimap related sync messages
Account sync unibe:
[imap]: Using authentication mechanisms ['GSSAPI', 'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
*** Processing account unibe
Establishing connection to localhost:1143 (unibe-remote)
[imap]: Attempting LOGIN authentication
[imap]: Attempting IMAP LOGIN authentication
[]: Filtering out 'Trash'[unibe-remote] due to folderfilter
[]: Filtering out 'Drafts'[unibe-remote] due to folderfilter
[]: Filtering out 'INBOX'[unibe-remote] due to folderfilter
[]: Filtering out 'Junk'[unibe-remote] due to folderfilter
[]: Filtering out 'Unsent Messages'[unibe-remote] due to folderfilter
[]: Filtering out 'Sent'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Konflikte'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Lokale Fehler'[unibe-remote] due to folderfilter
[]: Filtering out 'Synchronisierungsprobleme/Serverfehler'[unibe-remote] due to folderfilter
[]: Copying folder structure from unibe-remote to unibe-local
Syncing Archive: IMAP -> Maildir
Loading message list for Maildir[Archive]
Message list for Maildir[Archive] loaded: 0 messages
Loading message list for IMAP[Archive]
[imap]: [unibe-remote]Archive: _msgs_to_fetch(): min_date None, min_uid None
[imap]: [unibe-remote]Archive: _msgs_to_fetch(): res_type is ''OK'', imapdata is '[None]'
[imap]: [unibe-remote]Archive: _msgs_to_fetch(): folder looks empty
Message list for IMAP[Archive] loaded: 0 messages
Syncing messages IMAP[Archive] -> Maildir[Archive]
Syncing messages Maildir[Archive] -> IMAP[Archive]
[]: Not syncing filtered folder 'Drafts'[unibe-remote]
[]: Not syncing filtered folder 'INBOX'[unibe-remote]
[]: Not syncing filtered folder 'Junk'[unibe-remote]
[]: Not syncing filtered folder 'Sent'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Konflikte'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Lokale Fehler'[unibe-remote]
[]: Not syncing filtered folder 'Synchronisierungsprobleme/Serverfehler'[unibe-remote]
[]: Not syncing filtered folder 'Trash'[unibe-remote]
[]: Not syncing filtered folder 'Unsent Messages'[unibe-remote]
*** Finished account 'unibe' in 0:24

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

That's weird. The server pretends there is no email in this folder.

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

Weird. The folder is full of messages, they are accessible from webmail (can show you a screenshot).

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

I wonder this is because the Archive folder is marked \Archive special folder so the server does not expose the messages in the SELECT command.

A workaround could be to disable the special \Archive meaning on the server (if possible) or to duplicate/move the content to another folder.

@nicolas33 nicolas33 added bug Microsoft and removed question labels Jul 4, 2017

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

Hm, I actually have the same issue with the Sent-folder (and all other folders), so I'm not sure about this suggestion. Currently, the only folder that is correctly synced is Inbox.

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

Another workaround might be to use Davmail. We have recent changes to improve support of Davmail in the current next branch. Patches will be included in the next release planned to this week-end or next week.

Do you know what's the IMAP server exactly? What's the output of offlineimap -a unibe --info?

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

I am actually using davmail already. I connect to my local davmail app.

@nicolas33 nicolas33 removed the Microsoft label Jul 4, 2017

@nicolas33 nicolas33 changed the title from folder not synced with Outlook to folder not synced with Davmail Jul 4, 2017

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

OfflineIMAP 7.1.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.55 (system), Python v2.7.13, OpenSSL 1.0.2g 1 Mar 2016
imaplib2: 2.55 (system)
Remote repository 'unibe-remote': type 'IMAP'
Host: localhost Port: 1143 SSL: False
Establishing connection to localhost:1143 (unibe-remote)
Server welcome string: * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN MOVE] IMAP4rev1 DavMail 4.7.3-trunk server ready
Server capabilities: ('IMAP4REV1', 'AUTH=LOGIN', 'MOVE')

Folderlist:
Archive
Drafts
INBOX
Junk
Sent
Synchronisierungsprobleme
Synchronisierungsprobleme/Konflikte
Synchronisierungsprobleme/Lokale Fehler
Synchronisierungsprobleme/Serverfehler
Trash
Unsent Messages

Local repository 'unibe-local': type 'Maildir'
Folderlist:
Synchronisierungsprobleme.Serverfehler
Archive
Drafts
Synchronisierungsprobleme.Konflikte
Unsent Messages
Synchronisierungsprobleme
INBOX
Trash
Junk
Sent
Synchronisierungsprobleme.Lokale Fehler

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

Please read #479 and check the Keepalive configuration option in Davmail.

@einlandarzt

This comment has been minimized.

einlandarzt commented Jul 4, 2017

Thank you so much, I think that was it! Sorry for not having realized that this issue had been brought up already.

@einlandarzt einlandarzt closed this Jul 4, 2017

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

Thanks for the report. I've improved the FAQ.

@nicolas33

This comment has been minimized.

Member

nicolas33 commented Jul 4, 2017

BTW, you might really like to run the current next branch until the next release is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment