Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Freebsd maillog rotation to happen not daily. at least every 2 days ( newsyslog.conf)

Posted on 2009-12-22
3
Medium Priority
?
602 Views
Last Modified: 2013-11-22
This is my newsyslog.conf file.  How can i make the maillog rotation not happen daily and every 2 days?


/var/log/all.log                  600  7         *      @T00  J
/var/log/amd.log                  644  7         100      *     J
/var/log/auth.log                  600  7     100  *     JC
/var/log/console.log                  600  5         100      *     J
/var/log/cron                        600  3         100      *     JC
/var/log/daily.log                  640  7         *      @T00  JN
/var/log/debug.log                  600  7     100  *     JC
/var/log/kerberos.log                  600  7         100      *     J
/var/log/lpd-errs                  644  7         100      *     JC
/var/log/maillog                  640  7         *      D0  JC
/var/log/messages                  644  5         100      *     JC
/var/log/monthly.log                  640  12         *      $M1D0 JN
/var/log/pflog                        600  3         100      *     JB    /var/run/pflogd.pid
/var/log/ppp.log      root:network      640  3         100      *     JC
/var/log/security                  600  10         100      *     JC
/var/log/sendmail.st                  640  10         *      168   B
/var/log/slip.log      root:network      640  3         100      *     JC
/var/log/weekly.log                  640  5         1      $W6D0 JN
/var/log/wtmp                        644  3         *      @01T05 B
/var/log/xferlog                  600  7         100      *     JC
0
Comment
Question by:ITCity
  • 2
3 Comments
 
LVL 12

Expert Comment

by:cminear
ID: 26108860
Just so we're clear, you would like maillog to rotate once every 2 days, correct?  If that's the case, change the "D0" you currently have to "48@T01"; this set the interval for rotation to 48 hours, and specify the role time as 1AM.  (Change the "T01" to whenever you'd really like it to run.)  You could also just specify "48", in which case that would be 48 hours from the last time it was rolled.
0
 

Author Comment

by:ITCity
ID: 26111988
/var/log/maillog                  640  7         *      48@T01  JC

is this correct?

I want it to rotate every 2 days correct.

Thanks
0
 
LVL 12

Accepted Solution

by:
cminear earned 2000 total points
ID: 26112555
That is correct.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question