<DKIM> Re: Help with nametrans

Wojciech Żuk wojciech.zuk at gmail.com
Sat Jul 9 21:46:33 BST 2016


Thanks for your seggestion, something is start to syncing now, but I have
next big problem, Offlineimap during message copy from source to
destination imap server it reset all dates on my messages so all messages
have receive date when syncing occur, this is a bug of program? Or should I
set more in config file?

2016-07-09 14:54 GMT+02:00 Nicolas Sebrecht <nicolas.s-dev at laposte.net>:

> On Sat, Jul 09, 2016 at 09:36:01AM +0200, Wojciech Żuk wrote:
> >    offlineimap --version
> >    6.3.4
>
> >    my config look like this:
>
> >    [Repository local]
> >    folderfilter = lambda folder: folder in ['Test', 'Xpertis']
> >    [Repository Gmail]
> >    folderfilter = lambda folder: folder in
> >    ['e-mail at wp.pl/Wys&AUI-ane', 'e-mail at wp.pl/Xpertis']
> >    nametrans = lambda folder: re.sub('e-mail at wp.pl/Wys&AUI-ane',
> >    'Test','Test')
> >    nametrans = lambda folder: re.sub('e-mail at wp.pl/Xpertis',
> >    'Xpertis','Xpertis')
> >
> >    all I need to sync between (Local)[Xpertis]  <---->
> >    (Gmail)[e-mail at wp.pl/Xpertis']
> >    (Local)[Test]  <---->   (Gmail)[e-mail at wp.pl/Wys&AUI-ane']
>
> >    but with this config offlineimap mix messages form these folders.
>
> You can't duplicate configuration options in a section. There must be
> only one 'nametrans' line in the remote section and another one in the
> local.
>
> You should set up a pythonfile and use a function to make things clear.
>
> ~/offlineimap-helpers.py:
>
>  def renamefolder(foldername):
>      # Xpertis.
>      if foldername == 'e-mail at wp.pl/Xpertis':
>          return 'Test'
>      # Reversed Xpertis
>      elif foldername == 'Test':
>          return 'e-mail at wp.pl/Xpertis'
>
>      # Same goes for other foldernames.
>      elif foldername == '...'
>          return '...'
>      ...
>
> Config:
>
>  [General]
>  pythonfile = ~/offlineimap-helpers.py
>
>  [Repository Local]
>  nametrans = renamefolder
>
>  [Repository Gmail]
>  nametrans = renamefolder
>
> --
> Nicolas Sebrecht
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20160709/32e09eec/attachment-0003.html>


More information about the OfflineIMAP-project mailing list