procmail
[Top] [All Lists]

Re: proper use of metamail & procmail

2001-03-07 14:29:49
Timothy J. Luoma asked:
can I capture (into $MATCH) the Content-Type: and hand it to
metamail like so:

:0fbw
* ^Content-type:*\/[^ ].*
                  ^ space missing here, I suppose
| metamail -qbc $MATCH

but then I thought about things like

      Content-Type: text/plain; charset=ISO-8859-1

and wondered how I would get rid of the ; and everything after it
(if present)... can I do this w/o resorting to 'sed'?

You could, why let that part get into $MATCH in the first place?

        :0 fbw
        * ^Content-Type: *\/[^;]+
        | metamail -qbc $MATCH

just reads everything up to the semicolon into $MATCH, no need to cut
anything off afterwards.

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