[Tfug] mail logs

elemint at theriver.com elemint at theriver.com
Tue Jul 13 10:55:03 MST 2004


> Find the filename that contains the postfix log messages.  Then find
> the logrotate config file that rotates that log file.  This may be
> different for different distros so I can't just tell you which file.
> This should not be hard, though.


This is on a Debian system and when I ls /etc/logrote.d

here is the output:

apache  base-config  clamav-daemon  clamav-daemon.dpkg-dist  clamav-freshclam

The file name that contains the postfix log messages is /var/log/mail.log

I tried all three of these with nothing returned:

# locate mail.log |grep logrotate
# locate postfix |grep logrotate
# locate mail |grep logrotate



Jim

> On Tue, Jul 13, 2004 at 09:42:02AM -0700, elemint at theriver.com wrote:
>> When I look in /etc/logroate.d I do not seek a postfix logrotate config
>> file, I do see a base-config file though is that what posfix logs will
>> be
>> rotated according to?
>
> Find the filename that contains the postfix log messages.  Then find
> the logrotate config file that rotates that log file.  This may be
> different for different distros so I can't just tell you which file.
> This should not be hard, though.
>
>> I want to keep a years worth of logs and have them rotated nightly and
>> then named by the date they are rotated, what is the best way to do
>> this?
>
> My advice remains the same is it was the first time you asked this
> question.  logrotate will happily rotate nightly.  However, it will
> not name files by date automatically.  You'll probably need to use
> 'mv' and 'date' to do the naming you want in the postrotate script.
> Also, you'll probably have to delete the old files in yourself in that
> script.
>
> You might search for canned solutions, but logrotate doesn't do this
> out of the box.  It will almost certainly require some
> shell-scripting.
>
> 					-Michael
> --
>   Michael D. Stenner                            mstenner at ece.arizona.edu
>   ECE Department, the University of Arizona                 520-626-1619
>   1230 E. Speedway Blvd., Tucson, AZ 85721-0104                 ECE 524G
> _______________________________________________
> tfug mailing list
> tfug at tfug.org
> https://www.tfug.org/mailman/listinfo/tfug
>



More information about the tfug mailing list