Page 1 of 1

SA Learn error

Posted: 15 Oct 2019 23:46
by activateit
Choosing "Spam+Report" for a email produces this error on my system.

SpamAssassin: Oct 16 10:36:59.001 [13613] warn: reporter: razor2 report failed: No such file or directory report requires authentication at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/Razor2.pm line 176. at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/Razor2.pm line 329., 1 message(s) examined.


Is it a major issue, and is there a fix?

Thanks,
Stephen

Re: SA Learn error

Posted: 18 Oct 2019 15:12
by shawniverson
Non-fatal. You need to re-register Razor.

https://cwiki.apache.org/confluence/dis ... llingRazor

Re: SA Learn error

Posted: 22 Nov 2019 23:47
by activateit
I ran the commands as listed on the website as both root and the user setup in initial efa4 install.

razor-client
razor-admin -create
razor-admin -register

The commands said they were successful, but I'm still getting the error from the first post.

Re: SA Learn error

Posted: 23 Nov 2019 15:55
by chanas
I also have the same issue on a clean install. Where does it expect to find the identity files?
I tried registering with su to postfix that I believe razor runs under but that does not help either

Re: SA Learn error

Posted: 12 Dec 2019 15:40
by ItemsGmbH
Same here
Learn as + report = SpamAssassin: Dec 12 16:33:43.449 [155034] warn: reporter: razor2 report failed: No such file or directory report requires authentication at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/Razor2.pm line 176. at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/Razor2.pm line 329., 1 message(s) examined.

Re: SA Learn error

Posted: 05 Jan 2020 10:51
by MauriceW
Same issue here. Running those commands did not fix it.

I'm running EFA 4.0.1 with a configuration that was migrated from 3.x using the Wiki article.

Re: SA Learn error

Posted: 05 Jan 2020 12:31
by shawniverson
I think this needs to be done under the postfix user.

Try this...

Code: Select all

sudo mkdir /var/spool/postfix/.razor
sudo ln -s /var/spool/postfix/.razor /var/www/.razor
sudo su postfix -s /bin/bash -c 'razor-admin -create'
sudo su postfix -s /bin/bash -c 'razor-admin -register'
sudo chown -R postfix:mtagroup /var/spool/postfix/.razor
sudo chmod ug+rwx /var/spool/postfix/.razor
sudo chmod ug+s /var/spool/postfix/.razor

Re: SA Learn error

Posted: 05 Jan 2020 12:46
by shawniverson
Reproduced issue even after resetting razor. Working on this...

https://github.com/E-F-A/v4/issues/168

Re: SA Learn error

Posted: 23 Jan 2020 16:43
by ressel
I have this problem too.

Re: SA Learn error

Posted: 24 Jan 2020 11:14
by shawniverson
yeah, it is harmless, and I am working on fixing it.

Re: SA Learn error

Posted: 27 Jan 2020 14:41
by henk
Did some tests on the razor report. I did manage to get rid of the warning in the Gui.

I did not re-register razor. First I would like to understand why the homedir in mailscanner.cf is ignored..
To register razor, that would be like this below.
razor-admin -create -home=/var/spool/postfix/.razor
razor-admin -register


Steps followed.
1. /var/spool/postfix/.razor/razor-agent.conf
added razorhome
# see razor-agent.conf(5) man page
#
razorhome = /var/spool/postfix/.razor
debuglevel = 0
identity = identity
ignorelist = 0

2 /etc/MailScanner/spamassassin.conf
Added

Code: Select all

ifplugin Mail::SpamAssassin::Plugin::Razor2
razor_config  /var/spool/postfix/.razor/razor-agent.conf
razorhome     = /var/spool/postfix/.razor
endif
Run test1
[root@eFa]# sudo su -l postfix -s /bin/cat /usr/share/doc/spamassassin-3.4.2/sample-spam.txt | razor-report -d --verbose -home=/var/spool/postfix/.razor
Razor-Log: read_file: 16 items read from /var/spool/postfix/.razor/razor-agent.conf
Jan 27 15:18:41.863504 report[8267]: [ 2] [bootup] Logging initiated LogDebugLevel=9 to stdout
Jan 27 15:18:41.864326 report[8267]: [ 5] computed razorhome=/var/spool/postfix/.razor, conf=/var/spool/postfix/.razor/razor-agent.conf, ident=/var/spool/postfix/.razor/identity-Henk
Jan 27 15:18:41.864422 report[8267]: [ 2] Razor-Agents v2.84 starting razor-report -d --verbose -home=/var/spool/postfix/.razor
Jan 27 15:18:41.864677 report[8267]: [ 5] read_file: 2 items read from /var/spool/postfix/.razor/identity-Henk
Jan 27 15:18:41.865539 report[8267]: [ 8] razor-report finished successfully.

test2
[root@eFa]# spamassassin -t -D razor2 < /usr/share/doc/spamassassin-3.4.2/sample-spam.txt
Jan 27 15:21:16.608 [8442] dbg: razor2: razor2 is available, version 2.84
Razor-Log: read_file: 16 items read from /var/spool/postfix/.razor/razor-agent.conf
Razor-Log: Found razorhome: /var/spool/postfix/.razor
Jan 27 15:21:19.495226 check[8442]: [ 2] [bootup] Logging initiated LogDebugLevel=9 to stdout
Jan 27 15:21:19.495495 check[8442]: [ 5] computed razorhome=/var/spool/postfix/.razor, conf=/var/spool/postfix/.razor/razor-agent.conf, ident=/var/spool/postfix/.razor/identity-Henk
Jan 27 15:21:19.495654 check[8442]: [ 8] Client supported_engines: 4
....

Final

Now test Gui

Spam+ Report, should be fine now

Re: SA Learn error

Posted: 27 Jan 2020 15:28
by shawniverson
Official fix is here. It is currently in the testing repo.

https://github.com/E-F-A/v4/commit/0f84 ... 7953089b27

Re: SA Learn error

Posted: 26 Feb 2020 11:25
by ItemsGmbH
SpamAssassin: Feb 26 11:42:46.144 [102249] warn: reporter: razor2 report failed: No such file or directory report requires authentication at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/Razor2.pm line 176. at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/Razor2.pm line 329., 1 message(s) examined.


any ideas here?
newest version of efa

MailWatch for MailScanner v1.2.15 running on eFa-4.0.2 - © 2006-2020

Re: SA Learn error

Posted: 27 Feb 2020 20:30
by henk
I did upgrade and it still works fine with me. I did run the tests mentioned in my previous posts + modifications, and everything is still ok

Code: Select all

sudo su -l postfix -s /bin/cat /usr/share/doc/spamassassin-3.4.4.rc1/sample-spam.txt | razor-report -d --verbose -home=/var/spool/postfix/.razor

Code: Select all

spamassassin -t -D razor2 < /usr/share/doc/spamassassin-3.4.4.rc1/sample-spam.txt
test 2
Add razor home to

Code: Select all

/root/.razor/razor-agent.conf

Code: Select all

#
# Razor2 config file
# Autogenerated by Razor-Agents v2.84
# Fri Nov 15 20:52:34 2019
# Created with all default values
#
# see razor-agent.conf(5) man page
#
razorhome              = /var/spool/postfix/.razor
Now run without home

Code: Select all

sudo su -l postfix -s /bin/cat /usr/share/doc/spamassassin-3.4.4.rc1/sample-spam.txt | razor-report -d --verbose
Works fine

I'll install a new efa4 tomorrow, and will report back

Re: SA Learn error

Posted: 01 Mar 2020 17:48
by henk
Did install a new efa4 yesterday,kickstart on Centos minimal, and all razor issues are gone. (no manual modifications needed)

Re: SA Learn error

Posted: 25 Mar 2020 23:37
by MauriceW
Still getting the error in the GUI on an upgraded 4.0.2 install

Do I need to do Henk's modifications manually? And if so, which one(s)? Only razor-agent.conf or also spamassassin.conf?