Text-SpamAssassin
view release on metacpan or search on metacpan
Changes
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
examples/comment_spam_prefs.cf
lib/Text/SpamAssassin.pm
t/1.t
examples/comment_spam_prefs.cf view on Meta::CPAN
#
# comment_spam_prefs.cf
#
# SpamAssassin user preferences file tuned for blog comment and wiki spam
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be tweaked.
# This has been tested with SpamAssassin 2.64 and still needs testing with
# SA 3.x.
#
# This the original file that came with Text::SpamAssassin v1.2. It hasn't
# been tested or updated for 2.0. Contributions are very welcome.
#
lib/Text/SpamAssassin.pm view on Meta::CPAN
=head1 VERSION
version 2.001
=head1 SYNOPSIS
use Text::SpamAssassin;
my $sa = Text::SpamAssassin->new(
sa_options => {
userprefs_filename => 'comment_spam_prefs.cf',
},
);
$sa->set_text($content);
my $result = $sa->analyze;
print "result: $result->{verdict}\n";
=head1 DESCRIPTION
Text::SpamAssassin is a wrapper around Mail::SpamAssassin that makes it easy to check simple blocks of text or HTML for spam content. Its main purpose is to help integrate SpamAssassin into non-mail contexts like blog comments. It works by creating a...
=head1 CONSTRUCTOR
my $sa = Text::SpamAssassin->new(
sa_options => {
userprefs_filename => 'comment_spam_prefs.cf',
},
);
As well as initializing the object the constructor creates a Mail::SpamAssassin object for the actual analysis work. The following options may be passed to the constructor
=over 4
=item sa_options
A hashref. This will be passed as-is to the Mail::SpamAssassin constructor. At the very least you probably want to provide the C<userprefs_filename> as the default configuration isn't particularly well suited to non-mail spam. See L<SPAMASSASSIN CONF...
=item lazy
By default the Mail::SpamAssassin object will be fully created in the Text::SpamAssassin constructor. This requires it to compile the rulesets and load any modules it needs which can take a little while. If the C<lazy> option is set to a true value, ...
=back
=head1 METHODS
All the C<set_*> and C<reset_*> methods return a copy of Text::SpamAssasin object they are invoked on to allow easy call chaining:
lib/Text/SpamAssassin.pm view on Meta::CPAN
=back
Sane defaults will be used for any metadata that is not provided.
Additionally, the C<Content-Type:> will be set to either C<text/plain> or C<text/html> depending on the type of message content provided.
=head1 SPAMASSASSIN CONFIGURATION
By default SpamAssassin is configured in a way that does a good job of detecting spam in email traffic. Many of its rules that work well in that context are unsuitable for use in other scenarios. An example of this is DUN/DUL rulesets that check for ...
For this reason, its highly recommended that you specify an alternate configuration using the C<userprefs_filename> option in C<sa_options>. Sample configuration files can be found in the C<examples> directory of the C<Text-SpamAssassin> distribution...
=head1 BUGS
None known. Please report bugs via the CPAN Request Tracker at L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-SpamAssassin>
=head1 FEEDBACK
If you find this module useful, please consider rating it on the CPAN Ratings
service at L<http://cpanratings.perl.org/rate?distribution=Text-SpamAssassin>.
( run in 2.020 seconds using v1.01-cache-2.11-cpan-98e64b0badf )