I decided to create the following subroutines
sub noma_from_string_or_arrayref {
my $arrayRef = (ref $_[0] eq 'ARRAY') ? $_[0] : [ split(/^/m, $_[0])
];
my $no_audit = Mail::SpamAssassin::NoMailAudit->new ('data' =>
$arrayRef);
return $no_audit;
}
sub ma_from_string_or_arrayref {
my $arrayRef = (ref $_[0] eq 'ARRAY') ? $_[0] : [ split(/^/m, $_[0])
];
my $mail_audit = Mail::Audit->new(
nomime=> 1,
emergency=>"$maildir/.emergency/",
loglevel=>2,
log=>$log,
data=>$arrayRef);
return $mail_audit;
Can anybody tell me if that looks reliable?
On Dec 20, 2003, at 1:01 PM, Robert Nicholson wrote:
What is the most efficient and effective way to build a NoAudit from
an Audit using data=
Do I just append the header and body arrays and use that for data=> ?
Is there a method that already return a reference to list with all
lines in it?
secondly,
currently the only messages that arrive to me without Message-ID's and
consequently
break if I'm using a Mail::Audit are those that are spam.
Is it fair to expect that every MUA will in fact create a Message-ID?
In my case since I'm using a Mail::Audit if I want to learn I need to
learn
from a NoAudit but accept from the Audit.
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for
IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys
admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Spamassassin-devel mailing list
Spamassassin-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spamassassin-devel
|