haqthegibson.com

The lair of Jonesy

Main
Older Articles
Downloads

links:
Jigsaw Boys
atChurch
Sdesigns
DoorStamp
LolDNS - a djbdns fork

User ID:
Password:

ORSMHosting.com

Valid XHTML 1.0!

Valid CSS!

Removing Large Messages From Sendmail Mail Queue -
A few times I've had a client complain that the internet is slow, and when I've investigated, I've found that someone in the office has sent out a 10MB email to 50 people.

I've found this short bash script to be adept at removing the offending emails:

cd /var/spool/mqueue; find . -size +1000k 2>/dev/null |sed -e 's/^\.\///g;p;s/^d/q/g' |xargs rm



-Jonesy