Re: [SAdev] Best way to build a Mail::SpamAssassin:NoAudit from a Mail::Audit?
Robert Nicholson <[email protected]> Sat, 20 Dec 2003 14:20:06 -0600
| Newsgroups | gmane.comp.lang.perl.modules.mail-audit,gmane.mail.spam.spamassassin.devel |
|---|---|
| Message-ID | <[email protected]> |
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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spamassassin-devel