Import PST (email, contacts and calendars) to Nethserver / Webtop 4

I want to share a procedure that needs to be tested organized with the valuable contribution of @nethcman.

Install these packages:

yum install php-mysql libpst -y

Import email :

  • Run the script pst2webtop.sh passing in the .pst file, and you move on to the email.
    For example:

    /usr/share/webtop/doc/pst2webtop.sh Outlook.pst testuser

The .pst file will be moved to a temporary folder in /tmp/
This directory will be recursively traversed and imap maildir will be created in the user’s folders and emails

After processing the files will be listed containing contacts and calendars for any imports

Import Contacts in Webtop:
Run the script import pst2webtop_card.php as parameters, the user, the file to be imported and the webtop folder on which to import.
For example:

/usr/share/webtop/doc/pst2webtop_card.php testuser /tmp/temp.dsdfs/Contatti/contacts WebTop

Import Calendar in Webtop:
Run the script import pst2webtop_cal.php as parameters, the user, the file to be imported and the webtop folder on which to import.
For example:

/usr/share/webtop/doc/pst2webtop_cal.php testuser /tmp/temp.dsdfs/Calendari/calendar WebTop

Thank you for reading and give your feedback.
Merry Christmas :grinning: :christmas_tree:

4 Likes

Hi, maybe fetchmail will help to download mails from old mail server? Because outlook file could be 10 20 gb and parser can goes crazy ?

Hi @Nas, to migrate e-mail you can use both Fetchmail that Imapsync (I prefer imapsync :stuck_out_tongue_winking_eye: ). Scripts pst2webtop_card.php and pst2webtop_cal.php become useful eventually to import Contacts and Calendars.

In any case, thanks for your comment :wink:

Hi @lucag, please share some notes about Imapsync, maybe it will help someone.

Hi @Nas,
Imapsync is well documented on the site of the author (Gilles Lamiral): http://imapsync.lamiral.info/
It 'a tool no longer free but a fee.
If you have already discussed here: Migrate from Kerio to Nethserver
I find it quite simple to use and very useful :wink:

Thanks @lucag for such great howto! Who has any experience about this migration? Any tests?

EDIT: I know that @mamengoni made recently a big experience with also big .pst. Would you mind to share it with us?

Hi, Thanks for the scripts. I have just tried them with the following results:

Mail came across fine . ( I had just 58 mails in my test pst)

Contacts also imported with one error reported:

“Warning: pg_query(): Query failed: ERROR: duplicate key value violates unique constraint “contact_pkey” in /root/pst2webtop/pst2webtop_card.php on line 32”

However, I suspect that not all fields from the outlook pst are mapped to fields in webtop as items in outlook notes were missing. Also in cases where I had several telephone numbers for one contact all of them were not imported.

Calendar items also imported but the following errors were reported;

"Warning: pg_query(): Query failed: ERROR: duplicate key value violates unique constraint “calendars_pkey” in /root/pst2webtop/pst2webtop_cal.php on line 33
Errore Creazione Calendario WebTop di tmackey

Warning: pg_insert(): ERROR: null value in column “event” violates not-null constraint
in /root/pst2webtop/pst2webtop_cal.php on line 106
Errore Creazione Evento 2014-07-04 23:00:00 tmackey - su WebTop

Warning: pg_insert(): ERROR: null value in column “event” violates not-null constraint
in /root/pst2webtop/pst2webtop_cal.php on line 106
Errore Creazione Evento 2012-09-07 10:00:00 tmackey - su WebTop"

I am assuming that there were events with no title?

There are also issues relating to timezones and all day events.
After the import the events say that the timezone is Rome.
The times for single events generally show correctly but all day events are not imported as such but as events that start at 00.00 and run to 23.59. They then overlap into the next day starting at 1.00 and ending at 1.00.

I hope the above feedback is of some use.
Again thanks for the effort in producing the scripts and sharing them with us.
Tom

1 Like

less -N /root/pst2webtop/pst2webtop_cal.php

91                 $arrayEvent['timezone'] = "Europe/Rome";

I suppose it should be adjusted to your local TZ.

Mail is imported by the script? I was told the import works only for calendars and contacts :open_mouth:

@lucag what is the primary key for contacts in webtop?

This is must be fixed.

@nethcman any feedback on this?
We also have to output errors in English.

I would rather change the script to read the current server TZ.

@Tom thanks for your feedback!

Hi Tom,
Warnings these are due to the category WebTop destination that already exists by default, and this generates the warning: duplicate key.

Trying to import Contacts and Calendars to a new category that does not exist should disappear these alerts.

Surely the script can be improved … any suggestion is appreciated :wink:

I assume so, yes … is likely to be as you say Tom: untitled events may generate this error.
Also from this point of view we could further improve the script with a few extra control.

Thank you for your contribution :smiley:

Hi @Tom,
we have updated the script trying to improve thanks to your report :smile:
They were added in the latest update package nethserver-webtop4.
We also updated the documentation: http://docs.nethserver.org/en/latest/webtop4.html#importing-from-outlook-pst

As you can see we have also improved and automated management Timezone :wink:

1 Like

Thanks. I will try it and if I have any further suggestions I will come
back.

Tom

hi all,

is this script also available under webtop 5 and do you thing it will work?

Thx for your response

mad

@lucag has something like that, I hope he shares it

Hi @maddin,
I have something to test and get you to try :wink:
I am preparing a How-To that I will publish as soon as possible

Still a bit of patience :grin:

1 Like

@lucag, no stress!!! I’m preparing my server for the fibre connecting at home! They promised February, this year!, but at the moment I can be glad if I get it 2019 - there a road lots everywhere but no connections in the hole town :smiley:

Ty for your work!

mad

Hi @maddin,
as promised I just published this How To, I wait for your feedback :wink: :

hi @lucag

sry, but I’ll not have time until the weekend - thank you for your patience!

1 Like

Take your time man, @lucag won’t put pressure. Here it’s

1 Like