offlineimap
offlineimap copied to clipboard
Unable to sync INBOX folder
I'm trying to sync email with my email server at work and I'm having troubles syncing my INBOX folder. The folder ist not synced and does not appear in the list of folders on the server (see below). The admins told me, that the inbox is stored on the server, while all imap folders are stored on the home folders of all the users via some nfs share. That's why I need the reference = Mail.
If I compare with the thunderbird setup, also thunderbird doesn't show the INBOX as subscribable folder, still somehow manages to find my INBOX. Any ideas?
General informations
- system/distribution (with version): arch
- offlineimap version (
offlineimap -V): offlineimap v7.2.2, imaplib2 v2.57 (bundled), Python v2.7.15, OpenSSL 1.1.1a 20 Nov 2018 - server name or domain: private
- CLI options: --info
Configuration file offlineimaprc
[general]
accounts = main
[Account main]
localrepository = main-local
remoterepository = main-remote
postsynchook = notmuch new
[Repository main-local]
type = Maildir
localfolders = ~/.mail/main
restoreatime = no
nametrans = lambda folder : 'Mail/' + folder
[Repository main-remote]
type = IMAP
remotehost = private
remoteuser = USER
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
reference = Mail
nametrans = lambda foldername: re.sub('^Mail/', '', foldername)
Logs, error
OfflineIMAP 7.2.2
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v2.7.15, OpenSSL 1.1.1a 20 Nov 2018
imaplib2: 2.57 (bundled)
Remote repository 'main-remote': type 'IMAP'
Host: private Port: None SSL: True
Establishing connection to private:993 (main-remote)
Server supports ID extension.
Server welcome string: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN] Dovecot ready.
Server capabilities: ('IMAP4REV1', 'LITERAL+', 'SASL-IR', 'LOGIN-REFERRALS', 'ID', 'ENABLE', 'IDLE', 'SORT', 'SORT=DISPLAY', 'THREAD=REFERENCES', 'THREAD=REFS', 'THREAD=ORDEREDSUBJECT', 'MULTIAPPEND', 'URL-PARTIAL', 'CATENATE', 'UNSELECT', 'CHILDREN', 'NAMESPACE', 'UIDPLUS', 'LIST-EXTENDED', 'I18NLEVEL=1', 'CONDSTORE', 'QRESYNC', 'ESEARCH', 'ESORT', 'SEARCHRES', 'WITHIN', 'CONTEXT=SEARCH', 'LIST-STATUS', 'SPECIAL-USE', 'BINARY', 'MOVE')
nametrans= lambda foldername: re.sub('^Mail/', '', foldername)
Folderlist:
Mail/Archives -> Archives
Mail/Drafts -> Drafts
Mail/Sent -> Sent
Mail/SPP -> SPP
Mail/Trash -> Trash
Local repository 'math-local': type 'Maildir'
nametrans= lambda folder : 'Mail/' + folder
Folderlist:
Archives -> Mail/Archives
Sent -> Mail/Sent
SPP -> Mail/SPP
Trash -> Mail/Trash
Drafts -> Mail/Drafts
What gives offlineimap --info without the reference?
It looks like there is no Mail/INBOX at all.
Oh, in that case it finds the INBOX. Along with other 65000 "Mailboxes" because it browses through my whole home folder.
It looks like there is no Mail/INBOX at all.
Correct.
Can I add this INBOX folder manually with keeping the reference intact?
Perhaps with a symlink (something like Mail/INBOX --> ../INBOX).
That will not work I guess. The INBOX is not in my home folder, its only on the server. Somehow the reference strips it apart. Probably a check is missing like "if reference/INBOX is not present, add INBOX as INBOX" I don't know how for example thunderbird is dealing with this, but they have a solution.
I don't get why not to remove 'reference'. This option only apply on the remote. What's wrong with removing this configuration option?
Having to rely on reference is rare and it seems not applicable to your remote IMAP server.
The server seems to be configured in such a way, that the folder root directory of every user maps to the home folder of each user on their local machine via nfs.
If I don't set a reference, every imap client thus will browse through all folders and files on my home folder. Since I'm also working on that machine, my home folder contains lots of directories and files and offlineimap detected over 60000 potential mailboxes (while there are about 5).
Thus, I moved all my remote mailboxes that are stored locally (that's the confusing part) to a new folder ~/Mail, which then requires the setting of a reference.
You could of course ask, why I need offlineimap in that case if everything is already synced. Well, its because I also work from a remote pc which does not have direct access to ~/Mail .
However, the INBOX seems to play a special role, since it is apparently not mapped to the home folder like the other mailboxes.
find '/home/me/' -name 'INBOX'
will not return anything.