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 |
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..... |
/var/spool/clientmqueue : cleared this folder that only has 9 small emails and things are looking better, it's all stopped for now.
|
All times are GMT -5. The time now is 03:51 AM. |