m3m0
asked on
How to disable root from sending out emails to localhost?
I've been seeing this lately on my server where root sends out an email for basically anything it does e.g. when an mrtg command is ran from cron it sends out an email to localhost which fails and gets stuck on the clientqueue. Is there anyway to disable root from sending out emails for anything it does?
thx.
G
thx.
G
ASKER
I cant remove the cron as they generate our mrtg graphs for our network, and they are simple crons set not with the intention of having root sending out an email to localhost everytime the commands run.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks, lidder. I couldn't remember the syntax and I didn't have a *NIX box handy to check.
No UNIX box in front of you? Isn't that a sin?
ASKER
cool i made the change and now its working. But for some reason now and alerts that are sent from nagios(the monitoring tool) get queued on the clientque folder. This is driving me nuts.
Not used nagios, but I assume it's got a mailing facility and that can be switched off.....
from this: http://article.gmane.org/gmane.network.nagios.plugins/837
>>The sending-mail command is defined in the configuration, so it
>>is whatever that command does. You can change it to use a
>>different command that supports the mail routing you want.
so have a look for the sending-mail command
from this: http://article.gmane.org/gmane.network.nagios.plugins/837
>>The sending-mail command is defined in the configuration, so it
>>is whatever that command does. You can change it to use a
>>different command that supports the mail routing you want.
so have a look for the sending-mail command
"No UNIX box in front of you? Isn't that a sin?"
Unfortunately, when you're a multi-platform sort of guy, it happens.
Unfortunately, when you're a multi-platform sort of guy, it happens.
Fiddling with root's path to make it unable to see the mail software is dangerous.
Why not simply remove the cron jobs generating the E-mail, or modify them so they do not generate an E-Mail? Seems a lot simpler than trying to thwart a basic *NIX design.