Results 1 to 4 of 4

Thread: [SOLVED] Getting a list of aliases

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Location
    Palma, Majorca, Balearic Islands, Spain
    Posts
    44
    Rep Power
    7

    Default [SOLVED] Getting a list of aliases

    Hello everyone!

    I'd like to find a way, using the CLI, to get a list of aliases and the mailbox associated to each alias. Same with distribution lists, but the most important thing for me is aliases.

    The closest thing I've found so far is this:

    Exporting all addresses - Zimbra :: Wiki

    But it does not make a difference, and I am looking for the aliases list only. Then, separated, the distribution lists. For the email addresses I use this:

    zmprov getAllAccounts

    Thanks.
    Jaume Sabater
    http://linuxsilo.net/

    "Ubi sapientas ibi libertas"

  2. #2
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

  3. #3
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Quote Originally Posted by jsabater View Post
    I am looking for the aliases list only.
    Code:
    zmprov gaa -v | grep -e zimbraMailAlias | awk '{print$2}' > aliases.txt
    Quote Originally Posted by jsabater View Post
    Then, separated, the distribution lists.
    Code:
    zmprov gadl > alllists.txt
    Last edited by mmorse; 10-29-2008 at 11:01 AM.

  4. #4
    Join Date
    Mar 2008
    Location
    Palma, Majorca, Balearic Islands, Spain
    Posts
    44
    Rep Power
    7

    Default

    Thanks for your help, mmorse. Here you are what I did in the end in order to have an output in the form of the /etc/aliases file (just as an example, not that I want a copy of that file or a substitute of it):

    Code:
    zmprov getAllAccounts -v |
        grep -e name -e zimbraMailAlias |
        awk '{
            if (/^# name/) {
                name=$3
            } else if (/^zimbraMailAlias/) {
                print $2 ": " name
            }
        }'
    I think that this output is easy enough to parse from a Perl script or similar.

    Bye!
    Jaume Sabater
    http://linuxsilo.net/

    "Ubi sapientas ibi libertas"

Similar Threads

  1. Problem with Aliases
    By soxfan in forum Administrators
    Replies: 3
    Last Post: 03-22-2011, 06:47 PM
  2. Exchange/Imap errors
    By pmibal in forum General Questions
    Replies: 4
    Last Post: 09-23-2009, 12:46 PM
  3. E61i IMAP sync - old bug back again?
    By matt_b in forum Zimbra Mobile
    Replies: 7
    Last Post: 08-10-2008, 03:38 PM
  4. Replies: 1
    Last Post: 01-16-2008, 08:40 AM
  5. Orphaned alias for a distribution list
    By area in forum Administrators
    Replies: 0
    Last Post: 09-17-2006, 09:22 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
  •