procmail
[Top] [All Lists]

Adding a subject line

2002-03-09 20:53:58
I tried this suggestion about a month ago, and it didn't work.
Today I dusted it off and tried a couple of dozen permutations on
this technique, and nothing has worked.  Are there any
suggestions on what I might be missing?  I have verified that
procmail is working for me on this system, and formail is on my
path.

Thanks.

At 20:02 2002-02-06 -0800, Chuck Charlton wrote:
This email has a null subject line.  I would like to add a
subject line of

        Baker


Let's assume that your first recipe actually matches the message
in
question, and perhaps has similar conditions to the following:

:0fh
* From:[        ]*root(_at_)able\(_dot_)com
* Subject:[     ]*$
| formail -I"Subject: Baker"


The 'f' flag says to FILTER this message, the 'h' flag says to
diddle only
with the header (you're not asking to mess with the body, so
let's not do
anything special with that if it isn't necessary), then piping it
into
formail with the appropriate argument will set/replace the
Subject header.

Note that the above Subject condition says if the Subject header
EXISTS,
but is at most whitespace, nothing more.  If you want an ABSENCE
of a
subject header altogether, replace that with:

* ! ^Subject:


---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer:
<http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from
the list.

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




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