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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-12-2003, 03:42 AM
|
#1
|
|
LQ Newbie
Registered: Dec 2003
Location: London South
Distribution: Mandrake
Posts: 1
Rep:
|
/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
|
|
|
|
12-12-2003, 04:26 PM
|
#2
|
|
Member
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334
Rep:
|
You could consider use the logrotate, it could control the size of your log files ....
|
|
|
|
12-12-2003, 05:08 PM
|
#3
|
|
Member
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77
Rep:
|
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?
|
|
|
|
12-12-2003, 05:15 PM
|
#4
|
|
Member
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77
Rep:
|
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
|
|
|
|
12-12-2003, 10:01 PM
|
#5
|
|
Senior Member
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819
Rep:
|
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.
|
|
|
|
12-13-2003, 04:02 AM
|
#6
|
|
Member
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77
Rep:
|
Do you have an example of this script Pcghost?
|
|
|
|
12-15-2003, 05:12 PM
|
#7
|
|
Senior Member
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:32 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|