How to add a contact to multiple users

How to add a contact to multiple users

   KB 23130        Last updated on 2017-02-10  

(0 votes)

This article will show how to add a contact to multiple users with an automation script.


zmprov -l gaa > /tmp/users; for i in `cat /tmp/users`; do zmmailbox -z -m $i cct email "" firstName "contact" lastName "3"; done

The command above first creates a list of all users, and then creates the account "contact3" to all of them. If you like to add it to a group of users, you need to specify them manually, or grep for a specific domain. Later you place the first and second name for the contact.

Additional Content

createContact(cct)           [opts] [attr1 value1 [attr2 value2...]]
  -f/--folder <arg>             folder-path-or-id
  -T/--tags <arg>              list of tag ids/names
  -i/--ignore                      ignore unknown contact attrs

Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 10/02/2017
Article ID: Date Modified: 2017-02-10

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Wiki/KB reviewed by SME1 SME2 COPY EDITOR Last edit by Teodor Vizirov
Jump to: navigation, search