Re: [maildropl] Maildrop handling subject containing unicode characters
Brought to you by:
mrsam
|
From: Milan O. <cou...@di...> - 2022-09-09 13:42:01
|
On Wed, 07 Sep 2022 18:21:09 -0400
Sam Varshavchik <mr...@co...> wrote:
[ snip ]
> You can use reformime to reencode unicode back into ascii-only:
>
> $ reformime -o 'Hóla!'
> =?UTF-8?B?SMOzbGEh?=
>
> So, you probably want something like:
>
> Subject=`reformime -o "$MATCH1"`
>
> and, with everything else, it should work.
>
> maildrop does not do variable substitution inside backticks, so this
> command gets passed directly for execution to the shell, and it
> safely substitutes $MATCH1, from the inherited environment.
Unfortunately, it does not work for me.
My snippet coming into action:
if (/^Subject: *(Test .*)/)
{Subject=`reformime -o "$MATCH1"`
echo "subject $MATCH1 -> $Subject"
xfilter 'reformail -i"Subject: $Subject"'
}
Mail sent with subject 'Test ľščťž', encoded form is
Subject: Test =?UTF-8?B?xL7FocSNxaXFvg==?=
(end of) line in log from echo statement above produced is
subject Test ľš�M-^Mťž -> Test
(letter č is not properly displayed here, which could be different
issue) and mail being delivered has subject Test. Pure ASCII, no UTF-8,
neither raw nor encoded.
> Note that, either way, changing the subject line will likely break
> any signatures that include the original subject line.
That's accepted here, I have no problem with this - if necessary, any
signature like DKIM could be removed or modified as necessary. I
understand this issue and can handle it, if it causes any issue.
Regards,
Milan
|