This category contains 3 posts

Delete emails on Zimbra based on Subject

This is just a modification of what I have found from this link. Have added ability to loop through a mailbox when it finds multiple messages matching the subject defined. #!/bin/bash EMAIL_ADDRESSES=temp_email SUBJECT=”Employee Compensation Letter” echo “Subject is: $SUBJECT” echo “” cat $EMAIL_ADDRESSES|while read mailid; do #echo $mailid #getting the mboxstore id to search for … Continue reading

Monitoring Script to Keep IPsec Tunnel Active

This script is used in our environment wherein it monitors certain tunnel. This is just a workaround though as we only encounter this when the other side of the tunnel is using Fortigate Firewall.  This can be handy as well when you want to monitor any connection as it can do some  automation like restarting … Continue reading

Simple Perl Script To Kill a Process Which Has Gone Wild

Purpose: Kills specified process when it has gone wild and consumed a lot of server resources. In this example, I have known process which goes wild once in a while so I have to automate the killing process. #!/usr/bin/perl use Net::SMTP; use strict; use warnings; our $one_min_avg; our $five_min_avg; my $oneminlimit = 15; my $fiveminlimit … Continue reading