how to list all Forwarding email address in zimbra using command?
- emnzava
- Advanced member
- Posts: 53
- Joined: Sat Sep 13, 2014 1:28 am
- ZCS/ZD Version: 9.0.0.GA_P11 UB 14 Network Edition
- Contact:
how to list all Forwarding email address in zimbra using command?
Hi,
Recently, one of our staff complained that she is not receiving emails. I had to look on user preference tab to see if unknowingly she enabled email forwarding.
From the preference tab no email forwarding was enabled. So i had to look via command line with grep option.
I came to find out all mails are being forwarded to yahoo email account without leaving a copy of sent email.
I asked her if she knows the address and she said NO.
Therefore, i had to investigate further. Then i came to find out through zimbra admin interface. On her account, email forwarding was enabled without leaving a copy.
Now the question is how come it's not shown on user preference tab?
I only saw it through admin interface.
Also, how can i list all address that have email forwading address?
I suspect someone else might be having the same problem without knowledge.
Regards
Recently, one of our staff complained that she is not receiving emails. I had to look on user preference tab to see if unknowingly she enabled email forwarding.
From the preference tab no email forwarding was enabled. So i had to look via command line with grep option.
I came to find out all mails are being forwarded to yahoo email account without leaving a copy of sent email.
I asked her if she knows the address and she said NO.
Therefore, i had to investigate further. Then i came to find out through zimbra admin interface. On her account, email forwarding was enabled without leaving a copy.
Now the question is how come it's not shown on user preference tab?
I only saw it through admin interface.
Also, how can i list all address that have email forwading address?
I suspect someone else might be having the same problem without knowledge.
Regards
- faulumpy
- Posts: 48
- Joined: Fri Sep 12, 2014 10:39 pm
- ZCS/ZD Version: Release 8.6.0.GA.1153.UBUNTU14.64 U
how to list all Forwarding email address in zimbra using command?
Try this:
for account in `zmprov -l gaa`; do zmprov ga $account zimbraPrefMailForwardingAddress; done
for account in `zmprov -l gaa`; do zmprov ga $account zimbraPrefMailForwardingAddress; done
Release 8.6.0.GA.1153.UBUNTU14.64 UBUNTU14_64 FOSS edition, Patch 8.6.0_P6.
- emnzava
- Advanced member
- Posts: 53
- Joined: Sat Sep 13, 2014 1:28 am
- ZCS/ZD Version: 9.0.0.GA_P11 UB 14 Network Edition
- Contact:
how to list all Forwarding email address in zimbra using command?
Thank for the reply.
But suggested solution did not solve my problem. It lists all mail address available while I only want to see forward address.
e.g;
a@example.com forward to x@yahoo.com
b@example.com
Now i only want to see a@example.com with forward address x@yahoo.com. b@example.com should be skipped.
Regards
But suggested solution did not solve my problem. It lists all mail address available while I only want to see forward address.
e.g;
a@example.com forward to x@yahoo.com
b@example.com
Now i only want to see a@example.com with forward address x@yahoo.com. b@example.com should be skipped.
Regards
- faulumpy
- Posts: 48
- Joined: Fri Sep 12, 2014 10:39 pm
- ZCS/ZD Version: Release 8.6.0.GA.1153.UBUNTU14.64 U
how to list all Forwarding email address in zimbra using command?
#!/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
Release 8.6.0.GA.1153.UBUNTU14.64 UBUNTU14_64 FOSS edition, Patch 8.6.0_P6.
-
- Posts: 1
- Joined: Thu Jan 11, 2018 3:06 am
Re: how to list all Forwarding email address in zimbra using command?
Hi,
I am not familiar with any linux platform.
I tried to create the bash file as above, but when i try to execute the file it giving me error " zmprov: command not found"
I execute the bash file using root user. if i use zimbra user, it said file not found.
Where am i missed out ? Any helps is highly appreciate.
Thank you...
I am not familiar with any linux platform.
I tried to create the bash file as above, but when i try to execute the file it giving me error " zmprov: command not found"
I execute the bash file using root user. if i use zimbra user, it said file not found.
Where am i missed out ? Any helps is highly appreciate.
Thank you...
Re: how to list all Forwarding email address in zimbra using command?
It works fine for me, create the file as root user (then chmod +x) then switch to the Zimbra user (su - zimbra) and run the script with "sh +x tour_filename", what happens? You could also try the one line script in the second post (as the zimbra user) and see if that actually runs.soul_slayer88 wrote:I execute the bash file using root user. if i use zimbra user, it said file not found.
Re: how to list all Forwarding email address in zimbra using command?
What about redicrection using filters ? does it show it ?
- ccelis5215
- Outstanding Member
- Posts: 632
- Joined: Sat Sep 13, 2014 2:04 am
- Location: Caracas - Venezuela
- ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12
Re: how to list all Forwarding email address in zimbra using command?
Hi,djulien wrote:What about redicrection using filters ? does it show it ?
Use zimbraMailSieve and parse 'redirect'.
ccelis
Re: how to list all Forwarding email address in zimbra using command?
Hi,
I am using Zimbra 8.6.0_GA_1153.
How can I find all email address which are forwarded to another server or another email server.
Thanks,
Vijendra
I am using Zimbra 8.6.0_GA_1153.
How can I find all email address which are forwarded to another server or another email server.
Thanks,
Vijendra
Re: how to list all Forwarding email address in zimbra using command?
Hello,
Please help me to setup a forwarding address from txt file for a list of users that already exists via script.
Thanking you in advace.
Please help me to setup a forwarding address from txt file for a list of users that already exists via script.
Thanking you in advace.