procmail
[Top] [All Lists]

Re: reprocessing an mbox of mail already received

2002-05-13 06:06:36
Ed Wildgoose asked,

| Courier IMAP appears to use the last modified date of the file when using
| Maildir format, as the "received" date.  Is it possible to get Procmail to
| tweak the Maildir file modified date so that it doesn't appear that all
| emails are new after reprocessing?

Procmail reads from stdin and wouldn't know the modification time of the file
that stdin is being fed from.  You might pass the name of the input file as a
command-line variable assignment to procmail (or through procmail's -a
option), and include a TRAP= assignment in the rcfile that touches
$LASTFOLDER -r the input file.  [I don't want to think about what to do if
your implementation of touch doesn't do -r; it gets really messy.]  A wrapper
script may make it easier, since you wouldn't have to type the name of the
source file in two places:

#!/bin/sh
# Usage: $0 sourcefile [rcfile]

procmail TRAP='touch -r $SOURCE $LASTFOLDER' SOURCE=$1 $2 < $1


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>