Re: [exim] From header with encoding not parsed?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: MRob
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] From header with encoding not parsed?
On 2023-04-12 17:42, Slavko via Exim-users wrote:
> Dňa 12. apríla 2023 16:50:29 UTC používateľ MRob via Exim-users
> <exim-users@???> napísal:
>> Hi, I have a variable to extract the email address in from header set
>> like this:
>>
>> ${lc:${address:$h_From:}}
>
> Header is valid, but after decoding it contains comma without
> qoutes, the comma is address separator and thus results in
> list of two "addresses", first without valid address, thus empty...
>
> Use raw header for address extracting -- $rh_From: that works
> for both, quoted and encoded content...


thank you Slavko!

If using rh_From: is there risk to get tricked with header like:

From: "spammer_address@???" <compromised_account@???>

${address:} expansion is following RFC 2822... so maybe its ok and the
importance is $h_ should never be used with ${address:} because that
address expansion will decode it anyway??

Also question about $h_ decoding, I dont remember if quoting is required
if it is encoded like my exmaple. Is the example a invalid header
because it needs quoting? Or is the problem that i'm using two unrelated
steps for full parsing? ($h_ then ${address:})