Report the versions of the Zimbra Connector for Outlook currently in use based on the Zimbra mailbox.log file(s).
This script will report a space separated list of login date, name and address, the ZCO version, and the most recent date this version was used and where this entry can be found in the log file.
All versions should also be reported as "[unauthorized]" due to the fact that the username won't be available until after the user was logged in (use fgrep if you want to skip these lines).
It accepts an optional first parameter to specify the location of the log file(s).
Please be patient when running this script.
-
Don't report the pre-authenticated versions:
zmzcoreport | fgrep -v '[unauthenticated]'
-
Suppress the IP address due to privacy concerns:
zmzcoreport | cut -d' ' -f1-3,5
-
Sort by version, oldest first:
zmzcoreport | sort -k 2 -V
-
Sort by last login date, most recent first:
zmzcoreport | sort -k 3 -n -r
-
Read sort(1) for more examples:
zmzcoreport | sort -k 2,2V -k 3,3nr -k 1,1
-
You probably don't want to do this:
curl https://raw.github.com/silpion/zmzcoreport/master/zmzcoreport | perl
-
You probably don't want to to do this either:
zmzcoreport /var/lib/vz/private/opt/zimbra/log
$ zmzcoreport | fgrep -v '[unauthenticated]' | my-magic-obfuscator
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58124
[email protected] 7.2.1.547 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58121
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:34838
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:43882
[email protected] 7.2.2.579 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:37106
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:46638
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:33026
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58219
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58135
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:34010
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:57899
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58210
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58212
[email protected] 7.2.2.579 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:10907
[email protected] 7.2.2.579 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58200
[email protected] 7.2.3.677 20130605 192.0.2.102 /opt/zimbra/log/mailbox.log.2013-06-05.gz:62368
[email protected] 7.2.2.579 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:55610
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58141
[email protected] 7.2.2.579 20130605 192.0.2.102 /opt/zimbra/log/mailbox.log.2013-06-05.gz:7850
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:33006
[email protected] 7.2.1.547 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:9286
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58202
[email protected] 7.2.2.579 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58132
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:35669
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:36318
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:48393
[email protected] 7.2.2.579 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58193
[email protected] 7.2.3.677 20130606 192.0.2.102 /opt/zimbra/log/mailbox.log:58199
-
Sometimes the last line of a log files causes a warning like
Use of uninitialized value in split at zmzcoreport line 77, <$fh> line 272246.
Which is the reconversion of the date. Might be caused by gunzip not behaving or a missing line break.
Copyright (c) 2013, Silpion IT-Solutions GmbH http://www.silpion.de All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.