<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
Hi Mark and Aaron,
<div><br>
</div>
<div>Thanks for your replies.&nbsp;</div>
<div><br>
</div>
<div>The action that needs to be taken is to restart mailboxd; I don\u2019t care about an email notification because there is separate monitoring that takes care of notifications.&nbsp;</div>
<div><br>
</div>
<div>8.8.15 Patch 3 contains a fix for a bug that causes the httpclient connection pool to shut down, causing the web client to display a Error 500 message.&nbsp;</div>
<div><br>
</div>
<div>Based on my and one of my customer\u2019s experiences, the bug remains elsewhere.&nbsp;</div>
<div><br>
</div>
<div>So, I\u2019m really just looking for a way to watch mailbox.log for the connection pool shut down message and restart mailboxd automatically thereafter.&nbsp;</div>
<div><br>
</div>
<div>And ideally I\u2019d not like to modify any of the existing Zimbra configs.&nbsp;<br>
<br>
How does my proposed hack script look to you?</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Mark<br>
<div dir="ltr">___________________________
<div>L. Mark Stone</div>
<div>Sent from my iPhone</div>
</div>
<div dir="ltr"><br>
<blockquote type="cite">On Nov 2, 2019, at 11:42 AM, Mark Nichols &lt;mnichols@missioncriticalis.com&gt; wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">\ufeff
<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>&quot;Aaron Cayard-Roberts&quot; &lt;cayaraa@earlham.edu&gt;<br>
<b>To: </b>&quot;L Mark Stone&quot; &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>
</div>
</blockquote>
</div>
</body>
</html>