[Users] Help With Zimbra Script Please
Mark Nichols
mnichols at missioncriticalis.com
Sat Nov 2 16:42:54 CET 2019
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.
Mark Nichols
Mission Critical Information Services
303-997-1327
[ http://www.missioncriticalis.com/ | www.missioncriticalis.com ]
From: "Aaron Cayard-Roberts" <cayaraa at earlham.edu>
To: "L Mark Stone" <lmstone at lmstone.com>, users at lists.zetalliance.org
Sent: Saturday, November 2, 2019 4:31:15 PM
Subject: Re: [Users] Help With Zimbra Script Please
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/901c7c32/attachment.html>
More information about the Users
mailing list