Sendmail Cheat Sheet

We have a small issue with one of our sites, and we have the following error in the message log

rejecting connections on daemon MTA: load average: 20

There is an underlying issue I believe, but it is not helped by Sendmail not being able to deliver some mail.

How do we find the mail and delete it.

There a  few basic Sendmail commands, I will need to buy a book on this subject if it gets to be more problematic 🙂


To display what is in the queue for delivery


To look at the messages and possibly delete them

cd /var/spool/mqueue


You can use cat, more or vi to have a look at any of the messages

rm filename

Can be used to delete them





#!/bin/bash## Backup Script#
#Constants#PATH=/usr/local/bin:/usr/bin:/bin:#DATE=`date +%Y-%m-%d_%Hh%Mm`DATE=`date +%Y-%m-%d`S3LOGDIR=”S3backup”LOGDIR=”/var/log”
# Directory for logs# Use the standard log file directories# Create required directoriesif [ -d “$LOGDIR/$S3LOGDIR” ]; # Check log Directory exists.thenecho “directory exists”elseecho “the directory does not exist”mkdir -p “$LOGDIR/$S3LOGDIR”fi;#Clean up the error file before the script startsrm -f $LOGDIR/$S3LOGDIR/s3errfile
#———————————————————————-# Change the directories below
# Directory to backupBACKUPSRCDIR=”/usr/local/apache2/livesite/”#BACKUPSRCDIR=”/opt/churchill/livesite/”
#Main S3 bucketS3Bucket=”s3://churchill1795-websync”
#Directories that will be synced using s3S3SyncBucket=”live-sync/”LocalSyncDir=”$BACKUPSRCDIR”
#End the variables that need entering#———————————————————————-
#Sync the Live site so that it can be synced back to the other servers
#Check that the S3 connection is availables3cmd ls $S3Bucket/ 2>&1>$LOGDIR/$S3LOGDIR/s3errfileif [[ -s $LOGDIR/$S3LOGDIR/s3errfile ]] ; thenecho “connection OK”elseecho “S3 bucket connection failed”exit 1fi ;

#Sync the big folders to S3s3cmd sync $S3Bucket/$S3SyncBucket $LocalSyncDir


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s