[Mimedefang] Using ARF

Kris Deugau kdeugau at vianet.ca
Mon Nov 18 18:34:04 EST 2013


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’ => ‘<philipp_subx at redfish-solutions.com>’,
> 	‘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



More information about the MIMEDefang mailing list