.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::MIMEDefang::Antispam 3" .TH Mail::MIMEDefang::Antispam 3 2024-03-20 3.4.1 "Mail::MIMEDefang::Antispam Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mail::MIMEDefang::Antispam \- antispam related methods for email filters .SH DESCRIPTION .IX Header "DESCRIPTION" Mail::MIMEDefang::Antispam are a set of methods that can be called from \fImimedefang-filter\fR to check email messages with antispam softwares. .SH METHODS .IX Header "METHODS" .IP spam_assassin_is_spam 4 .IX Item "spam_assassin_is_spam" Method that scans a mmessage using SpamAssassin and returns True if the email message has been detected as spam. .IP spam_assassin_check 4 .IX Item "spam_assassin_check" Method that scans a message using SpamAssassin and returns an array of four elements, .RS 4 .IP \(bu 4 Weight of message ('hits') .IP \(bu 4 Number of hits required before SA considers a message spam .IP \(bu 4 Comma separated list of symbolic test names that were triggered .IP \(bu 4 A 'report' string, detailing tests that failed and their weights .RE .RS 4 .RE .IP spam_assassin_status 4 .IX Item "spam_assassin_status" Method that scans a mmessage using SpamAssassin and returns a \&\f(CW\*(C`Mail::SpamAssassin:PerMsgStatus\*(C'\fR object. The caller is responsible for calling the \f(CW\*(C`finish\*(C'\fR method. .IP spam_assassin_init 4 .IX Item "spam_assassin_init" Initialize Apache SpamAssassin and returns a \f(CW\*(C`Mail::SpamAssassin\*(C'\fR object. .IP spam_assassin_mail 4 .IX Item "spam_assassin_mail" Method that calls SpamAssassin and returns a \f(CW\*(C`Mail::SpamAssassin::Message\*(C'\fR object. .IP rspamd_check 4 .IX Item "rspamd_check" Method that scans the message using Rspamd and returns an array of six elemets: .RS 4 .IP \(bu 4 Weight of message ('hits') .IP \(bu 4 Number of hits required before Rspamd considers a message spam .IP \(bu 4 Comma separated list of symbolic test names that were triggered .IP \(bu 4 A 'report' string, detailing tests that failed and their weights or a Json report if JSON and LWP modules are present .IP \(bu 4 An action that should be applied to the email .IP \(bu 4 A flag explaining if the email is a spam message or not (true/false). .RE .RS 4 .Sp An optional rspamd url can be passed to the method, its default value is http://127.0.0.1:11333. .RE