#!/usr/bin/perl
# This is an small wrapper script around Mail::SpamAssassin for use
# with the exim MTA.
# It is released under the Terms of GNU General Public License (GPL) so
# use at your own risk!

use Mail::SpamAssassin;
use Mail::SpamAssassin::NoMailAudit;

####### Main script ###########################################################
$mail = Mail::SpamAssassin::NoMailAudit->new();
$spamtest = Mail::SpamAssassin->new();
$status = $spamtest->check ($mail);
#Add the X-Spam Headers:
$status->rewrite_mail ();
print $mail->as_string();
