[Users] Help With Zimbra Script Please

Aaron Cayard-Roberts cayaraa at earlham.edu
Sat Nov 2 15:31:15 CET 2019


I'm pretty sure you could use a tool called swatchdog/swatch that is 
bundled with Zimbra to do this (we were just walking about it on irc this 
week so it must be stuck in my head).  It's what's used to watch the zimbra 
logs and send email notifications but if memory serves you can have it run 
other commands when a match is made instead of sending an email.

-Aaron



On November 2, 2019 9:54:07 AM L Mark Stone <lmstone at lmstone.com> wrote:
> Scripting is not my forte, but I know a little, so asking for help please.
>
> I'd like to watch mailbox.log for a certain string as the zimbra user and 
> then take an action.  Something like:
>
> tail -F /opt/zimbra/log/mailbox.log | grep --line-buffered 'Connection pool 
> shut down' | while read ; do 'zmmailboxdctl restart' ; done
>
> I'd run this in a detached screen session.
>
> Any help/suggestions appreciated!
>
> Thanks,
> Mark
>
> _________________________________________________
> L. Mark Stone



--
Aaron Cayard-Roberts
System and Security Administrator
Information Technology Services
Earlham College
801 National Road West
Richmond, IN 47374
Phone: 765-983-1851


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zetalliance.org/pipermail/users_lists.zetalliance.org/attachments/20191102/2125e5eb/attachment.html>


More information about the Users mailing list