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 05-19-2009, 07:49 AM
Senior Member
 
Posts: 67
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
Reply With Quote
  #2 (permalink)  
Old 05-19-2009, 08:07 AM
Senior Member
 
Posts: 67
Default

to one account is

zmprov ga user@domain|grep zimbraMailForwardingAddress:

but for all account I don't know
Reply With Quote
  #3 (permalink)  
Old 05-19-2009, 08:27 PM
Partner (VAR/HSP)
 
Posts: 67
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
Reply With Quote
  #4 (permalink)  
Old 05-20-2009, 01:41 PM
Senior Member
 
Posts: 67
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
Reply With Quote
  #5 (permalink)  
Old 09-15-2009, 10:20 PM
Special Member
 
Posts: 149
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
Reply With Quote
  #6 (permalink)  
Old 11-29-2010, 08:49 AM
Elite Member
 
Posts: 372
Default zmprov -l gaa -v

zmprov -l gaa -v ...
__________________
Thanks For any replies,
p.
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.