• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Mail Exploit Warning Script

N

nickbrown

Guest
We had a need to monitor the number of emails in the qMail mail queue. I wrote the following shell script to email you when your mail queue meets a threshold.

The best way to determine what to set the threshold at is to check the number of emails in the queue every few hours over a 2-3 day period. Allow for a spike of upto 100-200 emails then there is your magic number. You can check the number of emails in your queue by running /var/qmail/bin/qmail-qstat

We set our threshold at 1000.

Code:
cd /var/qmail
messfiles=`find queue/mess/* -print | wc -w`
MIQ="$messfiles"
QUOTA="1000"
HOST="`hostname`"
if [ $MIQ -lt $QUOTA ]
then
        echo ""
else
        echo "Warning - $MIQ mails in queue on $HOST" | mail -s "EXPLOIT WARNING - Mail Queue" [email][email protected][/email]
fi

All you need to do is set the Quota variable to your desired warning threshold, and change the email address in the mail string.

Throw this in the Cron and run it as often as you feel necessary. We run it every 10 minutes.

Don't hesitate to drop me a PM if you need help

Edit. I should note I have tested this on Plesk 7.5 and Plesk 8 for Linux. I will release a Windows version when I get time to do it.

Cheers
Nick :)
 
Back
Top