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
  #1 (permalink)  
Old 04-11-2009, 03:53 PM
Member
 
Posts: 11
Default Importing Contacts regularly

Hi all,

(this is my first post here, please be indulgent !)

I want to import Contacts from my CRM app, which stores them in a ldap. So far I've succeeded to export these contacts, and converted them to vcf.

Then I could import them in a SharedContacts address book, using
Code:
curl -u my.user:mypassword --data-binary @/home/user/adresses.vcf http://mail.comp.com/service/home/my.user/sharedcontacts?fmt=vcf
My problem is: I'll have to import these data regularly - so we can send mails to new customers easily. So I will cron this.

Unfortunately, a second "curl / rest" command will add the entries again...

We can use
zmmailbox -z -m my.user emptyFolder /SharedContacts
to clean sharedcontacts before re-importing... but using both CLI and REST sounds unelegant and not obvious to cron.

zmmailbox -z -m my.user pru /SharedContacts /home/user/adresses.vcf
imports bad & useless stuff ;

Is there a way to REST this (some
Code:
curl http://mail.comp.com/service/home/my.user/sharedcontacts?action=empyFolder
?)

or

to tell zmmailbox to import vcf ? I tried
zmmailbox -z -m my.user pru -c vcf /SharedContacts /home/user/adresses.vcf
without success

Thanks in advance
(and btw, my colleagues appreciate zimbra ui & zimlets a lot !)
Reply With Quote
  #2 (permalink)  
Old 04-12-2009, 01:38 AM
Member
 
Posts: 11
Default I found half a solution !

Some more try & error was successful...

zmmailbox -z -m my.user pru -c text/x-vcard /SharedContacts /home/user/adresses.vcf

does import vcf cards (not documented AFAIK)

This leaves me with 2 questions:
- how can I "emptyfolders" from REST / curl ? - so I can launch the import from a remote server
or
- how can I cron a script using zmmailbox to delete & import the adresses ?

Of course, if some option is available to import contacts without duplicating existing ones, it will be an even nicer solution...
Reply With Quote
  #3 (permalink)  
Old 04-15-2009, 02:20 PM
Member
 
Posts: 11
Default

Well... is it a stupid question, or is there no solution ?
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.