Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #71 (permalink)  
Old 04-08-2009, 10:53 AM
bmw bmw is offline
Loyal Member
 
Posts: 93
Question Briefcase - Importing 200k files using python w/ curl script

Your help is most appreciated.
Okay, messages, contacts, calendars, pretty easy to import and is pretty stable.

But what about importing a large file store that was a shared company drive into Briefcase?

I have been trying every which way to get this done without having to do it manually.
This file store is over 200,000 files with an extensive taxonomy of (sub)folders.

First I tar-gzip (.tgz) the entire drive. Then I try to just use the import-export function from within a Zimbra account that I am using to perform all the systemwide shares.

What's funny is that the import function does the job and results all the folders in the correct structure but no files whatsoever.

I could drag-and-drop but that would take me a week to do. So, my network guru built a python script using curl as the vehicle to pass the files to Zimbra (attached with added .txt so it doesn't run on you.) Now, it works but only to a point.

When you import a file into Zimbra or use the drag-and-drop Zimlet and Firefox XPI, Zimbra adds a companion file with the extension *.meta that has the mime-type and other information. This is essential for a working file in the Briefcase. It also allows the correct icon to show up in front of the file for the correct application association that Firefox can recognize.

Using this python script, as I said it does work but Zimbra doesn't create those *.meta companion files on the import.

It's a fairly simple affair but we just don't know enough about the innards of Zimbra to be able to make it work.

You help is most appreciated.
Attached Files
File Type: txt put.py.txt (2.1 KB, 87 views)

Last edited by bmw; 04-10-2009 at 12:48 PM..
Reply With Quote
  #72 (permalink)  
Old 04-26-2010, 06:08 PM
Special Member
 
Posts: 101
Default

THis imapsync is brilliant. just migrated ten different email servers into 1 zimbra server with mult-domains. Took the script from the wiki changed it to suit my needs then one click and 17hrs later (it was a lot of data) email all migrated and end users had no idea
Reply With Quote
  #73 (permalink)  
Old 06-02-2010, 01:43 PM
Junior Member
 
Posts: 9
Default

Quote:
Originally Posted by sahuguet View Post
I am trying to use imapsync with one server with imap SSL.
Any quick idea about how to make it work?

I am looking at various examples of modified version of Perl IMAPClient used by imapsync.

regards,

Arnaud
I have used imapsync from a provider to zimbra.
my command was imapsync --host1 $provder1 --user1 $user1 --password1 $password --host2 zimbra.mycompany.com --user2 $user2 --password2 $user2 --noauthmd5 --ssl1 --ssl2
Reply With Quote
  #74 (permalink)  
Old 08-23-2010, 05:37 AM
Member
 
Posts: 12
Default Kolab Address Book exporter

I've just finished a tool for bulk export address books from Kolab into Zimbra-compatible CSV files (one file per mailbox).

It's written in python. Feel free to test and feedback.

In Kolab personal Address Book is by default stored in INBOX/Contacts folder in an RFC822 message format; one contact per message. A contact itself is stored as an attachment to the message. They also use cyrus-imapd as service application (hence, no PROXYAUTH support)

As a CON: it doesn't still export photos from contacts. And still as it is not a 1-button-tool (it only exports, not imports the into Zimbra).

At the end of file there are 2 lines:
Code:
exporter = ABExporter('/path/to/imapconn.conf')
exporter.export('/path/to/CSVfiles')
first line initializes an instance of ABExporter object giving path to it's config file as a parameter.
second line produces the sugar, milk and a cup of coffee and mixes them the way you like. Parameter is path to a directory where to write Contacts .csv files.

Format of config file is:
Code:
[imapclient]
imaplogin = manager
imappass = der_password
imapserver = kolab.domain.com
port = 143

For pythoneers:

The meaning of ABExporter.tagToCsvMap dictionary is described as ABMapType's docstring. Else is not very hard to understand, I guess.
Attached Files
File Type: gz exportAddressBooks.py.gz (3.8 KB, 11 views)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.