stopping mail

Stuart Sears stuart at
Fri Nov 23 15:29:16 UTC 2007

tony.chamberlain at wrote:
> I made a monitor from my machine (CentOS 4.5) to do an http to a machine 
> retrieve some info to see if a process is running (on this remote machine I have
> a task running so it is easy to get the info from my machine).
> If I cannot access the remote machine, my machine sends mail to me and a couple
> other people saying the machine is unreachable. My cronjob runs every 5 minutes.
> Juts occured to me now though that if our network goes down, my machine will be
> sending mail every 5 minutes saying the machine is unreachable. These messages
> will get stored on my machine and all get sent when it comes up.

> I am wondering whether someone knows how to cancel mail that is queued on a machine, so it 
> doesn't all get sent out. I do have root access.

which mailserver are you running?


a combination of sendmail -bp and rm seems to work:

man postsuper



alternatively you could change the cron script to only attempt
connections to the remote machine IF your local network is up...


More information about the fedora-list mailing list