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 08-19-2010, 08:17 AM
Moderator
 
Posts: 927
Default built in everyone@ account?

You know, I've been using Zimbra long enough now that I really should know the answer to this (I suspect I do and that it's "no") but does ZCS have a built in distribution list for all known accounts?

I have a distribution list of "allstaff" and when new accounts are made, I sometimes remember to add them to it, so I can indeed send and email to that list safe in the knowledge that someone probably wont get it

I seem to remember that Exchange had everyone@ as a builtin list for this purpose, does it exist in Zimbra?
Reply With Quote
  #2 (permalink)  
Old 08-19-2010, 10:50 AM
raj raj is offline
Moderator
 
Posts: 768
Default

As you already know the answer i will just confirm..
NO

Raj
__________________
i2k2 Networks
Dedicated & Shared Zimbra Hosting Provider
Reply With Quote
  #3 (permalink)  
Old 08-19-2010, 07:40 PM
Outstanding Member
 
Posts: 717
Default

This script will quickly create a distribution list with all users...

Code:
#!/bin/bash

LISTNAME=everyone@domain.com

# Delete existing list
zmprov ddl $LISTNAME

# Create new list
zmprov cdl $LISTNAME
for acct in `zmprov -l gaa`; do
        echo "adlm $LISTNAME $acct"
done | zmprov
__________________
01 Networks, LLC / Cybernetik.net
Zimbra NE and OSS Cloud Hosting
Shared Web Hosting
Consulting Services
Reply With Quote
  #4 (permalink)  
Old 08-20-2010, 03:56 AM
Moderator
 
Posts: 927
Default

Nice!
I always forget about the scripting aspect of Zimbra.
That will inject every account though, which is good but it will include the spam/ham/wiki accounts, and any others that dont recieve mail. I've modified the script a little so that a list of accounts can be specified which will then be removed from the list.

Code:
##!/bin/bash

# --- Config section
LISTNAME=allstaff@domain.com
REMOVENAMES=( zimbra_spam@mail.comain.com zimbra_ham@mail.domain.com wiki@mail.domain.com otheraccount@domain.com )
# --- End config


# Delete existing list
echo "Removing old copy of $LISTNAME..."
zmprov ddl $LISTNAME
echo -e "...done \n"

# Create new list
echo "Adding all accounts to $LISTNAME..."
zmprov cdl $LISTNAME
for acct in `zmprov -l gaa`; do
        echo "adlm $LISTNAME $acct"
done | zmprov
echo -e "\n...done \n"

# Remove accounts from list that are known to be non-user accounts
echo "Removing non-account addresses..."
for acct in ${REMOVENAMES[@]}; do
        echo "rdlm $LISTNAME $acct"
done | zmprov
echo -e "\n...done \n"
That seems to work, I could even add that as a cron task but that feels excessive

Last edited by Dirk; 08-20-2010 at 03:56 AM.. Reason: versioning error
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.