List all Forwarding email address in zimbra ?

####################  Method -1 ####################


Step :1

Create below mentioned bash file:


#vi getforwarding.sh

#!/bin/sh

for account in `zmprov -l gaa`; do
 forwardingaddress=`zmprov ga $account |grep 'zimbraPrefMailForwardingAddress' |sed 's/zimbraPrefMailForwardingAddress: //'`
 if [ "$forwardingaddress" != "" ]; then
  echo "$account is forwarded to $forwardingaddress"
 else
  forwardingaddress=""
 fi
done
 

Step: 2
 
change permission

chmod +x getforwarding.sh

 
Step: 3

Execute the file

#su zimbra
$./getforwarding.sh



################# Method -2 ####################

#su zimbra
$
for account in `zmprov -l gaa`; do zmprov ga $account zimbraPrefMailForwardingAddress; done
 
 
Ref:
https://forums.zimbra.org/viewtopic.php?t=56501
 

Comments

Popular posts from this blog

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Error "Unable to retrive Zimbra GPG key for package validation"