Complete.Org: Mailing Lists: Archives: offlineimap: January 2008:
two issues: fail on no connection and [Gmail] nametrans
Home

two issues: fail on no connection and [Gmail] nametrans

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap <offlineimap@xxxxxxxxxxxx>
Subject: two issues: fail on no connection and [Gmail] nametrans
From: Giorgio Lando <patroclo7@xxxxxxxxx>
Date: Sat, 05 Jan 2008 13:36:00 +0100

Hi, I am a new happy user of offlineimap and I have two small issues
with it.

My first doubt is whethere there is a way to run offlineimap in
autorefresh mode when there is no immediate network connection. I would
like to run offlineimap at boot time in autorefresh mode so to be
continoously synchronized with my remote imap server. However, when my
machine is not already connected to internet, offlineimap fails to
start.

The second problem concerns nametrans. May be that my problem concerns
lambda actions more than offlineimap, but may be you are able to help me
nonetheless. I would like to sanitize the names of the folders of my
gmail imap account. Now, I am able to remove some thing, such as blanks:

nametrans = lambda foldername: re.sub('Sent mail', 'sent', foldername)

However, I am not able to replace the leading '[Gmail]' of several
folders with '' or at least 'gmail'.
I have tried many things:

nametrans = lambda foldername: re.sub('\[Gmail\]', 'gmail', foldername)

nametrans = lambda foldername: re.sub('[Gmail]', 'gmail', foldername)

nametrans = lambda foldername: re.sub('\[Gmail\]', '',foldername)

nametrans = lambda foldername: re.sub('^\[Gmail\]', '',foldername)

but no luck. I can imagine two sources of failure:
1) I mistake something in the lambda action syntax;
2) the nametrans is not applied because [Gmail] is not in the initial
IMAP folder name. The IMAP folder is'[Gmail]/Sent mail' and becomes
(without any nametrans) the Maildir [Gmail].Sent mail (since I have sep
= .). May be that the lambda action operates only after the separator .
? If this is the problem, is there a way to apply it to what comes before 
the separator?

Thanks in advance for your help
Giorgio Lando



[Prev in Thread] Current Thread [Next in Thread]
  • two issues: fail on no connection and [Gmail] nametrans, Giorgio Lando <=