Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using QMail with Plesk 10 on an Apache server.

Occasionally the mail queue stops processing emails - this most recently happenend when an email account got hacked and started sending hundreds of emails.

We did not find out about this until a client of ours contacted to say that their emails were not being recieved, so we checked the mail queue and lo and behold the service had stopped.

In future I would like to be notified when the mailqueue stops.

How can I set something up so the server will run a command whenever the mailqueue stops?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Monit is a monitoring tools easy to setup, with this tool you should quickly and easily setup (far more than Nagios) a good monitoring for your mail service.

share|improve this answer

Get a server or systems monitoring tool like Nagios to watch the service. If it stops it can take corrective action or send an email, message, etc.

share|improve this answer
    
the cheapest option I can find on their site is $1295 - I'm looking for something < $100 per year or free –  Ash Jul 3 '12 at 19:19
    
Um, it has an open source version... nagios.org/download –  Brent Pabst Jul 3 '12 at 19:21
    
Ah - didn't see that! –  Ash Jul 3 '12 at 19:40
    
Looks good but main caveat is that it has to be installed on 'clean' servers. My server has existed for a while now and as such this is not really an option. –  Ash Jul 4 '12 at 17:48

I also came across http://www.splunk.com/ when I was trying to answer this question myself.

It is pretty fully featured and although it does not (appear) to monitor services directly, you can tie it into the output of logs and have it alert when a certain string is provided in the logs.

share|improve this answer
    
this is good - but the free version does not include notification tools which, is exactly what I am looking for. –  Ash Jul 4 '12 at 17:47
    
If you want somethink to analyse logs, you can use "sec" simple-evcorr.sourceforge.net –  profy Jul 4 '12 at 18:03
    
No - the main thing we wanted was a notification tool - it just so happens that splunk as well as being mainly for analyzing logs, comes with notification tools. –  Ash Jul 4 '12 at 18:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.