ruby on rails Quick Reference page
Check out the new Ruby on Rails Quick Reference Page (exported from OmniOutliner Pro)
Programming Notes
Check out the new Ruby on Rails Quick Reference Page (exported from OmniOutliner Pro)
PROBLEM
Recently we found ourselves in a situation where an Exchange 2003 email distribution list won’t work for our “faculty@” and “all@” lists because:
non-Active Directory-account-holding people outside of our Exchange organization needed to contact the list on occasion
Our Exchange Users (doctors) would occasionally need to get an email through to colleagues ASAP, OFF-HOURS, and waiting for [...]
#!/bin/bash
#release_n_emails_from_hold.sh
ls /var/spool/postfix/hold/ > /tmp/hold
COUNTER=0
RELEASE_MAX=10 #modify me as needed
RELEASED_N=0
for l in `cat /tmp/hold` ; do
if [ $COUNTER -lt $RELEASE_MAX ]; then
echo Unholding $l
let RELEASED_N=RELEASED_N+1
fi
let COUNTER=COUNTER+1
done
echo There were $COUNTER emails in the hold que. We released $RELEASED_N
#!/usr/bin/perl
use strict;
use warnings;
my $high = 200;
my $string = `postqueue -p|grep ” Requests.”`;
my $length_string = length $string;
my $start_string = index($string, ‘ in ‘)+4;
my $end_string = index($string, ‘ Requests.’);
my $fragment = substr $string, $start_string, ($end_string-$start_string);
if ($fragment > $high) {
print “que of $fragment above threshold of $high.\n”;
system(‘postqueue -p’);
system(’service MailScanner restart’);
} else {
print “que of $fragment is fine.\n”;
}
#exec(‘postqueue -p|grep [...]
Copyright © 2010 Sandon Jurowski All rights reserved.
Desk Mess Mirrored v1.2 theme from BuyNowShop.com.