[Cialug] HELP! Postfix not logging

David Champion cialug@cialug.org
Fri, 29 Oct 2004 16:10:00 -0500


JB needs to learn the difference between Artificial Laziness and True 
Laziness.

The Truly Lazy sysadmin scripts everything, so they only have to do it 
once. The Artificially Lazy one does the task manually because it saves 
a little time over writing a script, but then does the same task over 
and over again...

That is the lesson for today, Grasshopper. Go forth and write many scripts.

p.s. For our Apache logrotate, we do all of the rotates for the virtual 
domains (and call the webalizer for that domain), then just call the 
-HUP after the last one. I suppose it could cause you to loose a couple 
entries in some logs in the interim.

-dc

Jon Clemons wrote:

> Geesh:) Ok, for Redhat. Use script syntax below make new file in 
> /etc/logrotate.d/ called httpd or domain whatever
> 
> /web/apache/www/logs/*log {
>    missingok
>    sharedscripts
>    postrotate
>        /bin/kill -HUP `cat /web/apache/www/logs/httpd.pid 2>/dev/null` 
> 2> /dev/null || true
>    endscript
> }
> 
> And one for syslog
> 
> /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler 
> /var/log/boot.log /var/log/cron {
>    sharedscripts
>    postrotate
>        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> 
> /dev/null || true
>    endscript
> }
> 
> 
> ----- Original Message ----- From: "Bailey, Jonathan C" <bailj0@bp.com>
> To: <cialug@cialug.org>
> Sent: Friday, October 29, 2004 3:39 PM
> Subject: RE: [Cialug] HELP! Postfix not logging
> 
> 
> True, but I'd have to read up on logrotate for how to do it first. That 
> is, unless someone wants to post a crash course here.. I WOULD like to 
> know how to rotate my apache logs for multiple domains (access.log.*, 
> error.log.*)
> 
> 
> 
> Jon
> 
> -----Original Message-----
> From: cialug-admin@cialug.org [mailto:cialug-admin@cialug.org]On Behalf
> Of Jon Clemons
> Sent: Friday, October 29, 2004 3:37 PM
> To: cialug@cialug.org
> Subject: Re: [Cialug] HELP! Postfix not logging
> 
> 
> It takes longer to rotate them once by hand then it does to set it up for
> logrotate to do it for you:)
> 
> 
> ----- Original Message ----- From: "Bailey, Jonathan C" <bailj0@bp.com>
> To: <cialug@cialug.org>
> Sent: Friday, October 29, 2004 3:34 PM
> Subject: RE: [Cialug] HELP! Postfix not logging
> 
> 
> I SHOULD, but I just haven't had time to... (I do use logrotate for
> everything else)
> 
> 
> Jon
> 
> 
> -----Original Message-----
> From: cialug-admin@cialug.org [mailto:cialug-admin@cialug.org]On Behalf
> Of David Champion
> Sent: Friday, October 29, 2004 10:18 AM
> To: cialug@cialug.org
> Subject: Re: [Cialug] HELP! Postfix not logging
> 
> 
> Silly question, but do you have logrotate on your system? You can have
> it, er, rotate your logs for you.
> 
> -dc
> 
> Jonathan Bailey wrote:
> 
>> Found the issue... Had to killall -HUP syslogd after rotating logs.
>>
>>
>> Jon
>>
>> -----Original Message-----
>> From: cialug-admin@cialug.org [mailto:cialug-admin@cialug.org] On
> 
> Behalf Of
> 
>> Bailey, Jonathan C
>> Sent: Thursday, October 28, 2004 10:03 PM
>> To: cialug@cialug.org
>> Subject: [Cialug] HELP! Postfix not logging
>>
>> I just killed postfix on my server to manually rotate the logs. I
> 
> touched
> 
>> and chmoded the logs to what is below. Now postfix will not write
> 
> anything
> 
>> to the logs. The log for maildrop (which is invoked for almost every
> 
> domain)
> 
>> is working fine. Ideas?
>>
>> -rw-r-----    1 root     adm             0 Oct 28 21:34 mail.err
>> -rw-r-----    1 root     adm             0 Oct 28 21:34 mail.info
>> -rw-r-----    1 root     adm             0 Oct 28 21:34 mail.log
>> -rw-r-----    1 root     adm          217k Oct 28 21:57 mail.warn
>>
>>
>> (Note - I didn't rotate mail.warn)