add /opt/zimbra/bin/ before zmprov command and it will run from root (just wait)
I hope it helps
Code:
#!/bin/shfor account in `/opt/zimbra/bin/zmprov -l gaa`; doforwardingaddress=`/opt/zimbra/bin/zmprov ga $account |grep 'zimbraPrefMailForwardingAddress' |sed 's/zimbraPrefMailForwardingAddress: //'`if [ "$forwardingaddress" != "" ]; thenecho "$account is forwarded to $forwardingaddress"elseforwardingaddress=""fidone
Statistics: Posted by RBarci — Thu Aug 08, 2024 1:46 pm