openSuse 42.3

with software management tool install package perl-razor-agents


as root execute :
mkdir /etc/mail/spamassassin/.razor
razor-admin -home=/etc/mail/spamassassin/.razor -register
razor-admin -home=/etc/mail/spamassassin/.razor -create
razor-admin -home=/etc/mail/spamassassin/.razor -discover

Add the following to /etc/mail/spamassassin/

# razor
razor_config /etc/mail/spamassassin/.razor/razor-agent.conf

be sure in /etc/mail/spamassassin/310.pre that
loadplugin Mail::SpamAssassin::Plugin::Razor2
is uncommented

use service management tool to stop then start spamd

with service management tool check that spamd started without error

in root console execute
spamassassin -t -D razor2 < /usr/share/doc/packages/perl-Mail-SpamAssassin/sample-spam.txt
check that
- razor home path is well found
- razor conf file razor-agent.conf is well found
- you must find this type of line
Jan 27 09:08:59.116 [32462] dbg: razor2: razor2 is available, version 2.84
Razor-Log: read_file: 16 items read from /etc/mail/spamassassin/.razor/razor-agent.conf
Razor-Log: Found razorhome: /etc/mail/spamassassin/.razor

dbg: razor2: results: spam? 0