+

Shortlog

Date Author Message Actions
14-08-25 23:08 Benjamin Renard Add support to 'all addresses' Thunderbird conditimaster commitdiff tree tar/gz zip patch
14-08-25 23:03 Benjamin Renard Add support to 'doesn't contain' Thunderbird condi commitdiff tree tar/gz zip patch
14-08-25 22:37 Benjamin Renard Add support to 'to or cc' Thunderbird condition fi commitdiff tree tar/gz zip patch
14-08-25 22:34 Benjamin Renard Add support to 'ALL' Thunderbird condition commitdiff tree tar/gz zip patch
13-12-25 20:10 Benjamin Renard Initial commit commitdiff tree tar/gz zip patch

more »

Tags

Date Tag Actions

View all tags

Heads

Date Branch Actions
14-08-25 23:08 master

Project informations

Description
Thunderbird to SOGo scripts
Last Change
14-08-25 23:08
URL
  • http://git.zionetrix.net/git/thunderbird2sogo
  • git@git.zionetrix.net:public_git/thunderbird2sogo
README
Thunderbird to SOGo scripts
===========================

Convert Thunderbird mail directory to Maildir format
----------------------------------------------------

The thunderbird2maildir script permit to transform Thunderbird mail
directory in Maildir format. This script take Thunderbird mail
directory path (-m parameter) and inspect content to find mbox file
and convert relative path in maildir hierarchic path. You could use
-r parameter to replace accents in maildir path to avoid encoding
problems. It use perfect_maildir.pl [1] script (path could be specify
by using -P parameter) to convert mbox file to Maildir.

[1] perfect_maildir.pl : http://perfectmaildir.home-dn.net/

    Usage: thunderbird2maildir [options]

    Options:
      -h, --help            show this help message and exit
      -m MBDIR              The Mbox Thunderbird mail directory
      -M MDDIR              The maildir directory
      -P PERFECTMAILDIR     The perfect_maildir.pl script path
      -t, --just-try
      -r, --replace-accents
                            Remove accent in folder names
      -v, --verbose
      -d, --debug

Convert Thunderbird mail filters to SOGo JSON format
----------------------------------------------------

The convertFilters script permit to convert Thunderbird mail filters
to SOGo filters. It take as input msgFilterRules.dat path (-f parameter),
parse file and try to convert filters in SOGo equivalent. Some filters
conditions or actions can't be converted as SOGo filters, so warning or
critical messages will be inform you of possible conversions problems.
Output is in JSON format. By default, JSON string is write and stdout
but you could provide with -o parameter a file path where JSON have to
be write.

    Usage: convertFilters [options]

    Options:
      -h, --help            show this help message and exit
      -f FILE               The msgFilterRules.dat path
      -o OUT                Output path (default : '-' => stdout)
      -p, --pretty          Pretty JSON output
      -j, --just-try        Just-try mode (no output)
      --dont-warn-cc        Don't warn about cc -> to_or_cc convertion
      -r, --replace-accents
                            Remove accent in folder names
      -v, --verbose
      -d, --debug

The thunderbirdFilters.py library is inspired by tbprocmailconv.py script :

http://sourceforge.net/projects/tbprocmailconv/

Load JSON in SOGo profile
~~~~~~~~~~~~~~~~~~~~~~~~~

Run as sogo user :

  echo "[USER]:[PASS]" > /tmp/[USER].pass
  /usr/sbin/sogo-tool user-preferences set defaults [USER] -p /tmp/[USER].pass \
  SOGoSieveFilters -f /tmp/[USER].json
  rm [USER].pass

With :

  * [USER] : user's login
  * [PASS] : user's password

The JSON file must be /tmp/[USER].json.

Copyright
=========

Copyright (c) 2013 Benjamin Renard

License
=======

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
ViewGit