MIME::ARF

Download Version 1.0: MIME::ARF

No documentation as such, yet, but a sample program and some output.

#!/usr/bin/perl
use MIME::ARF;

my $msg = MIME::ARF->new(iam => 'Just some test code',
 From => 'sender@example.com',
  To => 'recipient@example.com'
   );

my $spam = <<'EOF';
To: spamrecipient@example.com
Subject: Spammy subject
From: spammer@example.com

Spammy body
EOF

$msg->attachmail(Data => $spam);

$msg->meta('Source-IP' => '192.168.0.1',
   'Feedback-Type' => 'abuse',
      'Received-Date' => 'Wed, 4 May 2005 18:12:41 -0700'
         );

print $msg->as_string;

Produces this output:

Content-Transfer-Encoding: binary
Content-Type: multipart/report; boundary="_----------=_1115257449152010";
        report-type="feedback-report"
MIME-Version: 1.0
X-Mailer: MIME::Lite 3.01 (F2.73; B3.01; Q3.01)
Date: Thu, 5 May 2005 01:44:09 UT
Subject: Spammy subject
To: recipient@example.com
From: sender@example.com

This is a multi-part message in MIME format.

--_----------=_1115257449152010
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

This is an automated report from a badly configured system based on MIME::ARF

--_----------=_1115257449152010
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Content-Type: message/feedback-report

Feedback-Type: abuse
Version: 1
Source-IP: 192.168.0.1
Feedback-Agent: Just some test code (MIME::ARF V0.01)
Received-Date: Wed, 4 May 2005 18:12:41 -0700

--_----------=_1115257449152010
Content-Disposition: inline
Content-Length: 93
Content-Transfer-Encoding: binary
Content-Type: message/rfc822

To: spamrecipient@example.com
Subject: Spammy subject
From: spammer@example.com

Spammy body

--_----------=_1115257449152010--