Auto sync2gitlab import of spamassassin-3.4.6-1.el8.src.rpm

This commit is contained in:
James Antill 2022-05-26 14:28:38 -04:00
parent 4ec91468ae
commit e5a3eabac7
25 changed files with 3443 additions and 1 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/Mail-SpamAssassin-3.4.6.tar.bz2
/Mail-SpamAssassin-rules-3.4.6.r1888502.tgz

1
EMPTY
View File

@ -1 +0,0 @@

43
README.RHEL.Fedora Normal file
View File

@ -0,0 +1,43 @@
Notes for Spamassassin for RHEL or Fedora
=========================================
spamassassin-3.3.x RPM package for RHEL 5+ or Fedora 11+ contains some new
functionality beyond the upstream spamassassin documentation.
Upstream spamassassin-3.3.0 is no longer distributed with rules. Our package
contains rules in order to be less of a surprise to system administrators.
However just as you wouldn't rely on antivirus software without signature
updates, spamassassin cannot be relied upon without regular rule updates.
1) For these reasons, our RPM package now runs nightly sa-update by default.
/etc/cron.d/sa-update
The default cron runs sa-update once every night. You may edit this cron
file to change the schedule of sa-update or to disable it entirely. If you
had modified this file in the past you may need to restore the new file
from /etc/cron.d/sa-update.rpmnew
2) /usr/share/spamassassin/sa-update.cron
This script is executed by cron. It runs sa-update only if a known spam
daemon is running: spamd, amavisd, or mimedefang. If you do not run any
of these spam daemons but wish to have nightly sa-update, you may
override the daemon check in /etc/sysconfig/sa-update
3) /etc/mail/spamassassin/channel.d
All sa-update channels are defined in files contained in this directory.
See the existing config files as examples for writing your own config file.
General Warnings
================
* DO NOT USE SARE or OpenProtect rules. They are old and outdated, and
can be dangerous. Many of the useful rules have been integrated into
upstream spamassassin.
Note about -d option
====================
With spamassassin 3.4.0, this package has switched the way spamd is started.
You should no longer use the '-d' option in /etc/sysconfig/spamassassin. Doing
so will result in spamd starting and stopping in a loop. The default
/etc/sysconfig/spamassassin file has been adjusted for this, please merge
this change into that file if you have made any changes to it.

10
redhat_local.cf Normal file
View File

@ -0,0 +1,10 @@
# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)
# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.
required_hits 5
report_safe 0
rewrite_header Subject [SPAM]

102
sa-update.cronscript Normal file
View File

@ -0,0 +1,102 @@
#!/bin/bash
# *** DO NOT MODIFY THIS FILE ***
#
# /etc/mail/spamassassin/channel.d/*.conf
# Place files here to add custom channels.
#
# Proceed with sa-update if spam daemon is running or forced in /etc/sysconfig/sa-update
unset SAUPDATE OPTIONS DEBUG NOTIFY_UPD
[ -f /etc/sysconfig/sa-update ] && . /etc/sysconfig/sa-update
[ "$SAUPDATE" = "no" ] && exit 0
for daemon in mimedefang spamd amavisd spampd; do
/usr/bin/pgrep -f $daemon >& /dev/null
[ $? -eq 0 ] && SAUPDATE=yes
done
# Skip sa-update if daemon not detected
[ -z "$SAUPDATE" ] && exit 0
# sa-update must create keyring
if [ ! -d /etc/mail/spamassassin/sa-update-keys ]; then
sa-update
fi
# Initialize Channels and Keys
CHANNELLIST=""
KEYLIST=""
# Process each channel defined in /etc/mail/spamassassin/channel.d/
for file in /etc/mail/spamassassin/channel.d/*.conf; do
[ ! -f "$file" ] && continue
# Validate config file
PREFIXES="CHANNELURL KEYID BEGIN"
for prefix in $PREFIXES; do
if ! grep -q "$prefix" $file; then
echo "ERROR: $file missing $prefix"
exit 255
fi
done
. "$file"
#echo "CHANNELURL=$CHANNELURL"
#echo "KEYID=$KEYID"
CHANNELLIST="$CHANNELLIST $CHANNELURL"
KEYLIST="$KEYLIST $KEYID"
sa-update --import "$file"
done
# Sleep random amount of time before proceeding to avoid overwhelming the servers
sleep $(expr $RANDOM % 7200)
unset arglist
# Run sa-update on each channel, restart spam daemon if success
for channel in $CHANNELLIST; do
arglist="$arglist --channel $channel"
done
for keyid in $KEYLIST; do
arglist="$arglist --gpgkey $keyid"
done
/usr/bin/sa-update $OPTIONS $arglist
status=$?
now=`date +"%d-%b-%Y %T"`
# cron runs this script tee /var/log/sa-update.log
# We want to always write to the log, but only send mail
# as configured.
if [ $status -eq 0 ]; then
if [ -n "$DEBUG" -o -n "$NOTIFY_UPD" ]; then
echo "$now: SpamAssassin: Update processed successfully"
else
echo "$now: SpamAssassin: Update processed successfully" >>/var/log/sa-update.log
fi
if [ -f /usr/bin/systemctl ]; then
systemctl condrestart spamassassin.service >& /dev/null
[ -f /usr/lib/systemd/system/amavisd.service ] && systemctl condrestart amavisd.service >& /dev/null
systemctl --quiet is-active mimedefang.service; [ $? -eq 0 ] && systemctl reload mimedefang.service >& /dev/null
[ -f /usr/lib/systemd/system/spampd.service ] && systemctl condrestart spampd.service >& /dev/null
else
service spamassassin condrestart >& /dev/null
[ -f /etc/rc.d/init.d/amavisd ] && service amavisd-new condrestart >& /dev/null
[ -f /etc/rc.d/init.d/mimedefang ] && service mimedefang condrestart >& /dev/null
[ -f /etc/rc.d/init.d/spampd ] && service spampd condrestart >& /dev/null
fi
exit $status
fi
if [ $status -eq 1 ]; then
if [ -n "$DEBUG" ]; then
echo "$now: SpamAssassin: No update available"
else
echo "$now: SpamAssassin: No update available" >>/var/log/sa-update.log
fi
exit $status
fi
if [ $status -eq 2 ]; then
echo "$now: SpamAssassin: Problem applying update - pre files failed lint check"
exit $status
fi
if [ $status -eq 4 ]; then
echo "$now: SpamAssassin: Update available, but download or extract failed"
exit $status
fi
echo "$now: SpamAssassin: Unknown error code $status from sa-update"
exit $status

12
sa-update.crontab Normal file
View File

@ -0,0 +1,12 @@
# *** DO NOT MODIFY THIS FILE ***
### Spamassassin Rules Updates ###
#
# http://wiki.apache.org/spamassassin/RuleUpdates
#
# sa-update automatically updates your rules once per day if a spam daemon like
# spamd or amavisd are running. You can force sa-update to run in
# /etc/sysconfig/sa-update
#
# /var/log/sa-update.log contains a history log of sa-update runs
10 4 * * * root /usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log

23
sa-update.force-sysconfig Normal file
View File

@ -0,0 +1,23 @@
# sa-update configuration
#
# Note that the opposite of "yes" is the empty string, NOT "no"
# Don't run sa-update even if it's in /etc/cron.d/ - as installed
#SAUPDATE=no
# Run sa-update even if no daemon is detected
#SAUPDATE=yes
# Default: Run only if a daemon is detected
# Options for the actual sa-update command
# These are added to the channel configuration from
# /etc/mail/spamassassin/channel.d/*.conf
# OPTIONS=-v
# Debug script - send mail even if no update available
# DEBUG=yes
# Send mail when updates successfully processed
# Default: send mail only on error
#NOTIFY_UPD=yes

5
sa-update.logrotate Normal file
View File

@ -0,0 +1,5 @@
/var/log/sa-update.log {
monthly
notifempty
missingok
}

28
sa-update.service Normal file
View File

@ -0,0 +1,28 @@
### Spamassassin Rules Updates ###
#
# http://wiki.apache.org/spamassassin/RuleUpdates
#
# sa-update automatically updates your rules once per day if a spam daemon like
# spamd or amavisd are running.
[Unit]
Description=Spamassassin Rules Update
Documentation=man:sa-update(1)
[Service]
# Note that the opposite of "yes" is the empty string, NOT "no"
# Options for the actual sa-update command
# These are added to the channel configuration from
# /etc/mail/spamassassin/channel.d/*.conf
Environment=OPTIONS=-v
# Debug script - send mail even if no update available
#Environment=DEBUG=yes
# Send mail when updates successfully processed
# Default: send mail only on error
#Environment=NOTIFY_UPD=yes
ExecStart=/usr/share/spamassassin/sa-update.cron
SuccessExitStatus=1

16
sa-update.timer Normal file
View File

@ -0,0 +1,16 @@
### Spamassassin Rules Updates ###
#
# http://wiki.apache.org/spamassassin/RuleUpdates
#
# sa-update automatically updates your rules once per day if a spam daemon like
# spamd or amavisd are running.
[Unit]
Description=Spamassassin Rules Update timer
Documentation=man:sa-update(1)
[Timer]
OnCalendar=daily
[Install]
WantedBy=spamassassin.service

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (Mail-SpamAssassin-3.4.6.tar.bz2) = bb53ba928917b02071b2e6690a11240e1af503334f292c870a8c49c24b0a58b44c78f827e2f43e71a3ce920481fa0e1e62b78a39452658c57d18f4e11daeb593
SHA512 (Mail-SpamAssassin-rules-3.4.6.r1888502.tgz) = 29167c2ab50de26954181ad53395d4270b8b15b7d3bb13d6c62aa2f13ed3bb7a54adcda944bbd4c8d0cf4fe918a2eb0f542ef420af2bd96a121cb3d9b55dd572

View File

@ -0,0 +1,12 @@
diff -Nur Mail-SpamAssassin-3.3.2.orig/sa-update.raw Mail-SpamAssassin-3.3.2/sa-update.raw
--- Mail-SpamAssassin-3.3.2.orig/sa-update.raw 2011-06-06 17:59:19.000000000 -0600
+++ Mail-SpamAssassin-3.3.2/sa-update.raw 2014-01-28 13:29:33.933526585 -0700
@@ -281,7 +281,7 @@
if ($GPG_ENABLED || $opt{'import'}) {
# find GPG in the PATH
# bug 4958: for *NIX it's "gpg", in Windows it's "gpg.exe"
- $GPGPath = 'gpg' . $Config{_exe};
+ $GPGPath = 'gpg2' . $Config{_exe};
dbg("gpg: Searching for '$GPGPath'");
if ($GPGPath = Mail::SpamAssassin::Util::find_executable_in_env_path($GPGPath)) {

View File

@ -0,0 +1,43 @@
commit bb177c93c8852417fc5a522cbcc45abbab4b3c3d
Author: Tomas Korbar <tomas.korb@seznam.cz>
Date: Thu Jun 7 20:57:07 2018 +0200
Add razor log path and home directory option
diff --git a/lib/Mail/SpamAssassin/Plugin/Razor2.pm b/lib/Mail/SpamAssassin/Plugin/Razor2.pm
index e24252c..935b3ac 100644
--- a/lib/Mail/SpamAssassin/Plugin/Razor2.pm
+++ b/lib/Mail/SpamAssassin/Plugin/Razor2.pm
@@ -165,7 +165,9 @@ sub razor2_access {
$rc->{opt} = {
debug => (would_log('dbg', $debug) > 1),
foreground => 1,
- config => $self->{main}->{conf}->{razor_config}
+ config => $self->{main}->{conf}->{razor_config},
+ logfile => $self->{main}->{razor_log_file},
+ razorhome => $self->{main}->{razor_home_dir}
};
# no facility prefix on this die
$rc->do_conf() or die "$debug: " . $rc->errstr;
diff --git a/spamd/spamd.raw b/spamd/spamd.raw
index 821f658..2afd6bb 100755
--- a/spamd/spamd.raw
+++ b/spamd/spamd.raw
@@ -361,6 +361,8 @@ prepare_for_sighup_restart();
# Parse the command line
Getopt::Long::Configure("bundling");
GetOptions(
+ 'razor-home-dir=s' => \$opt{'razor_home_dir'},
+ 'razor-log-file=s' => \$opt{'razor_log_file'},
'allow-tell' => \$opt{'tell'},
'allowed-ips|A=s' => \@{ $opt{'allowed-ip'} },
'auth-ident' => \$opt{'auth-ident'},
@@ -1149,6 +1151,8 @@ if ( defined $opt{'pidfile'} ) {
my $spamtest = Mail::SpamAssassin->new(
{
+ razor_home_dir => $opt{'razor_home_dir'},
+ razor_log_file => $opt{'razor_log_file'},
dont_copy_prefs => $dontcopy,
rules_filename => ( $opt{'configpath'} || 0 ),
site_rules_filename => ( $opt{'siteconfigpath'} || 0 ),

View File

@ -0,0 +1,193 @@
diff --git a/MANIFEST b/MANIFEST
index e16e0da..601f886 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -101,7 +101,6 @@ lib/Mail/SpamAssassin/Plugin/Pyzor.pm
lib/Mail/SpamAssassin/Plugin/Razor2.pm
lib/Mail/SpamAssassin/Plugin/RelayCountry.pm
lib/Mail/SpamAssassin/Plugin/RelayEval.pm
-lib/Mail/SpamAssassin/Plugin/ResourceLimits.pm
lib/Mail/SpamAssassin/Plugin/ReplaceTags.pm
lib/Mail/SpamAssassin/Plugin/Reuse.pm
lib/Mail/SpamAssassin/Plugin/Rule2XSBody.pm
diff --git a/lib/Mail/SpamAssassin/Plugin/ResourceLimits.pm b/lib/Mail/SpamAssassin/Plugin/ResourceLimits.pm
deleted file mode 100644
index 9179b93..0000000
--- a/lib/Mail/SpamAssassin/Plugin/ResourceLimits.pm
+++ /dev/null
@@ -1,143 +0,0 @@
-# <@LICENSE>
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to you under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# </@LICENSE>
-
-=head1 NAME
-
-Mail::SpamAssassin::Plugin::ResourceLimits - Limit the memory and/or CPU of child spamd processes
-
-=head1 SYNOPSIS
-
- # This plugin is for admin only and cannot be specified in user config.
- loadplugin Mail::SpamAssassin::Plugin::ResourceLimits
-
- # Sets to RLIMIT_CPU from BSD::Resource. The quota is based on max CPU Time seconds.
- resource_limit_cpu 120
-
- # Sets to RLIMIT_RSS and RLIMIT_AS via BSD::Resource.
- resource_limit_cpu 536870912
-
-=head1 DESCRIPTION
-
-This module leverages BSD::Resource to assure your spamd child processes do not exceed
-specified CPU or memory limit. If this happens, the child process will die.
-See the L<BSD::Resource> for more details.
-
-NOTE: Because this plugin uses BSD::Resource, it will not function on Windows.
-
-=head1 ADMINISTRATOR SETTINGS
-
-=over 4
-
-=item resource_limit_cpu 120 (default: 0 or no limit)
-
-How many cpu cycles are allowed on this process before it dies.
-
-=item resource_limit_mem 536870912 (default: 0 or no limit)
-
-The maximum number of bytes of memory allowed both for:
-
-=over
-
-=item *
-
-(virtual) address space bytes
-
-=item *
-
-resident set size
-
-=back
-
-=back
-
-=cut
-
-package Mail::SpamAssassin::Plugin::ResourceLimits;
-
-use Mail::SpamAssassin::Plugin ();
-use Mail::SpamAssassin::Logger ();
-use Mail::SpamAssassin::Util ();
-use Mail::SpamAssassin::Constants qw(:sa);
-
-use strict;
-use warnings;
-
-use BSD::Resource qw(RLIMIT_RSS RLIMIT_AS RLIMIT_CPU);
-
-our @ISA = qw(Mail::SpamAssassin::Plugin);
-
-sub new {
- my $class = shift;
- my $mailsaobject = shift;
-
- $class = ref($class) || $class;
- my $self = $class->SUPER::new($mailsaobject);
- bless( $self, $class );
-
- $self->set_config( $mailsaobject->{conf} );
- return $self;
-}
-
-sub set_config {
- my ( $self, $conf ) = @_;
- my @cmds = ();
-
- push(
- @cmds,
- {
- setting => 'resource_limit_mem',
- is_admin => 1,
- default => '0',
- type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC
- }
- );
-
- push(
- @cmds,
- {
- setting => 'resource_limit_cpu',
- is_admin => 1,
- default => '0',
- type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC
- }
- );
-
- $conf->{parser}->register_commands( \@cmds );
-}
-
-sub spamd_child_init {
- my ($self) = @_;
-
- # Set CPU Resource limits if they were specified.
- Mail::SpamAssassin::Util::dbg("resourcelimitplugin: In spamd_child_init");
- Mail::SpamAssassin::Util::dbg( "resourcelimitplugin: cpu limit: " . $self->{main}->{conf}->{resource_limit_cpu} );
- if ( $self->{main}->{conf}->{resource_limit_cpu} ) {
- BSD::Resource::setrlimit( RLIMIT_CPU, $self->{main}->{conf}->{resource_limit_cpu}, $self->{main}->{conf}->{resource_limit_cpu} )
- || info("resourcelimitplugin: Unable to set RLIMIT_CPU");
- }
-
- # Set Resource limits if they were specified.
- Mail::SpamAssassin::Util::dbg( "resourcelimitplugin: mem limit: " . $self->{main}->{conf}->{resource_limit_mem} );
- if ( $self->{main}->{conf}->{resource_limit_mem} ) {
- BSD::Resource::setrlimit( RLIMIT_RSS, $self->{main}->{conf}->{resource_limit_mem}, $self->{main}->{conf}->{resource_limit_mem} )
- || info("resourcelimitplugin: Unable to set RLIMIT_RSS");
- BSD::Resource::setrlimit( RLIMIT_AS, $self->{main}->{conf}->{resource_limit_mem}, $self->{main}->{conf}->{resource_limit_mem} )
- || info("resourcelimitplugin: Unable to set RLIMIT_AS");
- }
-}
-
-1;
diff --git a/lib/Mail/SpamAssassin/Util/DependencyInfo.pm b/lib/Mail/SpamAssassin/Util/DependencyInfo.pm
index b5b05cf..8223b26 100644
--- a/lib/Mail/SpamAssassin/Util/DependencyInfo.pm
+++ b/lib/Mail/SpamAssassin/Util/DependencyInfo.pm
@@ -234,12 +234,6 @@ our @OPTIONAL_MODULES = (
check for both Net::DNS and Net::DNS::Nameserver. However,
Net::DNS::Nameserver is only used in make test as of June 2014.',
},
-{
- module => 'BSD::Resource',
- version => 0,
- desc => 'BSD::Resource provides BSD process resource limit and priority
- functions. It is used by the optional ResourceLimits Plugin.',
-},
{
module => 'Archive::Zip',
version => 0,
diff --git a/rules/v342.pre b/rules/v342.pre
index 8e0fb07..c4758e9 100644
--- a/rules/v342.pre
+++ b/rules/v342.pre
@@ -19,10 +19,6 @@
# HashBL - Query hashed/unhashed strings, emails, uris etc from DNS lists
# loadplugin Mail::SpamAssassin::Plugin::HashBL
-# ResourceLimits - assure your spamd child processes
-# do not exceed specified CPU or memory limit
-# loadplugin Mail::SpamAssassin::Plugin::ResourceLimits
-
# FromNameSpoof - help stop spam that tries to spoof other domains using
# the from name
# loadplugin Mail::SpamAssassin::Plugin::FromNameSpoof

File diff suppressed because it is too large Load Diff

3
spamassassin-default.rc Normal file
View File

@ -0,0 +1,3 @@
# send mail through spamassassin
:0fw
| /usr/bin/spamassassin

View File

@ -0,0 +1,40 @@
diff --git a/t/all_modules.t b/t/all_modules.t
index 855395f..a976012 100755
--- a/t/all_modules.t
+++ b/t/all_modules.t
@@ -12,15 +12,7 @@ plan tests => 5;
my $plugins = '';
-if (eval { require BSD::Resource; }) {
- $plugins .= "loadplugin Mail::SpamAssassin::Plugin::ResourceLimits\n"
-}
-if (eval { require Net::CIDR::Lite; }) {
- $plugins .= "loadplugin Mail::SpamAssassin::Plugin::URILocalBL\n";
-}
-
tstpre ("
-loadplugin Mail::SpamAssassin::Plugin::RelayCountry
loadplugin Mail::SpamAssassin::Plugin::URIDNSBL
loadplugin Mail::SpamAssassin::Plugin::Hashcash
loadplugin Mail::SpamAssassin::Plugin::SPF
diff --git a/t/data/01_test_rules.pre b/t/data/01_test_rules.pre
index c4681ca..1694ddf 100644
--- a/t/data/01_test_rules.pre
+++ b/t/data/01_test_rules.pre
@@ -21,7 +21,6 @@ loadplugin Mail::SpamAssassin::Plugin::WLBLEval
loadplugin Mail::SpamAssassin::Plugin::VBounce
# Try to load some non-default plugins also
-loadplugin Mail::SpamAssassin::Plugin::RelayCountry
loadplugin Mail::SpamAssassin::Plugin::DCC
loadplugin Mail::SpamAssassin::Plugin::AntiVirus
loadplugin Mail::SpamAssassin::Plugin::AWL
@@ -32,7 +31,6 @@ loadplugin Mail::SpamAssassin::Plugin::Shortcircuit
loadplugin Mail::SpamAssassin::Plugin::ASN
#loadplugin Mail::SpamAssassin::Plugin::PhishTag
#loadplugin Mail::SpamAssassin::Plugin::TxRep
-loadplugin Mail::SpamAssassin::Plugin::URILocalBL
loadplugin Mail::SpamAssassin::Plugin::PDFInfo
loadplugin Mail::SpamAssassin::Plugin::HashBL
#loadplugin Mail::SpamAssassin::Plugin::ResourceLimits

2
spamassassin-helper.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
/usr/bin/spamassassin -e

View File

@ -0,0 +1,86 @@
# http://wiki.apache.org/spamassassin/RuleUpdates
CHANNELURL=updates.spamassassin.org
KEYID=5244EC45
# Ignore everything below.
return 0
This is the GPG key that updates are signed with (currently,
as of Wed Dec 21 19:31:38 PST 2005. Please contact <dev /at/
spamassassin.apache.org> with any questions.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2 (SunOS)
mQILBEOnbDQBEADBfda+hU8cGXD/2WYrIHsZ5CmvC2eCYKgQ87W706tzwmxoZWQS
JfnRpkZnBqS5WDhXhNBOhk9CgF5/e9yHnDQCusNYfRstKd+t0XTFvq30/tacrJNe
67zgq+DtWqIK9C7akfElc+2M5NkX6mF4cjaMXZoW17ltPy0XSSeirf584nvK3pXf
oEFLYQ/0AUV9EBpo9+i2DkMUd8d5tz7A6O5foB3ijYPzIcVtVJ1eyCg6gO1I4cIA
YbIZCH0WIVx5MQjydfKyCR4D7VFPpZgwcZ1PmyZSsy3lrigGVvYEoUS2fWTt2jUO
pB3wg5pgzuu9hN5CpChZGvq65t4PGtAeShnBkddIH4l+iDC6sAc6W06KidSaUCW1
BKvNMa39lyEkO4bfLblZRjoZbj7Tjq3wQV/PLpPyKDa8ZZ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hhofPCWRT/Kzo+WE+Kgefv88T5Li7Ku12U/UpiK85+6nRspXj3rnkfDOUbLZjGM+
1NET0xQTPuyxN6CXF7MMxfGCpszCudYxMANDQqNXu9brcPN/+EIxGRjqin4E7q+h
kYUaY7Ki8mXtJ8cJEEBWphpSROxFktcQALWQv996bFq1iFcGuQ0ITxNDlOWCsses
bgEM5zR10DH+6s2bXEO8xyDHQJtrvdCPetRDosnuOToBMnGMXTYVytnWzwwAzwq1
YM+bGAeTHaIX+2UmxwFyX4GMOdqsNB+xDZ8pmRKjamJSgUQt6e18YpZlg1Y4QkxS
Vptq7OZBjiKeLUhLhGJ6GWgEIedLcoCtFzKCfz3zwn0Oxl+1EnVu8yqN+quWTf8P
7EZn+0ztqZY059BrcK2jmOyXvtOZBcAHXCUknh/uPHwAJV2WFWSNid2kNiLOrV+J
3eLTs5sF9wNhxWRhl6/10cwTzjy0Onv5cJh2tjdwksigMRMwz4c839zXORni/tnY
+IY22kNTKu84gB8rBuqUq8MQXNdS3bbROwwNUzpC0D1C1z1fBvyXDL1EwJdz70Wc
2m/Sw6tIid5g98+XMW+Ibt43Jk2XbK71JLhbVbePbAcHVh/UXEtnjhRfX7oyWlwS
a+lkKMiJd/6CQ6bvYsgklE7uEzTpRskpkkOcCk1O+8jfl+DsDwKrvVaNu8tpx45k
TtV4JDA6iEHKakD/zZdVTR79W2CFqBvRfRikc5INOl1OfMQ4ODmjkMl3yI9wrHwS
SQQxdq2XsS7xbU9HDFBEguQDu0rfzILZ9DuKIVHyr/CsRoJ5joj+JvKaUQC81ywQ
aB8EKy5bg4U6
=IbYW
-----END PGP PUBLIC KEY BLOCK-----

3
spamassassin-spamc.rc Normal file
View File

@ -0,0 +1,3 @@
# send mail through spamassassin
:0fw
| /usr/bin/spamc

View File

@ -0,0 +1,354 @@
diff --git a/lib/Mail/SpamAssassin/AutoWhitelist.pm b/lib/Mail/SpamAssassin/AutoWhitelist.pm
index 627e249..cc3c97b 100644
--- a/lib/Mail/SpamAssassin/AutoWhitelist.pm
+++ b/lib/Mail/SpamAssassin/AutoWhitelist.pm
@@ -128,35 +128,35 @@ sub check_address {
my $entry = $self->{checker}->get_addr_entry ($fulladdr, $signedby);
$self->{entry} = $entry;
- if (!$entry->{msgcount}) {
+ if (!$entry->{count}) {
# no entry found
if (defined $origip) {
# try upgrading a default entry (probably from "add-addr-to-foo")
my $noipaddr = $self->pack_addr ($addr, undef);
my $noipent = $self->{checker}->get_addr_entry ($noipaddr, undef);
- if (defined $noipent->{msgcount} && $noipent->{msgcount} > 0) {
+ if (defined $noipent->{count} && $noipent->{count} > 0) {
dbg("auto-whitelist: found entry w/o IP address for $addr: replacing with $origip");
$self->{checker}->remove_entry($noipent);
# Now assign proper entry the count and totscore values of the
# no-IP entry instead of assigning the whole value to avoid
# wiping out any information added to the previous entry.
- $entry->{msgcount} = $noipent->{msgcount};
+ $entry->{count} = $noipent->{count};
$entry->{totscore} = $noipent->{totscore};
}
}
}
- if ($entry->{msgcount} < 0 ||
- $entry->{msgcount} != $entry->{msgcount} || # test for NaN
+ if ($entry->{count} < 0 ||
+ $entry->{count} != $entry->{count} || # test for NaN
$entry->{totscore} != $entry->{totscore})
{
warn "auto-whitelist: resetting bad data for ($addr, $origip), ".
- "count: $entry->{msgcount}, totscore: $entry->{totscore}\n";
- $entry->{msgcount} = $entry->{totscore} = 0;
+ "count: $entry->{count}, totscore: $entry->{totscore}\n";
+ $entry->{count} = $entry->{totscore} = 0;
}
- return !$entry->{msgcount} ? undef : $entry->{totscore} / $entry->{msgcount};
+ return !$entry->{count} ? undef : $entry->{totscore} / $entry->{count};
}
###########################################################################
@@ -170,7 +170,7 @@ whitelist correction.
sub count {
my $self = shift;
- return $self->{entry}->{msgcount};
+ return $self->{entry}->{count};
}
@@ -195,7 +195,7 @@ sub add_score {
return; # don't try to add a NaN
}
- $self->{entry}->{msgcount} ||= 0;
+ $self->{entry}->{count} ||= 0;
$self->{checker}->add_score($self->{entry}, $score);
}
diff --git a/lib/Mail/SpamAssassin/DBBasedAddrList.pm b/lib/Mail/SpamAssassin/DBBasedAddrList.pm
index 6aaed86..a1adca3 100644
--- a/lib/Mail/SpamAssassin/DBBasedAddrList.pm
+++ b/lib/Mail/SpamAssassin/DBBasedAddrList.pm
@@ -125,10 +125,10 @@ sub get_addr_entry {
addr => $addr,
};
- $entry->{msgcount} = $self->{accum}->{$addr} || 0;
+ $entry->{count} = $self->{accum}->{$addr} || 0;
$entry->{totscore} = $self->{accum}->{$addr.'|totscore'} || 0;
- dbg("auto-whitelist: db-based $addr scores ".$entry->{msgcount}.'/'.$entry->{totscore});
+ dbg("auto-whitelist: db-based $addr scores ".$entry->{count}.'/'.$entry->{totscore});
return $entry;
}
@@ -137,15 +137,15 @@ sub get_addr_entry {
sub add_score {
my($self, $entry, $score) = @_;
- $entry->{msgcount} ||= 0;
+ $entry->{count} ||= 0;
$entry->{addr} ||= '';
- $entry->{msgcount}++;
+ $entry->{count}++;
$entry->{totscore} += $score;
- dbg("auto-whitelist: add_score: new count: ".$entry->{msgcount}.", new totscore: ".$entry->{totscore});
+ dbg("auto-whitelist: add_score: new count: ".$entry->{count}.", new totscore: ".$entry->{totscore});
- $self->{accum}->{$entry->{addr}} = $entry->{msgcount};
+ $self->{accum}->{$entry->{addr}} = $entry->{count};
$self->{accum}->{$entry->{addr}.'|totscore'} = $entry->{totscore};
return $entry;
}
diff --git a/lib/Mail/SpamAssassin/Plugin/TxRep.pm b/lib/Mail/SpamAssassin/Plugin/TxRep.pm
index 2ef3ddc..08b432b 100644
--- a/lib/Mail/SpamAssassin/Plugin/TxRep.pm
+++ b/lib/Mail/SpamAssassin/Plugin/TxRep.pm
@@ -1521,7 +1521,7 @@ sub check_reputation {
#--------------------------------------------------------------------------
###########################################################################
-sub count {my $self=shift; return (defined $self->{checker})? $self->{entry}->{msgcount} : undef;}
+sub count {my $self=shift; return (defined $self->{checker})? $self->{entry}->{count} : undef;}
sub total {my $self=shift; return (defined $self->{checker})? $self->{entry}->{totscore} : undef;}
###########################################################################
@@ -1538,11 +1538,11 @@ sub get_sender {
$self->{entry} = $entry;
$origip = $origip || 'none';
- if ($entry->{msgcount}<0 || $entry->{msgcount}=~/^(nan|)$/ || $entry->{totscore}=~/^(nan|)$/) {
- warn "TxRep: resetting bad data for ($addr, $origip), count: $entry->{msgcount}, totscore: $entry->{totscore}\n";
- $self->{entry}->{msgcount} = $self->{entry}->{totscore} = 0;
+ if ($entry->{count}<0 || $entry->{count}=~/^(nan|)$/ || $entry->{totscore}=~/^(nan|)$/) {
+ warn "TxRep: resetting bad data for ($addr, $origip), count: $entry->{count}, totscore: $entry->{totscore}\n";
+ $self->{entry}->{count} = $self->{entry}->{totscore} = 0;
}
- return $self->{entry}->{msgcount};
+ return $self->{entry}->{count};
}
@@ -1557,7 +1557,7 @@ sub add_score {
warn "TxRep: attempt to add a $score to TxRep entry ignored\n";
return; # don't try to add a NaN
}
- $self->{entry}->{msgcount} ||= 0;
+ $self->{entry}->{count} ||= 0;
# performing the dilution aging correction
if (defined $self->total() && defined $self->count() && defined $self->{txrep_dilution_factor}) {
@@ -1587,9 +1587,9 @@ sub remove_score {
}
# no reversal dilution aging correction (not easily possible),
# just removing the original message score
- if ($self->{entry}->{msgcount} > 2)
- {$self->{entry}->{msgcount} -= 2;}
- else {$self->{entry}->{msgcount} = 0;}
+ if ($self->{entry}->{count} > 2)
+ {$self->{entry}->{count} -= 2;}
+ else {$self->{entry}->{count} = 0;}
# subtract 2, and add a score; hence decrementing by 1
$self->{checker}->add_score($self->{entry}, -1*$score);
}
diff --git a/lib/Mail/SpamAssassin/SQLBasedAddrList.pm b/lib/Mail/SpamAssassin/SQLBasedAddrList.pm
index 278f792..f3f40b4 100644
--- a/lib/Mail/SpamAssassin/SQLBasedAddrList.pm
+++ b/lib/Mail/SpamAssassin/SQLBasedAddrList.pm
@@ -45,7 +45,7 @@ CREATE TABLE awl (
username varchar(100) NOT NULL default '',
email varchar(255) NOT NULL default '',
ip varchar(40) NOT NULL default '',
- msgcount int(11) NOT NULL default '0',
+ count int(11) NOT NULL default '0',
totscore float NOT NULL default '0',
signedby varchar(255) NOT NULL default '',
PRIMARY KEY (username,email,signedby,ip)
@@ -191,7 +191,7 @@ sub get_addr_entry {
my $entry = { addr => $addr,
exists_p => 0,
- msgcount => 0,
+ count => 0,
totscore => 0,
signedby => $signedby,
};
@@ -200,7 +200,7 @@ sub get_addr_entry {
return $entry unless $email ne '' && (defined $ip || defined $signedby);
- my $sql = "SELECT msgcount, totscore FROM $self->{tablename} " .
+ my $sql = "SELECT count, totscore FROM $self->{tablename} " .
"WHERE username = ? AND email = ?";
my @args = ( $email );
if (!$self->{_with_awl_signer}) {
@@ -225,7 +225,7 @@ sub get_addr_entry {
if (!$rc) { # there was an error, but try to go on
info("auto-whitelist: sql-based get_addr_entry %s: SQL error: %s",
join('|',@args), $sth->errstr);
- $entry->{msgcount} = 0;
+ $entry->{count} = 0;
$entry->{totscore} = 0;
}
else {
@@ -234,8 +234,8 @@ sub get_addr_entry {
# how to combine data if there are several entries (like signed by
# an author domain and by a remailer)? for now just take an average
while ( defined($aryref = $sth->fetchrow_arrayref()) ) {
- if (defined $entry->{msgcount} && defined $aryref->[1]) {
- $entry->{msgcount} = $aryref->[0];
+ if (defined $entry->{count} && defined $aryref->[1]) {
+ $entry->{count} = $aryref->[0];
$entry->{totscore} = $aryref->[1];
}
$entry->{exists_p} = 1;
@@ -247,8 +247,8 @@ sub get_addr_entry {
}
$sth->finish();
- dbg("auto-whitelist: sql-based %s scores %s, msgcount %s",
- join('|',@args), $entry->{totscore}, $entry->{msgcount});
+ dbg("auto-whitelist: sql-based %s scores %s, count %s",
+ join('|',@args), $entry->{totscore}, $entry->{count});
return $entry;
}
@@ -275,7 +275,7 @@ sub add_score {
my ($email, $ip) = $self->_unpack_addr($entry->{addr});
- $entry->{msgcount} += 1;
+ $entry->{count} += 1;
$entry->{totscore} += $score;
my $signedby = $entry->{signedby};
@@ -286,7 +286,7 @@ sub add_score {
my $inserted = 0;
- { my @fields = qw(username email ip msgcount totscore);
+ { my @fields = qw(username email ip count totscore);
my @signedby;
if ($self->{_with_awl_signer}) {
push(@fields, 'signedby');
@@ -327,9 +327,9 @@ sub add_score {
# insert failed, assume primary key constraint, so try the update
my $sql = "UPDATE $self->{tablename} ".
- "SET msgcount = ?, totscore = totscore + ? ".
+ "SET count = ?, totscore = totscore + ? ".
"WHERE username = ? AND email = ?";
- my(@args) = ($entry->{msgcount}, $score, $self->{_username}, $email);
+ my(@args) = ($entry->{count}, $score, $self->{_username}, $email);
if ($self->{_with_awl_signer}) {
my @signedby = !defined $signedby ? () : split(' ', lc $signedby);
if (!@signedby) {
@@ -352,8 +352,8 @@ sub add_score {
join('|',@args), $sth->errstr);
} else {
dbg("auto-whitelist: sql-based add_score/update ".
- "new msgcount: %s, new totscore: %s for %s",
- $entry->{msgcount}, $entry->{totscore}, join('|',@args));
+ "new count: %s, new totscore: %s for %s",
+ $entry->{count}, $entry->{totscore}, join('|',@args));
$entry->{exists_p} = 1;
}
}
diff --git a/sql/README.awl b/sql/README.awl
index 68de4a1..a1ddf40 100644
--- a/sql/README.awl
+++ b/sql/README.awl
@@ -75,7 +75,7 @@ setting: "awl") with at least these fields:
username varchar(100) # this is the username whose e-mail is being filtered
email varchar(200) # this is the address key
ip varchar(40) # this is the ip key (fits IPv4 or IPv6)
- msgcount int(11) # this is the message counter
+ count int(11) # this is the message counter
totscore float # this is the total calculated score
signedby varchar(255) # a DKIM or DomainKeys signing domain(s)
@@ -109,7 +109,7 @@ CREATE TABLE awl (
username varchar(100) NOT NULL default '',
email varchar(255) NOT NULL default '',
ip varchar(40) NOT NULL default '',
- msgcount int(11) NOT NULL default '0',
+ count int(11) NOT NULL default '0',
totscore float NOT NULL default '0',
signedby varchar(255) NOT NULL default '',
PRIMARY KEY (username,email,signedby,ip)
diff --git a/sql/awl_mysql.sql b/sql/awl_mysql.sql
index a8b6926..0bfa99a 100644
--- a/sql/awl_mysql.sql
+++ b/sql/awl_mysql.sql
@@ -2,7 +2,7 @@ CREATE TABLE awl (
username varchar(100) NOT NULL default '',
email varbinary(255) NOT NULL default '',
ip varchar(40) NOT NULL default '',
- msgcount int(11) NOT NULL default '0',
+ count int(11) NOT NULL default '0',
totscore float NOT NULL default '0',
signedby varchar(255) NOT NULL default '',
last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
diff --git a/sql/awl_pg.sql b/sql/awl_pg.sql
index 2cb3f3e..4f59d72 100644
--- a/sql/awl_pg.sql
+++ b/sql/awl_pg.sql
@@ -2,7 +2,7 @@ CREATE TABLE awl (
username varchar(100) NOT NULL default '',
email varchar(255) NOT NULL default '',
ip varchar(40) NOT NULL default '',
- msgcount bigint NOT NULL default '0',
+ count bigint NOT NULL default '0',
totscore float NOT NULL default '0',
signedby varchar(255) NOT NULL default '',
last_hit timestamp NOT NULL default CURRENT_TIMESTAMP,
diff --git a/sql/txrep_mysql.sql b/sql/txrep_mysql.sql
index 9a4888b..bbe6b95 100644
--- a/sql/txrep_mysql.sql
+++ b/sql/txrep_mysql.sql
@@ -2,7 +2,7 @@ CREATE TABLE txrep (
username varchar(100) NOT NULL default '',
email varchar(255) NOT NULL default '',
ip varchar(40) NOT NULL default '',
- msgcount int(11) NOT NULL default '0',
+ count int(11) NOT NULL default '0',
totscore float NOT NULL default '0',
signedby varchar(255) NOT NULL default '',
last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
diff --git a/sql/txrep_pg.sql b/sql/txrep_pg.sql
index 191074c..463006b 100644
--- a/sql/txrep_pg.sql
+++ b/sql/txrep_pg.sql
@@ -2,7 +2,7 @@ CREATE TABLE txrep (
username varchar(100) NOT NULL default '',
email varchar(255) NOT NULL default '',
ip varchar(40) NOT NULL default '',
- msgcount bigint NOT NULL default '0',
+ count bigint NOT NULL default '0',
totscore float NOT NULL default '0',
signedby varchar(255) NOT NULL default '',
last_hit timestamp NOT NULL default CURRENT_TIMESTAMP,
diff --git a/UPGRADE b/UPGRADE
index cfd31ab..b555b0b 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -24,18 +24,6 @@ Note for Users Upgrading to SpamAssassin 3.4.3
This is to make sure all the legacy installations and wiki guides etc
still using it needlessly get fixed.
-- TxRep and Awl plugins has been modified to be compatible
- with latest Postgresql versions.
- You should upgrade your sql database running the following command:
- MySQL:
- "ALTER TABLE `txrep` CHANGE `count` `msgcount` INT(11) NOT NULL DEFAULT '0';"
- "ALTER TABLE `awl` CHANGE `count` `msgcount` INT(11) NOT NULL DEFAULT '0';"
- "ALTER TABLE `awl` ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;"
- PostgreSQL:
- "ALTER TABLE txrep RENAME COLUMN count TO msgcount;"
- "ALTER TABLE awl RENAME COLUMN count TO msgcount;"
- "ALTER TABLE awl ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP;"
-
- body_part_scan_size 50000, rawbody_part_scan_size 500000 defaults added (Bug 6582)
These enable safer and faster scanning of large emails.

14
spamassassin.service Normal file
View File

@ -0,0 +1,14 @@
[Unit]
Description=Spamassassin daemon
After=syslog.target network.target
Wants=sa-update.timer
[Service]
EnvironmentFile=-/etc/sysconfig/spamassassin
ExecStart=/usr/bin/spamd $SPAMDOPTIONS
StandardOutput=null
StandardError=null
Restart=always
[Install]
WantedBy=multi-user.target

1212
spamassassin.spec Normal file

File diff suppressed because it is too large Load Diff

2
spamassassin.sysconfig Normal file
View File

@ -0,0 +1,2 @@
# Options to spamd
SPAMDOPTIONS="-c -m5 -H --razor-home-dir='/var/lib/razor/' --razor-log-file='sys-syslog'"

View File

@ -0,0 +1,2 @@
# Options to spamd
SPAMDOPTIONS="-d -c -m5 -H --razor-home-dir='/var/lib/razor/' --razor-log-file='sys-syslog'"