<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><style style="display:none">Swatc/*<![CDATA[*/*#aqm-original P {
        margin-top: 0;
        margin-bottom: 0;
}
/*]]>*/</style></div><div>Swatch does have the ability to send emails, however, if you are monitoring the email system and it's down, that won't work. For one customer, I configured a sendmail (that came with the OS) service to relay the swatch results and it worked OK.<br></div><div><br></div><div data-marker="__SIG_PRE__"><div>Mark Nichols<br>Mission Critical Information Services<br>303-997-1327<br><a href="http://www.missioncriticalis.com" target="_blank" rel="nofollow noopener noreferrer">www.missioncriticalis.com</a><br></div></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Aaron Cayard-Roberts" &lt;cayaraa@earlham.edu&gt;<br><b>To: </b>"L Mark Stone" &lt;lmstone@lmstone.com&gt;, users@lists.zetalliance.org<br><b>Sent: </b>Saturday, November 2, 2019 4:31:15 PM<br><b>Subject: </b>Re: [Users] Help With Zimbra Script Please<br></div><div><br></div><div data-marker="__QUOTED_TEXT__">
<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 style="color:black">


<div dir="ltr">
<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 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>

<div 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>


</div><div dir="auto"><br></div>
<div 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><br></div></div></body></html>