procmail
[Top] [All Lists]

Re: formail -D generates empty msg. when duplicate found?

1999-12-11 15:27:10
From: gary(_at_)Intrepid(_dot_)Com (Gary Funck)

On Dec 11,  1:36pm, Dallman Ross wrote:
What I myself am thinking of implementing is a backup
of all non-list mail that would then get cleaned out by a cron job
and find after so many days.  I do this now (have for years) with
my procmail logs and auto-ack respondent database (everybody gets
an auto-ack no more than weekly from each unique sending address,
unless they request verbose acks or no acks).  It would be simple
to add saving mail to files each day and then use find
to delete mail over, say, 7 days old.  I would also gzip the
mail.

If I understand your suggestion above, this would require saving
each e-mail message into a separate file?  I was trying to avoid
that.  I prefer keeping related mail in a single file.


No, they don't each need a separate folder.  I will put all mail
for a 24-hour period in a daily file.  I could do it differently
if I wanted, e.g., put all in a weekly file, of course.
All files go in one directory.

I use INCLUDERC to declare the date as yymmdd and save my
current logs in that way, one log file per day.  (I use cron
to change what's in the INCLUDERC.)  But the date filename
is for *my* convenience, not for the purging mechanism,
which merely looks at the mtime of the file and deletes
if over, say, six days old.

You don't even need the INCLUDERC/cron thing to set the
date, of course, if you just take the date from the message
itself.  That assumes you don't mind trusting the dates
on the messages.

Another think I was thinking you could do is set a counter
in procmail.  Every time the counter gets to 100 new processed
messages, change the filename.  Maybe that would be more
overhead than what you are trying, I don't know.

-- 
    \     .-.     .-.     .-.     .-.     .-.     .-.     .-.     /
     \-d-/-m-\-a-/-n-\-(_at_)-/-n-\-e-/-t-\-c-/-o-\-m-/-.-\-c-/-o-\-m-/
      '-'     '-'     '-'     '-'     '-'     '-'     '-'     '-'