Tag Archives: kmail-kdepim

New application in kdepim 4.9 (2/3): BackupMail

Another new application is BackupMail.
I developed during 4.9 cycle after seeing that there was no application to export/import KMail data in order to transfer the KMail settings from a computer from another, for instance.
Until now the method (in KMail1) to restore KMail was to create an archive and extract it in the new user home.

But with Akonadi it was not possible to do it, because we use numeric identifiers for folders, in the configuration files, rather than folder paths.

So all configs will break if we just copy the config file to another computer, where the numeric identifier will be different.

What is necessary to backup/restore in KMail application?
– The main configuration file, kmail2rc, of course.
– Maildir directory structure, mailbox files.
– identity settings.
– filters settings.
– mailtransport settings.
– all pop3/imap/maildir/mailbox resources.
– ldap server (kabldaprc).
– Akonadi database.
– and other configs as templatesconfigurationrc, akonadi_archivemail_agentrc.

So before saving data in zip file, we must to convert all configs settings which use an akonadi id to a real path.

When we restore them, we convert real path to an akonadi id. I developed a piece of code which tests if a real path can be found in akonadi database and returns its id.

During restoring we will not just overwrite config files we will merge information when it’s possible.
For example we do not overwrite akonadi resources but we  create new resources. So it is not conflict with existing setup.
Same as for identities and mail transports.

We will adapt filters arguments to use new identity or collection folder etc.

Future in 4.10:

I will continue to improve it, and merge some settings, for example ldap server for the moment it is not merged but I overwrite a file.
I will create an expert mode where we will able to specify which resources/settings we want to import.

And perhaps I will extend backup to other pim applications.

If you have some features to add it send me an email or report it to bugs.kde.org

New application in kdepim 4.9 (1/3): ImportWizard

A new great application is ImportWizard.
I developped it during 4.9 cycle after seeing that a lot of people used Thunderbird Evolution Sylpheed etc.
But they might want to test KMail2.
And until now it was not very easy to migrate to KMail2.
There was KMailCVT which allowed to migrate emails, but only emails.
With ImportWizard, I expanded that to import more than just emails, see below
for details.

State of 4.9:
In my opinion, a PIM application needs to import several types of data:

  • Mails
  • Filters (it’s very important to migrate them)
  • Addressbook
  • Calendar
  • Settings

For filters I re-used code from kmail filter import. (During 4.9 I improved it too.)
Now we can import:

  • Thunderbird filters
  • Evolution filters
  • Sylpheed filters
  • Procmail filters.

It’s very easy: go to kmail filter config and click on “import filters”.

For mails, I created a lib from kmailcvt.
So there is support for:

  • Evolution (V1, V2, V3) Yes there are 3 versions 🙂 (I added V3 in 4.9)
  • Thunderbird
  • Sylpheed
  • Opera
  • Outlook
  • Pegasus Mail

For Addressbook it was more difficult so only Thunderbird, Evolution and Sylpheed are supported.
– Thunderbird uses a specific database file, so it was necessary to read it. Not very easy. Import is not perfect yet but we can get it.
– Evolution, we can just export as vcard and reimport after. I will look at whether it’s possible to improve it in 4.10.
– Sylpheed, all is imported correctly.

For Calendar, just Evolution is supported. I import .ics directly as resources.

For Settings, I tried to support as many settings as possible. So, not everything is perfect because each application uses its own logic. But I think it’s correct now.
I import:

  • composer settings
  • account settings
  • identity settings
  • signatures settings

Last changes in 4.9 is to import ldap server settings.

I will continue to improve import settings. There is a lot of “TODO” in the code and I will try to implement them 🙂
But I know that I don’t support Outlook, Opera, Apple Mail, Pegasus Mail etc.
For that I need infos about how they store settings.
Apple Mail I don’t have a Mac so I can’t do it. But perhaps you have some infos.
Outlook I don’t know where they store data.
Opera no idea.
Pegasus Mail I never used.

But if somebody has some infos…

I will try to backport each fix in 4.9.