Your message dated Sun, 29 Apr 2012 22:46:44 +0100
with message-id <[email protected]>
and subject line offlineimap: variables in config file
has caused the Debian Bug report #253358,
regarding offlineimap: variables in config file
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
253358: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=253358
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: offlineimap
Version: 4.0.3
Severity: wishlist

I define $ETC, which points to the directory holding my
configuration, like offlineimap's. Could you allow offlineimap to
use environment variables in the config file?

I tried

  metadata = os.getenv('VAR') + '/offlineimap'

but that does not seem to be evaluated, just read, and obviously,
*such* a file does not exist.

Thanks,

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (600, 'testing'), (98, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-1-k7-smp
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=de_DE.ISO-8859-15

Versions of packages offlineimap depends on:
ii  python2.2                     2.2.3-9    An interactive high-level object-o

-- no debconf information

-- 
Please do not CC me when replying to lists; I read them!
 
 .''`.     martin f. krafft <[email protected]>
: :'  :    proud Debian developer, admin, and user
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Dear submitter,

A while ago you requested to support environment variables inside the
offlineimaprc config file.

There are a few options you can try:

1) python format strings (correct syntax to evaluate variables)
2) setting pythonfile (how to provide arbitrary python to config file)
3) setting $HOME

1) python format strings:

# NOTE: Settings generally support python 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.

2) pythonfile

########## Advanced settings

# You can give a Python source filename here and all config file
# python snippets will be evaluated in the context of that file.
# This allows you to e.g. define helper functions in the Python
# source file and call them from this config file.  You can find
# an example of this in the manual.
#
# pythonfile = ~/.offlineimap.py
#

3) setting $HOME

In a few places ~/bla seems to be correctly evaluated. Hence you can
cheat and set $HOME and hopefully it will do the trick.

Hope one of these solutions will do what you want.

-- 
Regards,
Dmitrijs.

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to