[Tfug] mail logs
Michael Stenner
mstenner at ece.arizona.edu
Tue Jul 13 10:19:57 MST 2004
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
More information about the tfug
mailing list