How can the Cable Industry add to cloud computing?? Hint… Cumulus clouds.

As the computer industry continues to consolidate, we see denser and denser clusters of computational services. The VM “movement” companies are performing have been making good progress with virtualization.  The work load in their server rooms and data centers start to take on different physical and operational shapes. The virtual workloads will shift into the IaaS services provided from Amazon, … Read more

The future of Cable TV…. We better become the best ISP.

Steve White Louisville

As the Internet has permeated every aspect of the connected planet, it’s obviously safe to say the Internet is a big deal to video, phone and home entertainment. When we converse strictly about the Cable Companies, it’s clear the triple, quad plays are coming to a close and as such is leading the “cable” industry … Read more

Worn out Louisville

Went shooting with a friend John Stone this weekend, these were my pics from the photo rummage. We kinda haphazardly wandered around stopping at various places.

Delete messages from mqueue and mailq

In larger organizations, your smarthost/default SMTP gateways mailq can become overloaded with unwanted and undeliverable messages. If you have enough of them, it will add a lot of CPU and disk IO load as it tries to resend/reprocess Undeliverable messages. We have a few systems that if left unchecked would try and reprocess 100K messages every 5 min. The tmp mail files are typically located /var/spool/mqueue and directly deleting these is not the correct manner and opening each one to verify deletion will likely drive you mad. I have added four scripts that will help you manage the stagnant mail you may have accumulating in your mailq. These scripts will list the mail per target address, allow you to delete mail for a single user or an entire domain.

 

Using the below script “who-mail.sh”, you can determine what is causing the mailq to fill, which SMTP address and how many email messages exist in your mailq for delivery.  (All of these tools can be downloaded from here)

 

#!/usr/bin/perl

use strict;

my $mqueue_directory = "/var/spool/mqueue";
my %occurrences;

use File::Find;

# Recursively find all files and directories in $mqueue_directory
find( \&wanted, $mqueue_directory );

sub wanted {

    # Is this a qf* file?
    if (/^qf\w{14}/) {
        open( QF_FILE, $_ );
        while () {

            # Lines beginning with R contain an envelope recipient
            if (/^R.*:<(.*)>$/) {
                my $domain = lc($1);

                # Add 1 to the %occurrences hash
                $occurrences{$domain}++;
            }
        }
    }
}

# Subroutine to sort hash by ascending value
sub hashValueAscendingNum {
    $occurrences{$a} <=> $occurrences{$b};
}

# Print sorted results
foreach my $key ( sort hashValueAscendingNum ( keys(%occurrences) ) ) {
    print "$occurrences{$key} $key\n";
}

This prints to screen the qty and full email address of messages in queue. Looking at the bottom few rows you will typically find your main source of mailq stress.

Read more