From owner-freebsd-questions Wed May 15 8:43: 0 2002 Delivered-To: freebsd-questions@freebsd.org Received: from cypress.adhesivemedia.com (cypress.adhesivemedia.com [207.202.159.72]) by hub.freebsd.org (Postfix) with ESMTP id 54FD337B401 for ; Wed, 15 May 2002 08:42:54 -0700 (PDT) Received: from cypress.adhesivemedia.com (localhost [127.0.0.1]) by cypress.adhesivemedia.com (8.12.3/8.12.3) with ESMTP id g4FFgmt4062820; Wed, 15 May 2002 08:42:48 -0700 (PDT) (envelope-from philip@adhesivemedia.com) Received: from localhost (philip@localhost) by cypress.adhesivemedia.com (8.12.3/8.12.3/Submit) with ESMTP id g4FFgmRg062813; Wed, 15 May 2002 08:42:48 -0700 (PDT) X-Authentication-Warning: cypress.adhesivemedia.com: philip owned process doing -bs Date: Wed, 15 May 2002 08:42:48 -0700 (PDT) From: Philip Hallstrom To: "Jack L. Stone" Cc: Jason Taylor , Subject: Re: Zapping Email Box In-Reply-To: <3.0.5.32.20020515103052.0301aa40@mail.sage-one.net> Message-ID: <20020515084029.H62470-100000@cypress.adhesivemedia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Why not change whatever is writing to the mailing list to be a script... so if you're using sendmail something like: mymailbox: |/path/to/script.sh And then script.sh can look something like: #!/bin/sh cat - > /path/to/mailbox.`/bin/date +%y-%d-%m` which would give an output of /path/to/mailbox.2002-05-15 for today... then you're cleanup script gets run at 12:01 and looks for yesterday's file and does whatever it needs to do... -philip On Wed, 15 May 2002, Jack L. Stone wrote: > >On Wed, May 15, 2002 at 09:47:41AM -0500, Jack L. Stone wrote: > >> Running FBSD-4.5 RELEASE with sendmail-8.11.6 and Qpopper > >> > >> As part of a daily digest mailing at midnight, I have a cron job that > >> copies a mailbox contents to a work file, then a script strips out the > >> extra header "noise" and sends out the nice clean digest to its members. In > >> order to cut off the mail box at precisely midnight, I have been "zapping" > >> the email box to zero it out in order to start another day's collection of > >> emails right after midnight. I use this command to "zap" the email box: > >> #echo > mymailbox > > > >my mymailbox mymailbox.yesterday > > > >Then do your cleanout etc. on mymailbox.yesterday. > > > >That should be alot safer > > > >Jason > > ....but, I must zero out "mymailbox" exactly at 23.59.... that's the > problem, not making a work copy. I already make a "work" copy like > "mymailbox.yesterday" for doing the other processes. The problem is > clearing out the original mymailbox.... > > .... our website: http://www.sage-one.net/ > > Best regards, > > Jack L. Stone > Server Admin > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message