Received(3pm) User Contributed Perl Documentation Received(3pm)

Mail::Field::Received -- mostly RFC822-compliant parser of Received headers

  use Mail::Field;
  my $received = Mail::Field->new('Received', $header);
  my $results = $received->parse_tree();
  my $parsed_ok = $received->parsed_ok();
  my $diagnostics = $received->diagnostics();

Don't use this class directly! Instead ask Mail::Field for new instances based on the field name!

Mail::Field::Received provides subroutines for parsing Received headers from e-mails. It mostly complies with RFC822, but deviates to accommodate a number of broken MTAs which are in common use. It also attempts to extract useful information which MTAs often embed within the "(comments)".

It is a subclass derived from the Mail::Field and Mail::Field::Generic classes.

Doesn't use Parse::RecDescent, which it maybe should.

Doesn't offer a `strict RFC822' parsing mode. To implement that would be a royal pain in the arse, unless we move to Parse::RecDescent.

Mail::Field, Mail::Header

Adam Spiers <adam@spiers.net>

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2021-01-08 perl v5.32.0