Sync -> Mails there. Sync -> mails gone
Sebastian Spaeth
Sebastian at SSpaeth.de
Thu Jan 29 11:02:19 GMT 2015
1) Not important, but rather than:
"INBOX." + re.sub('^localPREFIX\.', '', foldername)
why not:
re.sub('^localPREFIX\.', 'INBOX.', foldername)
?
2) How about:
nametrans = lambda foldername: re.sub("INBOX\.INBOX","INBOX",
re.sub('^localPREFIX\.', 'INBOX.', foldername))
Sebastian
On 29.01.2015 11:20, Matthias Beyer wrote:
> I found the issue, but I don't know how to solve it:
>
> My nametrans renames the folders as requested, BUT the "INBOX" folder
> gets renamed to "localPREFIX.INBOX" (which is fine) when syncing
> remote->local. But on syncing local to remote, it gets renamed
> "INBOX.INBOX", which is obviousely wrong.
>
> The problem is, that I don't know how to solve this issue properly.
> Doing an if-else in the nametrans results in syntax errors, I don't
> know how much python this thing understands, so I tried solving it
> with regex only, but ... well, I can't get it working.
>
> Maybe you guys can?
>
> On 29-01-2015 10:44:49, Matthias Beyer wrote:
>> [Repository LocalFoo]
>> ...
>> nametrans = lambda foldername = "INBOX." + re.sub('^localPREFIX\.', '', foldername)
>> folderfilter = lambda foldername = foldername.startswith('localPREFIX.')
>>
>> [Repository RemoteFoo]
>> ...
>> nametrans = lambda foldername = "localPREFIX." + re.sub('^INBOX\.', '', foldername)
>>
>
>
>
> _______________________________________________
> OfflineIMAP-project mailing list: OfflineIMAP-project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>
> OfflineIMAP homepages:
> - https://github.com/OfflineIMAP
> - http://offlineimap.org
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20150129/ed5e1483/attachment-0003.sig>
More information about the OfflineIMAP-project
mailing list