procmail
[Top] [All Lists]

Re: remove text from 'Subject:'

2001-10-27 09:12:28
;0
* ^Subject:.*\[minolta\]
{
 :0
 | sed '/^Subject:/s/\[minolta\]//'

 :0:
 IN.camera
}

That needs to be a filter, of course:

:0
* ^Subject:.*\[minolta\]
{
 :0 fw
 | sed '/^Subject:/s/\[minolta\]//'

 :0:
 IN.camera
}

You want to be a little careful there, also, as the procmail condition
is case insensitive but the sed expression is case sensitive.  So a mail
with a subject line such as:

  SUBJECT: [minolta] blah blah

will be matched, but the sed expression won't modify it.

Plenty of alternatives (including not needing an external program such
as sed) to be found in the list archives.

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>