I'm using an auto-acknowledgment system which uses a file called
cache.ack which caches who has sent me messages that the auto-ack system
has replied to. The only problem is that this file will just keep on
getting bigger and I have to manually take out the old names.
Is there any way to have formail (or procmail) automatically edit the
file everytime it is accessed (unless you have a better solution) and
edit out all the e-mail addresses that are 2 days old, thus keeping the
file nice and small.
Hi Brock,
I vaguely recall you borrowing the idea from one of my scripts, but it
looks like you didn't borrow the entire idea, which was to remove acks
which were older than a day (or whatever period you use). Here's the
snippet from "ackmail.rc":
# Not in the $ACKS file; add it
JUNK=`(fgrep -i -v "$SENDER" $ACKS ; echo "$SENDER $DATE" ) >$ACKS.new ;
rm -f $ACKS ; mv $ACKS.new $ACKS `
Notice the "fgrep"? This removes any cache entires of the same sender,
regardless of the date. So, you never have more than a single entry for
any one correspondant.
I believe that "multigram" can do address list management, but it
currently doesn't support associated time stamps.
Alan