procmail
[Top] [All Lists]

Re: Modifying subjectlines via procmail

2000-07-23 22:51:21
On Thu, 20 Jul 2000, Mike A. Harris wrote:
Can someone toss a recipe at me that will remove certain text
from certain headers, and then file a message into a folder?

You can use formail for those things.

So... I'd like to have a recipe for my example mailing list where
it is called "idiot-list", and it has [idiot-list] in the subject
line.

If I understand the manpages correctly you should be able to do something
like this:

:0
* ^X-Mailing-List:.*idiot-list@
{
  :0 fw
  * ^Subject:.*[idiot-list]\/.*$
  | formail -I "Subject: $MATCH"

  :0:
  IDIOT-LIST
}

Or perhaps it is easier to do it like this:
:0:
* ^X-Mailing-List:.*idiot-list@
* ^Subject:.*[idiot-list]\/.*$
| formail -I "Subject: $MATCH" >> IDIOT-LIST


But as usual I have not written anything similar to this before I wrote
this example... :-) I just read the manpages and applied some common
sense and logic.

-- 
The more I see of men the more I admire dogs.
                -- Mme De Sevigne, 1626-1696




_______________________________________________
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>