LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 12-12-2003, 03:42 AM   #1
vaughn
LQ Newbie
 
Registered: Dec 2003
Location: London South
Distribution: Mandrake
Posts: 1

Rep: Reputation: 0
/var/log/maillog file size


Is there anyway that I can reduce the size of the /var/log/maillog file which gets written to by Postfix? Is there some line that I can add in main.cf? thx
 
Old 12-12-2003, 04:26 PM   #2
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
You could consider use the logrotate, it could control the size of your log files ....
 
Old 12-12-2003, 05:08 PM   #3
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
Am looking at that now. I need a system whereas the logfile gets no larger than 25k. I have deleted the original maillog file because it was nearly 700k and you can imagine how hard it was to scroll down to the end. Prob is that after I have restarted Postfix, it no longer writes to the new log file. Why is this?
 
Old 12-12-2003, 05:15 PM   #4
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
Have worked out the maillog no write issue. Have restarted syslog. For the benefit of others:
/etc/init.d/syslog restart. Fingers crossed, I have made amendments to logrotate to have a file size of just 5k. thx
 
Old 12-12-2003, 10:01 PM   #5
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
I set up a script that emails the file to my work email and deletes the file every six hours. That way I have a record of all incoming email stored off the machine. When the boss comes asking about this or that message not getting in, I can show him the logs and exonerate my postfix/spamassassin system.
 
Old 12-13-2003, 04:02 AM   #6
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
Do you have an example of this script Pcghost?
 
Old 12-15-2003, 05:12 PM   #7
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
The script reads as follows

mail me@myaddress.com < /var/log/maillog
cat /dev/null > /var/log/maillog

Then I set a cron job to execute the script every 6 hours and voila.
 
  


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
STARTTLS errors in /var/log/maillog joe.biz Linux - Software 1 10-26-2005 04:18 PM
File /var/log/maillog too big. Zepiroth Linux - Software 0 05-10-2004 06:12 AM
How to control log file size in /var/log? yan Linux - General 2 10-13-2003 05:00 PM
wierd spamassassin entries in /var/log/maillog Pcghost Linux - Software 1 07-15-2003 10:56 AM
/var/log/lastlog size ??? nabil Linux - General 0 10-09-2002 06:04 PM


All times are GMT -5. The time now is 06:59 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration