diff --git a/offlineimap.conf b/offlineimap.conf index 9d85377..3cd8dd5 100644 --- a/offlineimap.conf +++ b/offlineimap.conf @@ -15,8 +15,26 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# This file documents all possible options and can be quite scary. # Looking for a quick start? Take a look at offlineimap.conf.minimal. +# Settings support interpolation. This means values can contain python +# format strings which refer to other values in the same section, or +# values in a special DEFAULT section. This allows you for example to +# use common settings for multiple accounts: +# +# [Repository Gmail1] +# trashfolder: %(gmailtrashfolder)s +# +# [Repository Gmail2] +# trashfolder: %(gmailtrashfolder)s +# +# [DEFAULT] +# gmailtrashfolder = [Google Mail]/Papierkorb +# +# would set the trashfolder setting for your German gmail accounts. + + ################################################## # General definitions diff --git a/offlineimap/CustomConfig.py b/offlineimap/CustomConfig.py index 0c10271..42132f8 100644 --- a/offlineimap/CustomConfig.py +++ b/offlineimap/CustomConfig.py @@ -15,11 +15,11 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -from ConfigParser import ConfigParser +from ConfigParser import SafeConfigParser from offlineimap.localeval import LocalEval import os -class CustomConfigParser(ConfigParser): +class CustomConfigParser(SafeConfigParser): def getdefault(self, section, option, default, *args, **kwargs): """Same as config.get, but returns the "default" option if there is no such option specified."""