From d3bdd28f491728d969c5941d18b9f4ee2651f60b Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Wed, 5 Nov 2014 10:52:42 +0000 Subject: [PATCH] offlineimap: sync labels and switch to daemon mode also move files to $XDG_CONFIG_HOME --- Makefile | 4 ++-- offlineimaprc => offlineimap/config | 22 ++++++++++++------- .../utils.py | 0 3 files changed, 16 insertions(+), 10 deletions(-) rename offlineimaprc => offlineimap/config (67%) rename bin/offlineimap_utils.py => offlineimap/utils.py (100%) diff --git a/Makefile b/Makefile index c543a53..0344649 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ APATH := $(realpath .) FILES := bin -DOTFILES := conky* git* goobookrc msmtp* mutt ncmpcpp offlineimap* profile weechat xbindkeysrc Xresources xprofile zprofile zshrc -CONFIGFILES := aliases compton.conf git mimeo.conf mpd ranger retroarch vim xkb zsh +DOTFILES := conky* git* goobookrc msmtp* mutt ncmpcpp profile weechat xbindkeysrc Xresources xprofile zprofile zshrc +CONFIGFILES := aliases compton.conf git mimeo.conf mpd offlineimap ranger retroarch vim xkb zsh .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES) install: $(FILES) $(DOTFILES) $(CONFIGFILES) diff --git a/offlineimaprc b/offlineimap/config similarity index 67% rename from offlineimaprc rename to offlineimap/config index 3e5e6d2..5b02023 100644 --- a/offlineimaprc +++ b/offlineimap/config @@ -1,10 +1,10 @@ [general] -#metadata = ~/.offlineimap +metadata = $XDG_DATA_HOME/offlineimap accounts = gmail maxsyncaccounts = 1 #ui = basic #ignore-readonly = no -pythonfile = ~/bin/offlineimap_utils.py +pythonfile = $XDG_CONFIG_HOME/offlineimap/utils.py socktimeout = 120 fsync = false @@ -21,18 +21,23 @@ sort_keyfunc = sort_key [Account gmail] localrepository = gmail-local remoterepository = gmail-remote -#autorefresh = 1 -quick = 10 +autorefresh = 10 +quick = -1 # presynchook = imapfilter # postsynchook = notifysync.sh # presynchook = imapfilter -c someotherconfig.lua status_backend = sqlite # maxsize = 2000000 -# maxage = +# maxage = 10 #maildir-windows-compatible = no +synclabels = yes +labelsheader = X-Label +filterheaders = X-Label +#ignorelabels = \Inbox, \Starred, \Sent, \Draft, \Spam, \Trash, \Important +ignorelabels = \Draft, \Important [Repository gmail-local] -type = Maildir +type = GmailMaildir localfolders = ~/mail/gmail #sep = . #restoreatime = no @@ -42,11 +47,12 @@ nametrans = translocal type = Gmail remoteuser = samir.benmendil@gmail.com nametrans = transremote -#folderfilter = lambda foldername: foldername not in '[Google Mail]/All Mail' +# folderfilter = lambda foldername: foldername in ['[Google Mail]/All Mail', '[Google Mail]/Drafts', '[Google Mail]/Bin'] sslcacertfile = /etc/ssl/certs/ca-certificates.crt trashfolder = '[Google Mail]/Bin' spamfolder = '[Google Mail]/Spam' +usecompression = yes maxconnections = 3 holdconnectionopen = yes keepalive = 60 -#readonly = False +# readonly = True diff --git a/bin/offlineimap_utils.py b/offlineimap/utils.py similarity index 100% rename from bin/offlineimap_utils.py rename to offlineimap/utils.py -- 2.48.1