[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: log rotation & parsing



On Sunday 11 September 2005 02:36, Brett <bml@bookcellar.com.au>
(<[🔎] 4323EC9D.7030009@bookcellar.com.au>) wrote:

> Greetings,
> I wish, when the mail.log is rotated, that it is first grep'ed for the
> string "reject" and the results of that grep to be mailed to a specific
> user.

man logrotate ?

    postrotate/endscript
        The lines between postrotate and endscript (both of which
        must appear on lines by themselves) are executed after the
        log file is rotated. These directives may only appear inside
        a log file definition.  See also prerotate.

    prerotate/endscript
        The lines between prerotate and endscript (both of which must
        appear on lines by themselves) are executed before the log file
        is rotated  and only if the log will actually be rotated. These
        directives may only appear inside a log file  definition.  See
        also postrotate.




Reply to: