Obtain all the forwards per each account
Obtain all the forwards per each account
- This article is a Work in Progress, and may be unfinished or missing sections.
Purpose
In some cases or scenarios, the users can add a forward address, this feature can be used for audit purposes, but sometimes can also be a problem for some Administrators.
This Wiki/KB article is a simple script to check in a easy way all the forwards in a Zimbra Collaboration environment.
Resolution
- The first step is create the script like root user:
vi checkforward.sh
- Add the next simple script into the Script file:
#!/bin/sh # Script para visualizar redirecciones en Zimbra for account in `zmprov -l gaa`; do forwardingaddress=`zmprov ga $account |grep 'zimbraPrefMailForwardingAddress' |sed 's/zimbraPrefMailForwardingAddress: //'` if [ "$forwardingaddress" != "" ]; then echo "$account is forwarding to $forwardingaddress" else forwardingaddress="" fi done
- Save the file, and add it the proper rights for the user Zimbra, and make it executable:
chown zimbra:zimbra checkforward.sh chmod +x checkforward.sh
- Like zimbra user, you can run the script, and you will see something like the next:
./checkforward.sh admin@zimbra.local is forwarding to externalaccount@externaldomain.com testmove@example1.com is forwarding to externalaccount2@externaldomain2.com
Additional Content
- No related content.