Philip Prindeville wrote:
> As long as I’m spouting my Christmas wish list for MIME::tools, how about
> also adding a method that not only finds the nth Received: header, i.e.
>
> $entity->get(‘received’, n);
>
> but also decomposes that into keyword/value pairs, such as:
>
> {
> ‘from’ => [‘colo3.roaringpenguin.com’, [‘roaringpenguin.com’,
> ‘[70.38.112.54]’]],
> ‘by => [‘mail.redfish-solutions.com’, [‘8.14.7’, ‘8.14.7’]],
> # or just ‘(8.14.7/8.14.7)'
> ‘with => ‘ESMTP’,
> ‘id’ => ‘rAILcfkM031817’,
> ‘for’ => ‘<[email protected]>’,
> ‘date’ => 'Mon, 18 Nov 2013 14:38:47 -0700’,
> }
>
> as an example.
>
> How much work would that be?
Lots. Have a look at Message/Metadata/Received.pm in SpamAssassin. 62k
of code and comments to parse *most* of the Received: headers various
MTAs create.
Usually.
You could probably trim a little out of there if you dropped the "trust
path" processing, but not much IMO.
-kgd
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang