[general]
accounts = BoostPro,Spam,ArchiveSync,PersonalGMail
maxsyncaccounts = 5
fsync = false


[Repository BoostProLocal]
type = Maildir
sep = .
localfolders = ~/Library/Data/LocalIMAP
restoreatime = no

######################
# Accounts           #
######################

###### BoostPro ########
#
# syncs and idles INBOX

[Account BoostPro]
status_backend = sqlite
localrepository = BoostProLocal
remoterepository = BoostProRemote
autorefresh = 17
presynchook = echo offlineimap presync
postsynchook = /Users/dave/bin/imap-postsync localhost dave --soft-errors
quick = 3

[Repository BoostProRemote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = dave@boostpro.com
remotepass = xxxxxxxxxxx
ssl = yes
realdelete = yes
folderfilter = lambda foldername: foldername in ['INBOX']
nametrans = lambda folder: '.' if folder == 'INBOX' else '.' + folder
holdconnectionopen = yes
keepalive = 60
idlefolders = ['INBOX']

######################

[Account ArchiveSync]
status_backend = sqlite
localrepository = BoostProLocal
remoterepository = ArchiveRemote
autorefresh = 13
quick = 3

[Repository ArchiveRemote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = dave@boostpro.com
remotepass = xxxxxxxxxxx
ssl = yes
realdelete = yes
folderfilter = lambda foldername: foldername in ['[Gmail]/All Mail']
nametrans = lambda folder: '.' if folder == 'INBOX' else '.' + folder
holdconnectionopen = yes
keepalive = 60
idlefolders = ['[Gmail]/All Mail']

######################

[Account PersonalGMail]
status_backend = sqlite
localrepository = BoostProLocal
remoterepository = PersonalGMailRemote
autorefresh = 37
quick = 3

[Repository PersonalGMailRemote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = dave.abrahams@gmail.com
remotepass = ya5slaj2thyst8ot
ssl = yes
realdelete = yes
folderfilter = lambda foldername: foldername in ['INBOX']
nametrans = lambda folder: '.PersonalGMail' if folder == 'INBOX' else '.' + folder
holdconnectionopen = yes
keepalive = 60
idlefolders = ['INBOX']

######################

[Account Spam]
status_backend = sqlite
localrepository = BoostProLocalReadOnly
remoterepository = BoostProRemoteSpam
autorefresh = 43
quick = 8
holdconnectionopen = no

[Repository BoostProLocalReadOnly]
type = Maildir
sep = .
localfolders = ~/Library/Data/LocalIMAP
readonly = true
restoreatime = no

[Repository BoostProRemoteSpam]
type = IMAP
remotehost = imap.gmail.com
remoteuser = dave@boostpro.com
remotepass = xxxxxxxxxxx
ssl = yes
maxconnections = 1
realdelete = yes
folderfilter = lambda foldername: foldername in ['[Gmail]/Spam']
nametrans = lambda folder: '.' if folder == 'INBOX' else '.' + folder
