Configuration boilerplate

Dave Abrahams dave at boostpro.com
Wed Aug 24 08:16:32 BST 2011


My configuration (shown below, slightly edited to protect the innocent)
has a disturbing amount of boilerplate in it.  Is there a way to limit
this repetition perhaps by doing something in python with "pythonfile =
xxxx.py"?

[Why all these things are in separate accounts:
 
  * I don't want to copy any of Spam from the remote server: it should
    only sync up, not down.

  * I don't want sync'ing my "All Mail" folder to hold up sync'ing my
    INBOX

  * I have a second, Personal GMail account, which naturally has to have
    a separate remote repository
]

Thanks!

--8<---------------cut here---------------start------------->8---
[general]
accounts = BoostPro,Spam,ArchiveSync,PersonalGMail
maxsyncaccounts = 5
fsync = false


[Repository BoostProLocal]
type = Maildir
sep = .
localfolders = ~/Library/Data/LocalIMAP
postsynchook = imap-postsync localhost dave
restoreatime = no

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

###### BoostPro ########

[Account BoostPro]
localrepository = BoostProLocal
remoterepository = BoostProRemote
autorefresh = 15
quick = 3

[Repository BoostProRemote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = dave-AT-boostpro.com
remotepass = <myremotepass>
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]
localrepository = BoostProLocal
remoterepository = ArchiveRemote
autorefresh = 15
quick = 3

[Repository ArchiveRemote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = dave-AT-boostpro.com
remotepass = <myremotepass>
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]
localrepository = BoostProLocal
remoterepository = PersonalGMailRemote
autorefresh = 40
quick = 3

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

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

[Account Spam]
localrepository = BoostProLocalReadOnly
remoterepository = BoostProRemoteSpam
autorefresh = 16
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-AT-boostpro.com
remotepass = <myremotepass>
ssl = yes
maxconnections = 1
realdelete = yes
folderfilter = lambda foldername: foldername in ['[Gmail]/Spam']
nametrans = lambda folder: '.' if folder == 'INBOX' else '.' + folder
--8<---------------cut here---------------end--------------->8---

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com






More information about the OfflineIMAP-project mailing list