module Mail

grammar EnvelopeFrom

  include RFC2822

  #        The exact character sequence of "From";
  #
  #        a single Space character (0x20);
  #
  #        the email address of the message sender (as obtained from the
  #        message envelope or other authoritative source), conformant
  #        with the "addr-spec" syntax from RFC 2822;
  #
  #        a single Space character;
  #
  #        a timestamp indicating the UTC date and time when the message
  #        was originally received, conformant with the syntax of the
  #        traditional UNIX 'ctime' output sans timezone (note that the
  #        use of UTC precludes the need for a timezone indicator);
  #        Thu Nov 24 18:22:48 1986
  #
  #        an end-of-line marker.
  rule primary
    addr_spec ctime_date
  end

  rule ctime_date
    day_name " "+ month_name " "+ day " " time_of_day " " year
  end

end

end