procmail
[Top] [All Lists]

Re: access & modification times of mail folders

1998-01-18 00:11:14
On Saturday, Jan 17, David W. Tamkin (dattier(_at_)wwa(_dot_)com) spake thusly:

| I have come up with the following recipe that works:
| 
| :0:
| * ^TOwhatever
| {
|    :0 c
|    folder/.
| 
|    :0
|    | touch -m ~/Mail/$LASTFOLDER
| }
| 
| which does what I want.... but looks kinda ugly, especially
| considering that I have to repeat all this for each folder that gets
| new mail. Is there a better way to do what I want? Thanks.

First thought: put

TRAP='touch -m $HOME/Mail/$LASTFOLDER' # with strong quotes

early in your rcfile; then each recipe that saves to a directory can look
simply like this, and the trap will take care of the touching:

  :0 flags # no local lockfile needed for save to directory
  * conditions
  directoryname/.

Thanks, that's what somebody else also recommended.

Besides, your current setup needs an `i' flag on the recipes that call
touch, or procmail will scream bloody murder about write errors.

Why? And BTW, it does not, I mean there are no write errors (that's
what the `i' flag suppresses, right?) reported in my procmail's log
file, as far as I can see. Why should touch cause them?

-- 
Cheers,
 -Dima.

If you can read this, you're too close.

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