[Mimedefang] Help with header checking

Giovanni Bechis giovanni at paclan.it
Thu Nov 26 12:31:35 EST 2020

On 11/25/20 11:45 AM, Andrea Venturoli wrote:
> Are Mail::Header and Mail::Field still current? Or are they obsolete? If so, what should be used as a replacement?
> For these messages, I see in the logs:
>> mimedefang.pl[23042]: 0AP2jef2000844: head = %Mail::Header=HASH(0x1fe80ae0)
>> mimedefang.pl[23042]: 0AP2jef2000844: RecHeads = %
> So it seems Mail::Header parsed the message, but either found no Received header (and they are there!) or it's Mail::Field that fails.
> How would I log more data to know what's going on?
> I tried adding:
>>             foreach $key (keys %$head)
>>             {
>>                 md_syslog('warning',"$key is $head{$key}");
>>             }
> Alas, only the keys are printed, not the values.
> Any hint?
this very simple parser seems to correctly parse the sample headers you posted, maybe there is something wrong inside the "foreach my $rechead (@recheads)"
portion of the code.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: received_hdrs.pl
Type: application/x-perl
Size: 496 bytes
Desc: not available
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20201126/fa5c0041/attachment-0003.pl>

More information about the MIMEDefang mailing list