SA Learn error

Bugs in eFa 4
Post Reply
User avatar
activateit
Posts: 4
Joined: 10 Jul 2019 03:17

SA Learn error

Post by activateit » 15 Oct 2019 23:46

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

User avatar
shawniverson
Posts: 2994
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson » 18 Oct 2019 15:12

Non-fatal. You need to re-register Razor.

https://cwiki.apache.org/confluence/dis ... llingRazor
Version eFa 4.0.2 now available!

User avatar
activateit
Posts: 4
Joined: 10 Jul 2019 03:17

Re: SA Learn error

Post by activateit » 22 Nov 2019 23:47

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.

chanas
Posts: 4
Joined: 23 Nov 2019 15:03

Re: SA Learn error

Post by chanas » 23 Nov 2019 15:55

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

ItemsGmbH
Posts: 21
Joined: 20 Dec 2018 14:53

Re: SA Learn error

Post by ItemsGmbH » 12 Dec 2019 15:40

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.

MauriceW
Posts: 6
Joined: 10 Jan 2015 10:50

Re: SA Learn error

Post by MauriceW » 05 Jan 2020 10:51

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.

User avatar
shawniverson
Posts: 2994
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson » 05 Jan 2020 12:31

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
Version eFa 4.0.2 now available!

User avatar
shawniverson
Posts: 2994
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson » 05 Jan 2020 12:46

Reproduced issue even after resetting razor. Working on this...

https://github.com/E-F-A/v4/issues/168
Version eFa 4.0.2 now available!

ressel
Posts: 27
Joined: 28 Nov 2014 11:59

Re: SA Learn error

Post by ressel » 23 Jan 2020 16:43

I have this problem too.

User avatar
shawniverson
Posts: 2994
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson » 24 Jan 2020 11:14

yeah, it is harmless, and I am working on fixing it.
Version eFa 4.0.2 now available!

henk
Posts: 423
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: SA Learn error

Post by henk » 27 Jan 2020 14:41

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/mail/spamassassin/mailscanner.cf
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
Last edited by henk on 27 Jan 2020 15:36, edited 1 time in total.

User avatar
shawniverson
Posts: 2994
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson » 27 Jan 2020 15:28

Official fix is here. It is currently in the testing repo.

https://github.com/E-F-A/v4/commit/0f84 ... 7953089b27
Version eFa 4.0.2 now available!

Post Reply