Hi all,
Is this a legal "From:" header?
> From: =?utf-8?b?IkVsbGEgQmFjaMOpIiA8ZGlnaXRhbEBlbGxhYmFjaGUuY29tLmF1Pg==?=
How would one extract the email address from it using Exim?
I use $rh_from: to extract the header from certain emails and this one
is breaking that. Due to the vast number of broken From: headers I see,
the processing on this header is already quite extensive and I'm
starting to think I will need to offload this processing outside of exim.
Thunderbird doesn't decode it properly; some of the other available
tools I've found either completely fail to decode it or seem to work
just fine.
Thunderbird:
"Ella Baché" <digital@???> <>
(double email address)
Other tools seem to ignore the empty address, while others just return
the input unchanged.
My current attempts to make sure I get the From header look a bit like this:
> set acl_m_headfrom = ${if eq {${address:$rh_from:}}{} \
> {${sg{${addresses:$rh_from:}}{^.*:}{}}} \
> {${address:$rh_from:}} \
> }
> set acl_m_headfrom = ${if eq {$acl_m_headfrom}{} \
> {${address:${sg{$rh_from:}{@(?=[^@]*@)}{X}}}} \
> {$acl_m_headfrom} \
> }
I moved to using the raw header because of segfaults when attempting the
above with some processed headers.