-

ruby on rails Quick Reference page

Posted by sgj700 on May 26, 2008 in Uncategorized

Check out the new Ruby on Rails Quick Reference Page (exported from OmniOutliner Pro)

 
-

auto-manage your mailman list memberships via Active Directory groups

Posted by sgj700 on May 25, 2008 in Uncategorized

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 [...]

 
-

postfix Bash Script: Release “n” emails from hold

Posted by sgj700 on May 25, 2008 in Uncategorized

#!/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

Tags:

 
-

Perl Script to restart MailScanner if emails in the que are too high

Posted by sgj700 on May 25, 2008 in Uncategorized

#!/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 [...]

Tags:

Copyright © 2010 Sandon Jurowski All rights reserved.
Desk Mess Mirrored v1.2 theme from BuyNowShop.com.