CPANPLUS-Dist-Slackware

 view release on metacpan or  search on metacpan

lib/CPANPLUS/Dist/Slackware/Plugin/Mail/SpamAssassin.pm  view on Meta::CPAN

* perl-Geo-IP
* perl-Mail-SPF
* perl-Net-Patricia
* perl-ldap
* perl-libwww

Downloading the SpamAssassin ruleset
------------------------------------

After installing SpamAssassin, you need to download and install the
SpamAssassin ruleset using "sa-update".  See the README file for details.  If
you don't want to run "sa-update" as root, create a dedicated account and a
required directory before you run "sa-update".  Example:

    useradd -u 400 -r -U -c "User for SpamAssassin rule updates" \
        -m -d /var/lib/spamassassin sa-update

    mkdir -m 700 /etc/mail/spamassassin/sa-update-keys
    chown sa-update:sa-update /etc/mail/spamassassin/sa-update-keys

    su sa-update -c /usr/bin/sa-update

If "re2c", which is available at slackbuilds.org, is installed, the ruleset
can be compiled into native code to speed up SpamAssassin's operation:

    su sa-update -c /usr/bin/sa-compile

The compiled rules are loaded if the Rule2XSBody plugin is enabled in
SpamAssassin's configuration.

If you want to keep the ruleset up-to-date, create a weekly or monthly cron
job that runs a shell script like the following one:

    #!/bin/sh
    if su sa-update -c /usr/bin/sa-update; then
        if [ -x /usr/bin/re2c ]; then
            su sa-update -c /usr/bin/sa-compile >/dev/null 2>&1
        fi
        if [ -f /var/run/spamd.pid ]; then
            kill -HUP $(cat /var/run/spamd.pid)
        fi
    fi

Running the SpamAssassin daemon
-------------------------------

To enable spamd, add the execute permissions to the /etc/rc.d/rc.spamd init
script with the chmod command.  Also, make sure that the daemon is enabled in
/etc/spamassassin.conf.

Run spamd without root privileges if per-user configuration files are not
needed.  First create a dedicated account.  Example:

    useradd -u 401 -r -U -c "User for SpamAssassin daemon" \
        -m -d /var/lib/spamd spamd

Then set the following options in /etc/spamassassin.conf:

    OPTIONS="-u spamd -x"

On a busy server, you might have to add options like "--min-children",
"--max-children", "--min-spare" and "--max-spare".  See the spamd manual page
for a complete list of options.

Finally run spamd:

    /etc/rc.d/rc.spamd start
END_README
}

1;
__END__

=head1 NAME

CPANPLUS::Dist::Slackware::Plugin::Mail::SpamAssassin - Add an init script and documentation

=head1 VERSION

This document describes CPANPLUS::Dist::Slackware::Plugin::Mail::SpamAssassin version 1.030.

=head1 SYNOPSIS

    $is_available = $plugin->available($dist);
    $success = $plugin->pre_package($dist);

=head1 DESCRIPTION

This plugin adds an init script and additional documentation to the
SpamAssassin package.

=head1 SUBROUTINES/METHODS

=over 4

=item B<< $plugin->available($dist) >>

Returns true if this plugin applies to the given Perl distribution.

=item B<< $plugin->pre_package($dist) >>

Adds an init script and documentation.  Returns true on success.

=back

=head1 DIAGNOSTICS

None.

=head1 CONFIGURATION AND ENVIRONMENT

None.

=head1 DEPENDENCIES

Requires the command C<cp>.

=head1 INCOMPATIBILITIES

SpamAssassin packages created with CPANPLUS::Dist::Slackware conflict with
packages created with the SpamAssassin build script available at



( run in 1.057 second using v1.01-cache-2.11-cpan-39bf76dae61 )