[Cialug] HELP! Postfix not logging

Bailey, Jonathan C cialug@cialug.org
Fri, 29 Oct 2004 16:15:00 -0500


So Apache doesn't care if you "pull the logs out from under it"? (as in
move them out then -HUP.




Jon


-----Original Message-----
From: cialug-admin@cialug.org [mailto:cialug-admin@cialug.org]On Behalf
Of David Champion
Sent: Friday, October 29, 2004 4:10 PM
To: cialug@cialug.org
Subject: Re: [Cialug] HELP! Postfix not logging


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

The Truly Lazy sysadmin scripts everything, so they only have to do it=20
once. The Artificially Lazy one does the task manually because it saves=20
a little time over writing a script, but then does the same task over=20
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=20
domains (and call the webalizer for that domain), then just call the=20
-HUP after the last one. I suppose it could cause you to loose a couple=20
entries in some logs in the interim.

-dc

Jon Clemons wrote:

> Geesh:) Ok, for Redhat. Use script syntax below make new file in=20
> /etc/logrotate.d/ called httpd or domain whatever
>=20
> /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
> }
>=20
> And one for syslog
>=20
> /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler=20
> /var/log/boot.log /var/log/cron {
>    sharedscripts
>    postrotate
>        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2>=20
> /dev/null || true
>    endscript
> }
>=20
>=20
> ----- 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
>=20
>=20
> True, but I'd have to read up on logrotate for how to do it first.
That=20
> 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.*,=20
> error.log.*)
>=20
>=20
>=20
> Jon
>=20
> -----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
>=20
>=20
> It takes longer to rotate them once by hand then it does to set it up
for
> logrotate to do it for you:)
>=20
>=20
> ----- 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
>=20
>=20
> I SHOULD, but I just haven't had time to... (I do use logrotate for
> everything else)
>=20
>=20
> Jon
>=20
>=20
> -----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
>=20
>=20
> Silly question, but do you have logrotate on your system? You can have
> it, er, rotate your logs for you.
>=20
> -dc
>=20
> Jonathan Bailey wrote:
>=20
>> 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
>=20
> Behalf Of
>=20
>> 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
>=20
> touched
>=20
>> and chmoded the logs to what is below. Now postfix will not write
>=20
> anything
>=20
>> to the logs. The log for maildrop (which is invoked for almost every
>=20
> domain)
>=20
>> 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)


_______________________________________________
Cialug mailing list
Cialug@cialug.org
http://cialug.org/mailman/listinfo/cialug