Re: script file for cropping mail log

From: houghi (houghi_at_houghi.org.invalid)
Date: 04/14/04


Date: Wed, 14 Apr 2004 18:10:14 +0200

Aki Masume wrote:
> Hello all.
>
> I'm not much of a programmer and was just wondering if I could get some help
> doing this. What I would like to do is write a script file that I can call
> from cron to run nightly. I want to save the current mail log under a
> different name (perhaps like that day's date) and then create a new mail
> log. I thought I could just move the file out of the directory and Postfix
> will automatically recreate the file, but it doesn't. Postfix (or SuSE, not
> sure which one is doing it) just keeps updating the mail log file, even if I
> moved its location. Any ideas? I don't want the mail log file to get too
> large. Thanx.

Do you realy need a different log every day? As others already pointed
out, logrotate does this nicely. Why would you want to do it?

-- 
houghi
Quote correct 	(NL) http://www.briachons.org/art/quote/
Zitiere richtig (DE) http://www.afaik.de/usenet/faq/zitieren
Quote correctly (EN) http://www.netmeister.org/news/learn2quote.html


Relevant Pages

  • script file for cropping mail log
    ... I'm not much of a programmer and was just wondering if I could get some help ... I thought I could just move the file out of the directory and Postfix ... sure which one is doing it) just keeps updating the mail log file, ... I don't want the mail log file to get too ...
    (alt.os.linux.suse)
  • Re: script file for cropping mail log
    ... I thought I could just move the file out of the directory and Postfix ... > not sure which one is doing it) just keeps updating the mail log file, ... Fundamentalism is fundamentally wrong. ...
    (alt.os.linux.suse)
  • Re: [SLE] mail bounced when on dialup
    ... There is no postfix listed there. ... You should look carefully at the mail log. ... > I am wary of messing up postfix (having never tinkered with it ... and your normal process a maildir. ...
    (SuSE)
  • Re: intrusion via ssh
    ... > i just checked my mail log on my server (that runs sarge with postfix) ... I have a short summary of my tracking of these Bruteforce SSH2 attempts ...
    (Debian-User)
  • Re: intrusion via ssh
    ... > i just checked my mail log on my server (that runs sarge with postfix) ...
    (Debian-User)