OfflineIMAP / offlineimap

Read/sync your IMAP mailboxes (python2) [LEGACY: move to offlineimap3]
http://www.offlineimap.org
Other
1.78k stars 360 forks source link

synclabels question #490

Closed jungle-boogie closed 7 years ago

jungle-boogie commented 7 years ago

General informations

Configuration file offlineimaprc

[general]
accounts = personal

[Account personal]
localrepository = personal-local
remoterepository = personal-remote

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

[Repository personal-remote]
type = Gmail
synclabels = yes
labelsheader = X-Keywords
sslcacertfile = /etc/ssl/cert.pem
remoteuser = trump@gmail.com
remotepass = 
sync_deletes = yes
realdelete= yes

question

My config is now much simpler than before.

This appears to have created many directories in ~/mail/ when offlineimap was started:

...
tinc
tmux
virtualization
voiceops
wireshark

However, when I open mutt and navigate to the various directories, there is no mail. The only one with mail is [Gmail].Important/

So does synclabels only create the directories but it keeps them empty and everything goes into Important? Previously this was All Mail.

Do I need the name translation thing setup on each and every label I have so offlineimap can move it into the correct directory?

If that's the case, could you please show me an offlineimaprc file with the few labels above?

nicolas33 commented 7 years ago

Did the sync end cleanly? What happens on next sync?

Each email is a file in the "cur" sub-directory. So, it's easy to know how many emails are in your maildirs.

nicolas33 commented 7 years ago

"cur" or "new" or "tmp", BTW.

jungle-boogie commented 7 years ago

Hi @nicolas33,

It's far from being completed, as it needs to download many, many emails. Once it's completed, should the emails go in the correct labeled directory?

in the important cur directory, there's already over 1000, but these have emails have other labels.

for instance, wireshark emails are in important/cur and not in wireshark/cur.

nicolas33 commented 7 years ago

AFAIR, Gmail labels are exposed like folders to the IMAP clients. So yes, offlineimap should have the emails in the local folders.

It's correct to have emails downloaded for some labels while still missing in other folders when the sync is not done, yet.

jungle-boogie commented 7 years ago

not quite finished yet.

$ ls -lrt mail/\[Gmail\].Important/cur/ | wc -l
   22649
$ ls -lrt mail/\[Gmail\].All\ Mail/cur/ | wc -l
   26558

progress so far:

8.0K    mail/INBOX
8.0K    mail/[GMail].Drafts
112K    mail/[GMail].Sent Mail
341M    mail/[Gmail].All Mail
8.0K    mail/[Gmail].Bin
22.0K   mail/[Gmail].Drafts
341M    mail/[Gmail].Important
238M    mail/[Gmail].Sent Mail
8.0K    mail/[Gmail].Spam
116K    mail/[Gmail].Starred
792K    mail/ack-users
212K    mail/announce@openbsd
8.0K    mail/borgbackup
8.0K    mail/chrony
8.0K    mail/dfly-users
8.0K    mail/fBSD-current
8.0K    mail/fossil-scm
8.0K    mail/fossil-scm.fossil-dev
8.0K    mail/freebsd-arm
8.0K    mail/freebsd-questions
8.0K    mail/freebsd-security
8.0K    mail/freebsd-stable
8.0K    mail/freeswitch
8.0K    mail/freeswitch-docs
8.0K    mail/full disclosure
8.0K    mail/kamailio
8.0K    mail/libressl
8.0K    mail/lua
8.0K    mail/mosh
8.0K    mail/nanog
8.0K    mail/onsip
8.0K    mail/openbsd-misc
8.0K    mail/openbsd-source
8.0K    mail/openbsd-source.2016
8.0K    mail/ostinato
8.0K    mail/pfsense
8.0K    mail/phone-system
8.0K    mail/prosody
8.0K    mail/rsnapshot
8.0K    mail/sqlite
8.0K    mail/sshguard
8.0K    mail/stunnel
8.0K    mail/tarsnap
8.0K    mail/tinc
8.0K    mail/tmux
8.0K    mail/virtualization
8.0K    mail/voiceops
8.0K    mail/wireshark

there are a few emails in the announce@openbsd so it's possible emails will be put in the correct directories. Very interesting all mail and important are the same size with a different count of emails.

I hope there isn't a next time, but if there is, I'll use an account with fewer emails to test this with.

jungle-boogie commented 7 years ago

I also see /home/jungle/.offlineimap/Account-personal/LocalStatus-sqlite has a database for each gmail label, but only the labels above have any data in the databases, as expected.

nicolas33 commented 7 years ago

News here?

jungle-boogie commented 7 years ago

I think it'll be good, just slow.

I don't have internet at my new location yet, so I can't re-connect and download mail.