| Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-25-2009, 01:47 PM
|
#1
|
|
LQ Newbie
Registered: Dec 2007
Location: MA
Distribution: RHEL3,4,5
Posts: 3
Rep:
|
I want to disable logwatch on our RHEL servers to stop the logwatch mail
Hi all,
I need to once and for all tune our root mailbox input on our RHEL servers to keep the root mails down to a minimum.
I've set the /etc/crontab MAILTO var to null so that cron stops mailing root. Now I want to stop logwatch from loading up the root mailbox.
We have a number of monitoring apps in our environment so logwatch isn't really needed.
I've been poking at anacron and the /etc/cron.daily where the logwatch is a symlink to a logwatch.pl perl script.
If I remove the symlink to the logwatch.pl - will that effectively do want I want to do without screwing up anything else ? ( I don't want to turn sendmail off either. )
If anyone has a better idea for getting logwatch mail out of the mix , let me know.
Thx,
Stv
|
|
|
|
08-25-2009, 01:50 PM
|
#2
|
|
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Slackware 14.0
Posts: 8,464
|
Why don't you uninstall logwatch ?
|
|
|
|
08-25-2009, 02:09 PM
|
#3
|
|
LQ Newbie
Registered: Dec 2007
Location: MA
Distribution: RHEL3,4,5
Posts: 3
Original Poster
Rep:
|
Thanks for the suggestion
Thanks for that. Any other ideas short of uninstalling it ?
|
|
|
|
08-25-2009, 02:18 PM
|
#4
|
|
Member
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 352
Rep:
|
I have not tried this, but maybe leave mailto blank in /etc/crontab
Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
Maybe even make logwatch.pl non-executable
Last edited by TBC Cosmo; 08-25-2009 at 02:21 PM.
|
|
|
|
08-25-2009, 02:26 PM
|
#5
|
|
Senior Member
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,763
Rep: 
|
Quote:
Originally Posted by TBC Cosmo
I have not tried this, but maybe leave mailto blank in /etc/crontab
Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
Maybe even make logwatch.pl non-executable
|
Or change mailto to "nobody" and make nobody mail to /dev/null (In the /etc/alias file)?
-C
|
|
|
|
08-26-2009, 12:15 AM
|
#6
|
|
Member
Registered: May 2006
Location: Gz,China
Distribution: RH,FB
Posts: 196
Rep:
|
Quote:
Originally Posted by custangro
Or change mailto to "nobody" and make nobody mail to /dev/null (In the /etc/alias file)?
-C
|
You can also set this variable to null like this:
$ crontab -l
..
MAILTO=""
..
|
|
|
|
08-26-2009, 08:03 AM
|
#7
|
|
LQ Newbie
Registered: Dec 2007
Location: MA
Distribution: RHEL3,4,5
Posts: 3
Original Poster
Rep:
|
All set on the logwatch issue - Thanks
Hey all
thanks for the responses.
the mailto var in etc/crontab was already done to keep cron from mailing root. I think at this point the first reply I got is probably the way we'll go and just un-install logwatch. Thx
|
|
|
|
08-26-2009, 08:18 AM
|
#8
|
|
Moderator
Registered: May 2001
Posts: 24,811
|
The Logwatch cronjob is by default run out of /etc/cron.daily and it is a symbolic link to the actual Perl script. Ergo just removing the symlink should do.
|
|
|
|
08-26-2009, 12:53 PM
|
#9
|
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD, Ubuntu (desktop)
Posts: 3,859
Rep: 
|
Removing the symlink to logwatch.pl is probably the most elegant way to do this without causing other side effects. Keep in mind that if/when you upgrade the package it will likely recreate the symlink.
An alternative to all this is: forward root's mail to an email account you check regularly, and actually read the logwatch reports. Monitoring your system logs is a good way to get a feel for normal activity, and a good way to get advance warning when something odd is going on.
|
|
|
|
08-27-2009, 12:34 PM
|
#10
|
|
Member
Registered: Feb 2008
Location: Sacramento
Distribution: RHEL AS, mostly
Posts: 40
Rep:
|
Or, you could just configure logwatch to send the reports whereever you want them, such as an entry in /etc/aliases to that pipes to /dev/null.
Override the default "MailTo = root" that appears in /usr/share/logwatch/default.conf/logwatch.conf by adding a "MailTo =" line in your local configuration file which is /etc/logwatch/conf/logwatch.conf.
|
|
|
|
08-27-2009, 02:51 PM
|
#11
|
|
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Slackware 14.0
Posts: 8,464
|
Just wondering, why would you run logwatch on your system, if you don't want emails from the results?
Uninstall, it just uses resources.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:40 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|