Mailing List Archive

Using SpamAssassin 3.4.2 Fedora 29 package on CentOS 7
I'm trying to update my CentOS 7 distro 3.4.0 package to the 3.4.2 source
package in the Fedora 29 repo and wanted to alert others to possible issues.

<https://dl.fedoraproject.org/pub/fedora/linux/development/29/Everything/source/tree/Packages/s/spamassassin-3.4.2-2.fc29.src.rpm>

(Why is there a Fedora 29 package but not one in the Rawhide directory? I
usually go to Rawhide so I'm debugging the forward edge.)

I installed the build dependencies and added re2c so I could try the
compiled regex feature before issuing "rpmbuild --rebuild" on the SRPM. I
then ran yum update on the resulting RPM.

First, spamd kept restarting. It turns out my old
/etc/sysconfig/spamassassin file was running spamd as a daemon and there
was a .rpmnew file without -d, so I needed to copy that over the old file.
Change in systemd file, I guess.

Next, the new sysconfig file had --razor-home-dir=/var/lib/razor and no
such directory exists on an RHEL-based system. So I removed the razor
parameters from the sysconfig file. (Does this prevent spamd from using
razor? I do have perl-Razor-Agent-2.85 installed.)

I got a bunch of warnings about the SPF_ rule scores set to zero. It turned
out I'd set them to 0 in local.cf as I don't want SPF. (It's an internal
server.) So instead I commented out the loadplugin in init.pre. (I'd wanted
to avoid editing the distro-supplied file and change the setting in a
subsequent site file but that's not possible to opt out of a loadplugin.)

I tried enabling compiled regex support (I installed the re2c package and
added loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody to a .pre file)
and get this warning in maillog:

Can't locate Mail/SpamAssassin/CompiledRegexps/body_0.pm in @INC (@INC
contains: /var/lib/spamassassin/compiled/5.016/3.004002
/var/lib/spamassassin/compiled/5.016/3.004002/auto lib
/usr/share/perl5/vendor_perl /usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at (eval
1213) line 1.

I've run sa-update so when should the rules get compiled and where should
the result go?
Re: Using SpamAssassin 3.4.2 Fedora 29 package on CentOS 7 [ In reply to ]
On Wed, Oct 10, 2018 at 06:41:21PM -0700, Kenneth Porter wrote:
> (I'd wanted to avoid editing the distro-supplied file and change the
> setting in a subsequent site file but that's not possible to opt out of a
> loadplugin.)

There's no need to avoid editing .pre files. They are versioned for reason
and old ones are never changed after release.
Re: Using SpamAssassin 3.4.2 Fedora 29 package on CentOS 7 [ In reply to ]
On 10/10/2018 9:43 PM, Henrik K wrote:
> There's no need to avoid editing .pre files. They are versioned for reason
> and old ones are never changed after release.

The SPF plugin is enabled in init.pre, so it isn't versioned. But it's
marked as a config file in RPM so it won't be overwritten by a package
update. Any replacement will be written as init.pre.rpmnew.
Re: Using SpamAssassin 3.4.2 Fedora 29 package on CentOS 7 [ In reply to ]
On Wed, Oct 10, 2018 at 10:27:01PM -0700, Kenneth Porter wrote:
> On 10/10/2018 9:43 PM, Henrik K wrote:
> >There's no need to avoid editing .pre files. They are versioned for reason
> >and old ones are never changed after release.
>
> The SPF plugin is enabled in init.pre, so it isn't versioned. But it's
> marked as a config file in RPM so it won't be overwritten by a package
> update. Any replacement will be written as init.pre.rpmnew.

init.pre is the ancient original SpamAssassin file before versioning was
implemented, makes no difference, same applies. SpamAssassin installer
never overwrites these, so any package installed would not either, unless
packager is doing something on his own.