Patch from Sean Finney, slightly modified by John Goerzen to change
name of config file option
fixes deb#499588
localfolders = ~/Test
+# Specify whether to process all mail folders on the server, or only
+# those listed as "subscribed".
+subscribedonly = no
+
# You can specify the "path separator character" used for your Maildir
# folders. This is inserted in-between the components of the tree.
# It defaults to ".". If you want your Maildir folders to be nested,
return self.folders
retval = []
imapobj = self.imapserver.acquireconnection()
+ # check whether to list all folders, or subscribed only
+ listfunction = imapobj.list
+ if self.config.has_option(self.getsection(), 'subscribedonly'):
+ if self.getconf('subscribedonly') == "yes":
+ listfunction = imapobj.lsub
try:
- listresult = imapobj.list(directory = self.imapserver.reference)[1]
+ listresult = listfunction(directory = self.imapserver.reference)[1]
finally:
self.imapserver.releaseconnection(imapobj)
for string in listresult: