Last commit for README: 4b2682d820b2fecb33e662d7706490b001967e0f

Initial commit

Benjamin Renard [2013-12-25 20:10:39]
Initial commit
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]

      -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]

      -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 :


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 (c) 2013 Benjamin Renard


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
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.