Results 1 to 4 of 4

Thread: Cron job to get members of ALL distribution lists

  1. #1
    sanford is offline Trained Alumni
    Join Date
    Feb 2009
    Posts
    12
    Rep Power
    6

    Default Cron job to get members of ALL distribution lists

    Does anybody have an example/advice of using zmprov to get a daily dump of ALL distribution lists with their members?

    We'd like to get a daily dump of this to keep our internal records wiki up to date.

    I've gotten as far as using 'zmprov gadl > lists.txt' to get the distribution lists, but am stuck at finding a way to list all of the lists members (in one output file, in an automated manner.)

  2. #2
    veronica is offline Outstanding Member
    Join Date
    Jun 2008
    Posts
    594
    Rep Power
    8

    Default

    something like :-

    for i in `cat lists.txt`
    do
    zmprov gdlm $i
    done

  3. #3
    sanford is offline Trained Alumni
    Join Date
    Feb 2009
    Posts
    12
    Rep Power
    6

    Default

    Wound up with this today. (First shell script I've ever made, probably lots wrong with it, but it seems to work.)

    Code:
    #!/bin/sh
    PATH=/opt/zimbra/bin:/opt/zimbra/zimbramon:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra/snmp/bin:/opt/zimbra/sleepycat/bin:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin; export PATH
    cd /tmp/distrolists
    sleep 10
    zmprov gadl > lists.txt
    sleep 10
    sed -e 's/^/gdl /' < lists.txt > lists2.txt
    sleep 10
    zmprov -f lists2.txt > lists3.txt
    Last edited by sanford; 07-06-2009 at 08:33 PM. Reason: spelling error

  4. #4
    veronica is offline Outstanding Member
    Join Date
    Jun 2008
    Posts
    594
    Rep Power
    8

    Default

    Good to hear it works for you.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Nested distribution lists
    By Britt in forum Administrators
    Replies: 6
    Last Post: 05-10-2013, 04:01 AM
  2. [SOLVED] Zimbra logwatch.
    By nishith in forum Administrators
    Replies: 5
    Last Post: 06-10-2009, 04:42 PM
  3. Viewing members of distribution lists
    By Laird in forum Administrators
    Replies: 2
    Last Post: 07-24-2007, 03:16 PM
  4. can't add members to distribution lists
    By fisch09 in forum Administrators
    Replies: 7
    Last Post: 01-23-2007, 05:47 AM
  5. Distribution Lists and seeing Members
    By yetdog in forum Administrators
    Replies: 3
    Last Post: 02-09-2006, 10:09 AM

Posting Permissions

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