LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2017, 12:16 PM   #16
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,843

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868

Quote:
Originally Posted by tonj View Post
I also thought my OS was based on centos, and to make it worse I've searched and there is no 'sa1' anywhere in the etc/cron folders.
How did you search for the occurrence of sa1? Also is it /etc/cron or /etc/cron.d?
Anyway (if you can) stop cron for 10m and see if the problem goes away for this period of time.
 
Old 07-12-2017, 04:53 PM   #17
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,425

Rep: Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054
crontab -l on my CentOS server does not display all the cron jobs scheduled for root.
see the contents of the files in
Code:
/etc/cron.d/
/etc/cron.daily/
/etc/cron.hourly/
/etc/cron.monthly/
/etc/cron.weekly/
and/or look at the log file
Code:
more /var/log/cron
to see what running under cron.
 
Old 07-13-2017, 02:25 AM   #18
tonj
Member
 
Registered: Sep 2008
Posts: 521

Original Poster
Rep: Reputation: 37
I searched using grep -r "sa1" /etc/* but it found nothing I could connect to cron or mail.
it's /etc/cron.d in my machine. I also looked manually through all the folders mentioned by scasey but there was no sa1 anywhere.
To emphasise, stopping mimedefang and spamassassin appears to have cleared the problem up completely. Of course I want to switch them back on again but this shows I'm getting close. I did find something else to run by you though. In the daily logwatch for the machine it lists cron jobs and some run 24 times a day. Being a genius I know this must be hourly and it would tie in with with the original maillog error I got every hour. Here is what appears in the daily logwatch:
Quote:
--------------------- Cron Begin ------------------------

Commands Run:
User asterisk:
/usr/local/sbin/fwconsole certificates updateall -q: 60 Time(s)
/usr/local/sbin/fwconsole userman --syncall -q: 96 Time(s)
/usr/local/sbin/fwconsole util cleanplaybackcache -q: 24 Time(s)
/var/lib/asterisk/bin/freepbx-cron-scheduler.php: 24 Time(s)
/var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null: 1440 Time(s)
[ -e /var/www/html/admin/modules/qxact_reports/import_queue_data.php ] && php /var/www/html/admin/modules/qxact_reports/import_queue_data.php: 288 Time(s)
[ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php: 1 Time(s)
[ -x /var/lib/asterisk/agi-bin/ddns_client.php ] && /var/lib/asterisk/agi-bin/ddns_client.php: 1 Time(s)
[ -x /var/lib/asterisk/bin/freepbx_sipstation_check ] && /var/lib/asterisk/bin/freepbx_sipstation_check: 1 Time(s)
[ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php: 1440 Time(s)
[ -x /var/lib/asterisk/bin/storage.php ] && /var/lib/asterisk/bin/storage.php: 24 Time(s)
[ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php: 1440 Time(s)
personal crontab listed: 10082 Time(s)
personal crontab reloaded: 1440 Time(s)
personal crontab replaced: 2880 Time(s)
User root:
/root/ping.sh: 24 Time(s)
/usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log: 1 Time(s)
[ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily: 1 Time(s)
run-parts /etc/cron.hourly: 48 Time(s)

---------------------- Cron End -------------------------
I've had a feeling it's something to do with asterisk but not known where to go from there.
 
Old 07-13-2017, 03:56 AM   #19
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,843

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
Quote:
I searched using grep -r "sa1" /etc/* but it found nothing I could connect to cron or mail.
it's /etc/cron.d in my machine. I also looked manually through all the folders mentioned by scasey but there was no sa1 anywhere.
To emphasise, stopping mimedefang and spamassassin appears to have cleared the problem up completely. Of course I want to switch them back on again but this shows I'm getting close. I did find something else to run by you though. In the daily logwatch for the machine it lists cron jobs and some run 24 times a day. Being a genius I know this must be hourly and it would tie in with with the original maillog error I got every hour. Here is what appears in the daily logwatch:
<snip>
I've had a feeling it's something to do with asterisk but not known where to go from there.
OK I was fooled by the fact that you're running a Centos derivative and you have a cronjob running 10min past every hour, just as sa1 does in a default Centos installation.
So I guess you're right and there is a cronjob related to asterix that runs at that time and you can check the above mentioned directories for it. Most likely is one of those running 24 times a day.
 
Old 07-19-2017, 03:41 AM   #20
tonj
Member
 
Registered: Sep 2008
Posts: 521

Original Poster
Rep: Reputation: 37
I switched mimedefang and spamassassin back on, that took care of the spam. I saw a file called 0anacron in /etc/cron.hourly. I moved this file out of the folder and restarted crond. The daily kbyte usage for sendmail in the logwatch went down to 1Mb/day even with several hundred emails going through. After a couple of days I moved the file back into /etc/cron.hourly and restarted crond. So far the mail kb usange has stayed around 1Mb. I may have solved it (crossed fingers). I suppose if it stays low for the next week I may have cracked it.
 
Old 07-19-2017, 04:12 AM   #21
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,843

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
Quote:
Originally Posted by tonj View Post
I switched mimedefang and spamassassin back on, that took care of the spam. I saw a file called 0anacron in /etc/cron.hourly. I moved this file out of the folder and restarted crond. The daily kbyte usage for sendmail in the logwatch went down to 1Mb/day even with several hundred emails going through. After a couple of days I moved the file back into /etc/cron.hourly and restarted crond. So far the mail kb usange has stayed around 1Mb. I may have solved it (crossed fingers). I suppose if it stays low for the next week I may have cracked it.
What's in that file?
If that's the culprit, aren't you curious to find out the reason?
 
Old 07-19-2017, 04:32 AM   #22
tonj
Member
 
Registered: Sep 2008
Posts: 521

Original Poster
Rep: Reputation: 37
yes I was curious and I did look at the file but couldn't see the culprit:
Quote:
nano /etc/cron.hourly/0anacron
#!/bin/bash
# Skip excecution unless the date has changed from the previous run
if test -r /var/spool/anacron/cron.daily; then
day=`cat /var/spool/anacron/cron.daily`
fi
if [ `date +%Y%m%d` = "$day" ]; then
exit 0;
fi

# Skip excecution unless AC powered
if test -x /usr/bin/on_ac_power; then
/usr/bin/on_ac_power &> /dev/null
if test $? -eq 1; then
exit 0
fi
fi
/usr/sbin/anacron -s

I also did:
nano /var/spool/anacron/cron.daily and all it contained was 20170719
 
  


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
[SOLVED] Does spamass-milter only reject based on whole-number scores? mfoley Linux - Server 1 03-13-2017 03:20 PM
Starting spf-milter: spf-milter: Milter for 'spf-milter' not found in /etc/mail/sendm Niceman2005 Linux - Software 1 07-06-2009 03:07 AM
reject=451 sendmail spooge Linux - Networking 1 06-19-2007 11:20 PM
fetchmail - How to delete mails with sendmail 451 reject MQMan Linux - Networking 4 02-05-2007 10:52 AM
bm-milter and sendmail Ammad Linux - Networking 1 11-23-2006 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:48 AM.

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