LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2014, 05:46 PM   #1
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Rep: Reputation: Disabled
RHEL 4 Sendmail sending email every second from CRON, how to stop


Hi All,
I have a RHEL 4 box that is emailing the user root an email every second that claims it's coming from the CRON.

I went to check the all cron jobs and crontabs, I found the job under /etc/crontab

Someone had set obviously for every 30 seconds to run the ntpdate command in the past and I am not sure why but now a massive backlog of emails has come smashing through ever since I started sendmail.


30 * * * * root ntpdate ntp01.example.com


When I do a : watch -n 0.5 ls /var/spool/mqueue


I see the emails coming through:

So I commented out the entry under /etc/crontab and changed the MAILTO variable:

MAILTO=""
#30 * * * * root ntpdate ntp01.example.com

I then did a service crond restart && service sendmail restart and the emails are still coming through like crazy.


I did a search for a .vaaction file and a .mail files and could not find anything....

Does anyone have any idea, how to stop this badboy?

Thanks















Thanks
 
Old 06-19-2014, 06:04 PM   #2
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Original Poster
Rep: Reputation: Disabled
Date: Sat, 27 Mar 2010 23:30:01 +1100
From: root@server01.example.com (Cron Daemon)
To: root@server01.example.com
Subject: Cron <root@server01> ntpdate ntp01.example.com
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>

27 Mar 23:30:01 ntpdate[27944]: adjust time server 10.10.10.1 offset -0.157916 sec

Looks like there is an "X-Cron" variables I need to hunt for will dig a little deeper.....
 
Old 06-19-2014, 06:18 PM   #3
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Original Poster
Rep: Reputation: Disabled
/var/spool/clientmqueue : cleared this folder that only has 9 small emails and things are looking better, it's all stopped for now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop Cron from sending email buee Linux - Server 7 10-01-2012 02:27 PM
RHEL sending an email redhatuser1 Linux - Newbie 4 04-16-2012 03:50 AM
How to stop root sending email to a private address bstafford51 Linux - Server 3 11-04-2010 12:54 PM
Stop sending me email j.todd LQ Suggestions & Feedback 3 10-07-2008 04:53 PM
Sendmail - not sending email to outside. Blash Linux - Networking 2 05-03-2007 05:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration