Results 1 to 7 of 7

Thread: help on zmmailbox --file args

  1. #1
    indu is offline Active Member
    Join Date
    Dec 2007
    Posts
    36
    Rep Power
    7

    Unhappy help on zmmailbox --file args

    how can i creat contacts in the contact group for a user in bulk .
    canthe zmmailbox --file args help on it?

  2. #2
    schemers is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    9

    Default

    Just type: "help contact" while in zmmailbox and you'll get a list like:

    Code:
      createContact(cct)           [opts] [attr1 value1 [attr2 value2...]]
        -i/--ignore                  ignore unknown contact attrs
        -f/--folder <arg>            folder-path-or-id
        -T/--tags <arg>              list of tag ids/names
    
      deleteContact(dct)           {contact-ids}
    
      flagContact(fct)             {contact-ids} [0|1*]
    
      getAllContacts(gact)         [opts] [attr1 [attr2...]]
        -f/--folder <arg>            folder-path-or-id
        -v/--verbose                 verbose output
    
      getContacts(gct)             [opts] {contact-ids} [attr1 [attr2...]]
        -v/--verbose                 verbose output
    
      modifyContactAttrs(mcta)     [opts] {contact-id} [attr1 value1 [attr2 value2...]]
        -i/--ignore                  ignore unknown contact attrs
        -r/--replace                 replace contact (default is to merge)
    
      moveContact(mct)             {contact-ids} {dest-folder-path}
    
      tagContact(tct)              {contact-ids} {tag-name} [0|1*]
    The command you are looking for is "createContact", as in:

    Code:
     createContact email foo@bar.com firstName Mark lastName Smith
    In order to easily see all the various attribute names, I'd recommend fully populating a sample contact, then use "getAllContacts" to dump out the contacts and you'll see all the attributes.

    For example, you'll see something like this:

    Code:
    Id: 282
    Folder: /Contacts
    Date: 12/20/07 19:15
    Revision: 27
    Attrs:
      workPhone: (408) 123-4567
      email: markmack@example.zimbra.com
      workURL: http://www.example.zimbra.com
      firstName: Mark
      workCountry: US
      workState: CA
      company: Zimbra
      lastName: Mack
      ...
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    indu is offline Active Member
    Join Date
    Dec 2007
    Posts
    36
    Rep Power
    7

    Default thanks

    thanks ..
    sending
    Last edited by indu; 01-15-2008 at 11:55 PM.

  4. #4
    schemers is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    9

    Default

    Still not completely following, but to use --file you just need to put all the createContact commands in a file, one per line, and then pass that file name as the argument to "--file".

    Code:
    zmmailbox -z -m {email-address} -f ./commands
    Bugzilla - Wiki - Downloads - Before posting... Search!

  5. #5
    indu is offline Active Member
    Join Date
    Dec 2007
    Posts
    36
    Rep Power
    7

    Default contact group=personal distribution

    Thanks for the support...contact group=personal distribution list i mean...(i think might be better)

    1.This file has to be in csv.

    2.The command cct -f/Contacts fileAs 8:<group contact name> dlist user@domain,user2@domain

    will be fine to be in the file?
    3.if there is 50+users still have to have them typed or can it be passed..

  6. #6
    schemers is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    9

    Default

    No, the file isn't CSV. The file for "--file" is a series of zmmailbox commands, one per line.

    For a contact group/pdl you'l need:
    Code:
    cct type group nickname friends fileAs 8:friends dlist "user@domain,user2@domain"
    where you'd replace "friends" with the name of the group.

    Note you can also you zmmailbox to import a bunch of contacts in CSV format.

    That command is "postRestURL":

    Code:
    postRestURL contacts  /some/file/contacts.csv
    You can also use:

    Code:
    getRestURL contacts
    to dump out the contacts folder in CSV.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  7. #7
    indu is offline Active Member
    Join Date
    Dec 2007
    Posts
    36
    Rep Power
    7

    Default Thanks a ton

    Thanks for the prompt reply...
    The cct command i had tried was also creating the contact group.


    the format dlist "user@domain,user2@domain"
    can i import 100+contacts from a csv file into the dlist instaed
    Last edited by indu; 01-16-2008 at 12:41 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. centos 5 zimbra 4.5.6 no statistics
    By rutman286 in forum Installation
    Replies: 9
    Last Post: 08-14-2007, 09:30 AM
  2. Opensource backup Question.
    By nfear24 in forum Administrators
    Replies: 3
    Last Post: 03-31-2007, 11:47 PM
  3. Replies: 5
    Last Post: 03-01-2007, 03:20 AM
  4. Traslation SVN tree status
    By meikka in forum I18N/L10N - Translations
    Replies: 7
    Last Post: 02-13-2007, 11:13 AM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •