?
Solved

How to disable root from sending out emails to localhost?

Posted on 2004-09-10
8
Medium Priority
?
660 Views
Last Modified: 2013-12-17
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
0
Comment
Question by:m3m0
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 12026555
No, not easily, because "root" on a *NIX system is basically unlimited, by design. You can't set file/directory permissions that root can't override.

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.
0
 

Author Comment

by:m3m0
ID: 12026686
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.  
0
 
LVL 18

Accepted Solution

by:
liddler earned 600 total points
ID: 12026924
As PsiCop says, it's cron that's doing it
change your cron job to be
10 10 * * * /path/to/mrtg > /dev/null 2>&1
and no mails will be generated
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 34

Expert Comment

by:PsiCop
ID: 12027533
Thanks, lidder. I couldn't remember the syntax and I didn't have a *NIX box handy to check.
0
 
LVL 18

Expert Comment

by:liddler
ID: 12027614
No UNIX box in front of you? Isn't that a sin?
0
 

Author Comment

by:m3m0
ID: 12027771
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.
0
 
LVL 18

Expert Comment

by:liddler
ID: 12027864
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
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12028057
"No UNIX box in front of you? Isn't that a sin?"

Unfortunately, when you're a multi-platform sort of guy, it happens.
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nearly six years ago I was hired by a company to be their senior server engineer. One of my first projects was to implement Exchange Server 2007 on a Windows Server 2008 Single Copy Cluster for high availability. That was the easy part; read on to l…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question