procmail
[Top] [All Lists]

Re: Filter on Scandinavian characters in subject

2018-09-21 06:08:59

On Wed, 19 Sep 2018, at 14:07, @lbutlr wrote:

:0 h
* ^Subject:.*=\?
SUBJECT=| formail -cXSubject: | perl -MEncode -ne 'print
encode("UTF8",decode("MIME-Header",$_))'

By rewriting the message to include UTF-8 characters in the headers you have just made your message invalid ...

This is not rewriting a message, it is assigning a variable. It's exactly what you later suggested yourself, and I agree that it is the more versatile solution:

Or, save your UTF-8 decoded subject into a variable like UTFSUB=| formail…

--
-- Andreas

    :-)
____________________________________________________________
procmail mailing list -- procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de   
Procmail homepage: http://www.procmail.org/
To unsubscribe send an email to 
procmail-leave(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://lists.rwth-aachen.de/postorius/lists/procmail.lists.rwth-aachen.de