Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2017-11-08, 02:00:26

Author Topic: maillog and logrotate  (Read 798 times)

0 Members and 1 Guest are viewing this topic.

Offline fossxplorer

  • Master
  • **
  • Posts: 635
  • Karma: +0/-0
    • View Profile
maillog and logrotate
« on: 2015-07-26, 19:04:02 »
I've problems with /var/log/maillog, i can't see why the /var/log/maillog is empty and it keeps logging into a /var/log/maillog-$(last time of rotate) file?
It messes up my CSF and LFD detection rules!

[root@mail ~]# ll /var/log/maillog*
-rw------- 1 root root       0 Jul 26 03:44 /var/log/maillog
-rw------- 1 root root 2583438 Jul 26 19:06 /var/log/maillog-20150726
[root@mail ~]#

The same happens for all the other logs controlled by rsyslog:
[root@mail ~]# ll /var/log/cron*
-rw------- 1 root root       0 Jul 26 03:44 /var/log/cron
-rw------- 1 root root 1055186 Jul 25 20:01 /var/log/cron-20150705
-rw------- 1 root root   39127 Jul 26 19:05 /var/log/cron-20150726
[root@mail ~]#


[root@mail ~]# ll /var/log/messages*
-rw------- 1 root root         0 Jul 26 03:44 /var/log/messages
-rw------- 1 root root 163615380 Jul 25 20:04 /var/log/messages-20150705
-rw------- 1 root root   4223441 Jul 26 19:08 /var/log/messages-20150726
[root@mail ~]#

Any idea how to fix this?

Is the following commented lines causing the problem?

[root@mail ~]# cat /etc/logrotate.d/syslog
/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
{
#    sharedscripts
#    postrotate
#        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
#    endscript
}
[root@mail ~]#



« Last Edit: 2015-07-26, 19:17:26 by fossxplorer (formerly 'Mella') »
Kloxo-MR!

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: maillog and logrotate
« Reply #1 on: 2015-07-26, 20:12:01 »
Try 'sh /script/fixtraffic'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 635
  • Karma: +0/-0
    • View Profile
Re: maillog and logrotate
« Reply #2 on: 2015-08-10, 10:10:57 »
Problem is the commented out lines in:
[root@mail ~]# cat /etc/logrotate.d/syslog
#    sharedscripts
#    postrotate
#        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
#    endscript

Why did you comment them out?
Removing '#' fixes the issue!


Kloxo-MR!

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix

Page created in 0.05 seconds with 18 queries.

web stats analysis
 
Mirror created by MasterkinG32.CoM