Results 1 to 6 of 6

Thread: as to list accounts mail with forward

  1. #1
    Join Date
    Sep 2007
    Location
    Santiago - Chile
    Posts
    73
    Rep Power
    8

    Default as to list accounts mail with forward

    as I can see as accounts of my zimbra have indicated an account of mail for forward?

    zmprov ???????????

    Thanks you

  2. #2
    Join Date
    Sep 2007
    Location
    Santiago - Chile
    Posts
    73
    Rep Power
    8

    Default

    to one account is

    zmprov ga user@domain|grep zimbraMailForwardingAddress:

    but for all account I don't know

  3. #3
    Join Date
    Feb 2007
    Location
    Sioux Falls, SD
    Posts
    67
    Rep Power
    8

    Default

    I can't take credit for this command. I found it somewhere when we needed to find which users were on which mailbox servers last week.

    Original command:
    Code:
    zmprov gaa -v | grep -e zimbraMailDeliveryAddress: -e zimbraMailHost | grep -B1 SERVERNAME | grep zimbraMailDeliveryAddress: | awk '{print $2}'
    Replace SERVERNAME with your host name.

    Some modifications yield:

    Code:
    zmprov gaa -v | grep -e zimbraMailDeliveryAddress: -e zimbraMailForwardingAddress:
    This should get you a list of all e-mail address on the system, and if they have a forwarding e-mail address in, it will appear right under it.

    Example:

    Code:
    zimbraMailDeliveryAddress: user1@domain.com
    zimbraMailForwardingAddress: forward1@domain2.com
    zimbraMailForwardingAddress: forward2@domain2.com
    zimbraMailDeliveryAddress: user2domain.com
    Now, some awk / regex expert can probably clean this up.

    Cheers!
    Dusty
    CoSentry - www.cosentry.com - Co-Location & Business Resiliency Solutions

  4. #4
    Join Date
    Sep 2007
    Location
    Santiago - Chile
    Posts
    73
    Rep Power
    8

    Default

    Finally works fine :
    su - zimbra
    zmprov gaa -v | grep -e zimbraMailDeliveryAddress: -e zimbraMailForwardingAddress: -e zimbraPrefMailForwardingAddress:|sed 's/ //g' > file.out

    and

    Create file script :
    vi name_file
    insert next lines:


    text="zimbraMailDeliveryAddress"
    for i in `cat file.out`
    do
    palabra=`echo $i|cut -d":" -f1`
    if [ $palabra != $text ]
    then
    echo $account " ---> " $i
    else
    account=`echo $i|cut -d":" -f2`
    fi
    done

    save and exit

    [zimbra@bmail ~]$ ./name_file

    Best regards

    Thanks dusty

  5. #5
    Join Date
    Dec 2006
    Posts
    184
    Rep Power
    8

    Default

    My contribution...

    Adjusted the script so it only prints those accounts that are forwarding and removed the zimbrapref attrib...

    Code:
    #!/bin/sh
    text="zimbraMailDeliveryAddress"
    for i in `cat file.out`
    do
      palabra=`echo $i|cut -d":" -f1`
      if [ $palabra != $text ]
        then
            forward_acct=`echo $i|cut -d":" -f2`
            if [ ! $forward_acct == "" ]
              then
              echo $account " ---> " $forward_acct
            fi
        else
            account=`echo $i|cut -d":" -f2`
      fi
    done

  6. #6
    Join Date
    Jul 2006
    Location
    ireland
    Posts
    388
    Rep Power
    9

    Default zmprov -l gaa -v

    zmprov -l gaa -v ...
    Thanks For any replies,
    p.

Similar Threads

  1. Replies: 7
    Last Post: 02-03-2011, 07:01 AM
  2. Replies: 30
    Last Post: 01-13-2009, 08:00 AM
  3. Large volume of spam messages; see the log
    By snake_eyes in forum Administrators
    Replies: 1
    Last Post: 12-31-2008, 06:54 AM
  4. Problem syncing all folders
    By mark_the_chain in forum Error Reports
    Replies: 0
    Last Post: 11-23-2008, 04:59 PM
  5. Mail not getting to mail boxes
    By ehults in forum Installation
    Replies: 5
    Last Post: 10-31-2005, 09:24 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
  •