Add razor log and home directory option
This commit is contained in:
parent
a94c158b1f
commit
4f3c160f47
43
spamassassin-3.4.1-add-logfile-homedir-options.patch
Normal file
43
spamassassin-3.4.1-add-logfile-homedir-options.patch
Normal 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 ),
|
@ -63,7 +63,7 @@ Summary: Spam filter for email which can be invoked from mail delivery agents
|
|||||||
Name: spamassassin
|
Name: spamassassin
|
||||||
Version: 3.4.1
|
Version: 3.4.1
|
||||||
#Release: 0.8.%{prerev}%{?dist}
|
#Release: 0.8.%{prerev}%{?dist}
|
||||||
Release: 19%{?dist}
|
Release: 20%{?dist}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
URL: http://spamassassin.apache.org/
|
URL: http://spamassassin.apache.org/
|
||||||
@ -94,6 +94,7 @@ Source17: sa-update.timer
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1055593
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1055593
|
||||||
# Switch to using gnupg2 instead of gnupg1
|
# Switch to using gnupg2 instead of gnupg1
|
||||||
Patch0: spamassassin-3.3.2-gnupg2.patch
|
Patch0: spamassassin-3.3.2-gnupg2.patch
|
||||||
|
Patch1: spamassassin-3.4.1-add-logfile-homedir-options.patch
|
||||||
# Patches 100+ are SVN backports (DO NOT REUSE!)
|
# Patches 100+ are SVN backports (DO NOT REUSE!)
|
||||||
Patch100: spamassassin-3.4.1-netdns.patch
|
Patch100: spamassassin-3.4.1-netdns.patch
|
||||||
# Openssl 1.1.x support
|
# Openssl 1.1.x support
|
||||||
@ -187,6 +188,7 @@ To filter spam for all users, add that line to /etc/procmailrc
|
|||||||
%setup -q -n Mail-SpamAssassin-%{version}
|
%setup -q -n Mail-SpamAssassin-%{version}
|
||||||
# Patches 0-99 are RH specific
|
# Patches 0-99 are RH specific
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
# Patches 100+ are SVN backports (DO NOT REUSE!)
|
# Patches 100+ are SVN backports (DO NOT REUSE!)
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
@ -280,6 +282,7 @@ install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/chan
|
|||||||
install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channel.d/
|
install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channel.d/
|
||||||
|
|
||||||
install -m 0644 %{SOURCE13} $RPM_BUILD_DIR/Mail-SpamAssassin-%{version}/
|
install -m 0644 %{SOURCE13} $RPM_BUILD_DIR/Mail-SpamAssassin-%{version}/
|
||||||
|
mkdir -m 0700 -p $RPM_BUILD_ROOT%{_sharedstatedir}/razor/
|
||||||
|
|
||||||
%files -f %{name}-%{version}-filelist
|
%files -f %{name}-%{version}-filelist
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -296,6 +299,7 @@ install -m 0644 %{SOURCE13} $RPM_BUILD_DIR/Mail-SpamAssassin-%{version}/
|
|||||||
%config(noreplace) %{_sysconfdir}/sysconfig/sa-update
|
%config(noreplace) %{_sysconfdir}/sysconfig/sa-update
|
||||||
%dir %{_datadir}/spamassassin
|
%dir %{_datadir}/spamassassin
|
||||||
%dir %{_localstatedir}/lib/spamassassin
|
%dir %{_localstatedir}/lib/spamassassin
|
||||||
|
%dir %{_sharedstatedir}/razor
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/sa-update
|
%config(noreplace) %{_sysconfdir}/logrotate.d/sa-update
|
||||||
%if %{use_systemd}
|
%if %{use_systemd}
|
||||||
%{_unitdir}/spamassassin.service
|
%{_unitdir}/spamassassin.service
|
||||||
@ -344,6 +348,7 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
rm -f %{_sharedstatedir}/razor/*
|
||||||
%if %{use_systemd} == 0
|
%if %{use_systemd} == 0
|
||||||
if [ $1 = 0 ] ; then
|
if [ $1 = 0 ] ; then
|
||||||
/sbin/service spamassassin stop >/dev/null 2>&1
|
/sbin/service spamassassin stop >/dev/null 2>&1
|
||||||
@ -367,6 +372,9 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 07 2018 Tomas Korbar <tomas.korb@seznam.cz> - 3.4.1-20
|
||||||
|
- Add razor log path and home directory option
|
||||||
|
|
||||||
* Tue Apr 10 2018 Rafael Santos <rdossant@redhat.com> - 3.4.1-19
|
* Tue Apr 10 2018 Rafael Santos <rdossant@redhat.com> - 3.4.1-19
|
||||||
- Use standard Fedora linker flags (bug #1548561)
|
- Use standard Fedora linker flags (bug #1548561)
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
# Options to spamd
|
# Options to spamd
|
||||||
SPAMDOPTIONS="-c -m5 -H"
|
SPAMDOPTIONS="-c -m5 -H --razor-home-dir='/var/lib/razor/' --razor-log-file='sys-syslog'"
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
# Options to spamd
|
# Options to spamd
|
||||||
SPAMDOPTIONS="-d -c -m5 -H"
|
SPAMDOPTIONS="-d -c -m5 -H --razor-home-dir='/var/lib/razor/' --razor-log-file='sys-syslog'"
|
||||||
|
Loading…
Reference in New Issue
Block a user