diff --git a/head/debian/changelog b/head/debian/changelog index 3473134..a0e522e 100644 --- a/head/debian/changelog +++ b/head/debian/changelog @@ -1,3 +1,9 @@ +offlineimap (2.0.2) unstable; urgency=low + + * Added support for remotepassfile. Closes: #151943. + + -- John Goerzen Thu, 4 Jul 2002 14:46:23 -0500 + offlineimap (2.0.1) unstable; urgency=low * Fixed a bug with not properly propogating foldersep changes. diff --git a/head/offlineimap.conf b/head/offlineimap.conf index cf02122..deb82df 100644 --- a/head/offlineimap.conf +++ b/head/offlineimap.conf @@ -91,19 +91,38 @@ ssl = yes # Specify the remote user name. remoteuser = username -# Specify the remote password. If not specified, you will be -# prompted. -# remotepass = fake +# There are three ways to specify the password for the remote IMAP +# server: +# +# 1. No password at all specified in the config file. You will +# be prompted for the password when OfflineIMAP starts. +# +# 2. The remote password stored in this file with the remotepass +# option. Example: +# +# remotepass = mypassword +# +# 3. The remote password stored as a single line in an external +# file, which is referenced by the remotefile option. Example: +# +# remotepassfile = ~/Password.IMAP.Account1 -# Specify local repository. +# Specify local repository. Your IMAP folders will be synchronized +# to maildirs created under this path. OfflineIMAP will create the +# maildirs for you as needed. localfolders = ~/Test # You can specify a folder translator. This must be a eval-able # Python expression that takes a foldername arg and returns the new -# value. I suggest a lambda. This example will remove "INBOX." from +# value. I suggest a lambda. This example below will remove "INBOX." from # the leading edge of folders (great for Courier IMAP users) - +# +# WARNING: you MUST construct this such that it NEVER returns +# the same value for two folders, UNLESS the second values are +# filtered out by folderfilter below. Failure to follow this rule +# will result in undefined behavior +# # nametrans = lambda foldername: re.sub('^INBOX.', '', foldername) # You can specify which folders to sync. You can do it several ways. diff --git a/head/offlineimap.py b/head/offlineimap.py index d286279..fa83eda 100644 --- a/head/offlineimap.py +++ b/head/offlineimap.py @@ -58,6 +58,10 @@ threadutil.initInstanceLimit("ACCOUNTLIMIT", config.getint("general", for account in accounts: if config.has_option(account, "remotepass"): passwords[account] = config.get(account, "remotepass") + elif config.has_option(account, "remotepassfile"): + passfile = os.path.expanduser(config.get(account, "remotepassfile")) + passwords[account] = passfile.readline().strip() + passfile.close() else: passwords[account] = ui.getpass(account, config) for instancename in ["FOLDER_" + account, "MSGCOPY_" + account]: diff --git a/head/offlineimap/version.py b/head/offlineimap/version.py index be892f8..630e968 100644 --- a/head/offlineimap/version.py +++ b/head/offlineimap/version.py @@ -1,5 +1,5 @@ productname = 'OfflineIMAP' -versionstr = "2.0.1" +versionstr = "2.0.2" versionlist = versionstr.split(".") major = versionlist[0]