procmail
[Top] [All Lists]

Re: Formail -A switch question

2001-05-31 11:39:23
:0 f
* ^TO_urgent(_at_)mydomain
| ${FORMAIL} -I"Subject: Urgent"

...

How do I get | ${FORMAIL} -A"Subject: Urgent" to work?

I think you misunderstand what the -A flag does.  It won't append
"Urgent" to your existing subject line, it will append a line reading
"Subject: Urgent" to the mail header.  So you will now have two subject
lines - one with the original subject and one just reading "Urgent".
And your mail client is probably just displaying the first (original)
subject line, making it look like formail hasn't done anything.  What
you probably want to do is something like (untested):

 :0 f
 * ^TO_urgent(_at_)mydomain
 * ^Subject:\/.*
 | formail -I"Subject: $MATCH Urgent"

which will replace your original subject line with the same string with
'Urgent' added.  Is that what you're looking for?

Hope that helps,
Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
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>