-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathofflineimaprc
40 lines (32 loc) · 1.2 KB
/
offlineimaprc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- mode: conf; -*-
#+DEST=$HOME/
#+FNAME=.offlineimaprc
[general]
# NOTE: cronjob calls the quiet UI with -u
accounts = GMail
[Account GMail]
localrepository = Gmail-Local
remoterepository = Gmail-Remote
maxsyncaccounts = 3
maxconnections = 3
[Repository Gmail-Local]
type = Maildir
localfolders = ~/Maildir/ymsc
[Repository Gmail-Remote]
type = Gmail
remoteuser = [email protected]
realdelete = no
remotepasseval = keyring.get_password("offlineimap","[email protected]")
# remember to put password in keyring (eg: python session)
# $ python
# >>> import keyring
# >>> keyring.set_password("offlineimap","[email protected]", "MYPASSWORD")'
# "[Gmail]/Some Folder" --> some_folder
nametrans = lambda folder: re.sub('^inbox$', 'INBOX',
re.sub(' +', '_',
re.sub(r'.*/(.*)$', r'\1', folder).lower()))
folderfilter = lambda foldername: foldername not in ['[Google Mail]/All Mail',
'[Google Mail]/Spam',
'[Google Mail]/Bin',
'[Google Mail]/Important'
]