W. Welsey Groleau wrote,
| Another idea: Some of us use the temporary backup trick that generates
| file names like ..../Mail/backup/msg.xtOF It wouldn't be hard to generate
| ..../Mail/logs/msg.xtOF from $LASTFOLDER.
Indeed, not hard at all, especially since we are already cd'ed to $MAILDIR:
:0c
backup/
:0
* LASTFOLDER ?? ()\/[^/]+$
{ LOGFILE=logs/$BASENAME }
:0Aic
| cd backup && rm -f dummy `ls -t msg.* | sed -e 1,100d`
:0E
{ LOGFILE=logs/notbackedup }
| Then you'd have a nearly useless log file containing only the beginning
| part of the log for all messages,
Not necessarily: if you don't assign LOGFILE=anything until you determine the
name, you'll have nothing logged yet.
| plus one logfile with short name per message containing the rest.
Right.
Note that that could result in reusing a logfile if a message gets the same
backup filename as that of a message previously deleted, but the older mes-
sage's logfile was not yet deleted. Perhaps we can change the cleanup recipe
to this to remove the logfile of a message when it's time to remove its back-
up copy (note the space after the first ampersand):
:0Aic
| cd backup && \
rm -f dummy `ls -t msg.* | sed -e 1,100d -e 's-.*-& ../logs/&-'`