Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 May 2002 08:42:48 -0700 (PDT)
From:      Philip Hallstrom <philip@adhesivemedia.com>
To:        "Jack L. Stone" <jackstone@sage-one.net>
Cc:        Jason Taylor <jason+freebsd@kanda.com>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Zapping Email Box
Message-ID:  <20020515084029.H62470-100000@cypress.adhesivemedia.com>
In-Reply-To: <3.0.5.32.20020515103052.0301aa40@mail.sage-one.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020515084029.H62470-100000>