Open fanto666 opened 3 months ago
It seems that "component" and "decoded_from" are sometimes defined as "bytes", thus they need decoding to a str.
I see that the first part was already fixed in #5
this patch should fix decoding of From: header fields, which can appear as array of differently encoded words
Sorry for the delay. I am really busy at the moment... Anyways, could you please make a PR for this?
I am getting following errors:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/Milter/init.py", line 770, in
milter.set_eoh_callback(lambda ctx: ctx.getpriv().eoh())
File "/usr/sbin/vrfydmn", line 199, in eoh
if "@" in component:
TypeError: a bytes-like object is required, not 'str'
and:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/Milter/init.py", line 772, in
milter.set_eom_callback(lambda ctx: ctx.getpriv().eom())
File "/usr/sbin/vrfydmn", line 341, in eom
newfrom = " ".join([s for s, in decoded_from])
TypeError: sequence item 0: expected str instance, bytes found