<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css" style="display:none;"> #aqm-original P {
margin-top:0;margin-bottom:0;
} /* style */
 </style>
</head>
<body>
<div dir="auto">
<div dir="auto"><br></div><div dir="auto">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).&nbsp; 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.</div><div dir="auto"><br></div><div dir="auto">-Aaron</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir='auto'><br></div>
<div id="aqm-original" style="color: black;">

<!-- body start -->
<div dir="ltr" class="aqm-original-body">
<div style="color: black;">
<p style="color: black; font-size: 10pt; font-family: sans-serif; margin: 8pt 0;">On November 2, 2019 9:54:07 AM L Mark Stone &lt;lmstone@lmstone.com&gt; wrote:</p>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Scripting is not my forte, but I know a little, so asking for help please.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'd like to watch mailbox.log for a certain string as the zimbra user and then take an action.&nbsp; Something like:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
tail -F /opt/zimbra/log/mailbox.log | grep --line-buffered 'Connection pool shut down' | while read ; do 'zmmailboxdctl restart' ; done<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'd run this in a detached screen session.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Any help/suggestions appreciated!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Mark</div>
<div id="Signature">
<div></div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top:0px; margin-bottom:0px"><strong>_________________________________________________</strong></p>
<p style="margin-top:0px; margin-bottom:0px"><strong>L. Mark Stone</strong></p>
<p style="margin-top:0px; margin-bottom:0px"><br>
</p>
</div>
</div>
</blockquote>
</div>
</div>
<!-- body end -->

</div><div dir="auto"><br></div>
<div id="aqm-signature" dir="auto" style="color: black;"><div dir="auto"><br></div><div dir="auto">--</div><div dir="auto">Aaron Cayard-Roberts</div><div dir="auto">System and Security Administrator</div><div dir="auto">Information Technology Services</div><div dir="auto">Earlham College</div><div dir="auto">801 National Road West</div><div dir="auto">Richmond, IN 47374</div><div dir="auto">Phone: 765-983-1851</div><div dir="auto"><br></div></div><div dir="auto"><br></div>
</div></body>
</html>