Difference between revisions of "Obtain all the forwards per each account"

(Created page with "{{WIP}}{{Article Infobox|{{admin}}|{{ZCS 8.6}}|{{ZCS 8.5}}|{{ZCS 8.0}}}} =Obtain all the forwards per each account= ==Purpose== In some cases or scenarios, the users can add a...")
(No difference)

Revision as of 16:33, 27 April 2015

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 8.6 Article ZCS 8.6ZCS 8.5 Article ZCS 8.5ZCS 8.0 Article ZCS 8.0


Obtain all the forwards per each account

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.

Script-forwards-001.png

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.


Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 04/27/2015
Article ID: https://wiki.zimbra.com/index.php?title=Obtain_all_the_forwards_per_each_account Date Modified: 2015-04-27



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Wiki/KB reviewed by SME1 SME2 Copyeditor Last edit by Jorge de la Cruz
Jump to: navigation, search