procmail
[Top] [All Lists]

Re: Marking messages as deleted...

1999-01-26 16:29:30
Patrick Rogers wrote,

| One of the uses I make of procmail is to archive mail from various sources
| based on the sender.  Since I still want to be notified when I receive
| mail from these sources I use a rule such as this:
| 
| :0c:
| * ^From:(_dot_)*soAndso(_at_)somwhere
| soAndSoArchive
| 
| to copy the mail to the archive folder for that user, and also allow a
| copy to arive in my inbox.  This works quite well, but I forget to delete
| the copies in my inbox because I don't know which ones are archived.  Is
| there a way to add "X-Status: D" to the header of the copy in my inbox?
| (It seems trivial to do so with the copy that is archived using formail
| and cat in the filter recipe).  Will this cause any problems for elm (ie:
| new mails appearing as deleted and not new.  Or will elm think they are
| both new and deleted?)?

You can use formail without cat; after the recipe that stores the message
in the archive folder, filter the copy that is on the way to your inbox:

  :0Afh
  | formail -A "X-Status: D"

Elm won't care because it doesn't understand X-Status: and will ignore it.

I'd recommend a different approach, though: do something about your mail
notification program so that it tells you when new mail is stored in an
archive folder as well as when new mail arrives in your main inbox.  Then
you won't need to have two copies of a message around or to remember to
delete the extra one.

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