SA Learn error

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

SA Learn error

Post 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
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson »

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

https://cwiki.apache.org/confluence/dis ... llingRazor
User avatar
activateit
Posts: 5
Joined: 10 Jul 2019 03:17

Re: SA Learn error

Post 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.
chanas
Posts: 4
Joined: 23 Nov 2019 15:03

Re: SA Learn error

Post 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
ItemsGmbH
Posts: 24
Joined: 20 Dec 2018 14:53

Re: SA Learn error

Post 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.
MauriceW
Posts: 13
Joined: 10 Jan 2015 10:50

Re: SA Learn error

Post 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.
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post 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
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson »

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

https://github.com/E-F-A/v4/issues/168
ressel
Posts: 27
Joined: 28 Nov 2014 11:59

Re: SA Learn error

Post by ressel »

I have this problem too.
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson »

yeah, it is harmless, and I am working on fixing it.
henk
Posts: 517
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: SA Learn error

Post 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]# su -c "/bin/cat /usr/share/doc/spamassassin-3.4.4.rc1/sample-spam.txt | razor-report -d --verbose" -s /bin/bash postfix
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.4.rc1/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 08 Oct 2020 12:58, edited 5 times in total.
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson »

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

https://github.com/E-F-A/v4/commit/0f84 ... 7953089b27
ItemsGmbH
Posts: 24
Joined: 20 Dec 2018 14:53

Re: SA Learn error

Post 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
henk
Posts: 517
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: SA Learn error

Post 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

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

I'll install a new efa4 tomorrow, and will report back
Last edited by henk on 31 May 2020 07:42, edited 1 time in total.
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
henk
Posts: 517
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: SA Learn error

Post by henk »

Did install a new efa4 yesterday,kickstart on Centos minimal, and all razor issues are gone. (no manual modifications needed)
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
MauriceW
Posts: 13
Joined: 10 Jan 2015 10:50

Re: SA Learn error

Post 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?
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson »

This may be related to a missing spamassassin symlink. I'm pushing out the symlink in a minor update starting tonight. If you want to fix it faster, just run this.

Code: Select all

sudo ln -s /etc/mailscanner/spamassassin.conf /etc/mail/spamassassin/mailscanner.cf
lukekenny
Posts: 15
Joined: 29 Jun 2020 15:37

Re: SA Learn error

Post by lukekenny »

I am seeing this error in a recent, 20 day old fresh install of 4.0.2, in the GUI:
SpamAssassin: Jun 30 01:35:56.023 [9217] 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.
Have checked the soft link, which was already there, Razor appears to be registered and the test commands mentioned above seem to give positive results, no errors etc.

Should the configuration changes mentioned above need to be made on a fresh install for reporting to work?
MattS
Posts: 20
Joined: 12 Dec 2017 14:00

Re: SA Learn error

Post by MattS »

lukekenny wrote: 29 Jun 2020 15:43 I am seeing this error in a recent, 20 day old fresh install of 4.0.2, in the GUI:
Yup, same here. Hopefully the colleague that has faithfully been monitoring incoming mail for the last 10 days and flagging and reporting spam hasn't been wasting his time entirely.
lukekenny
Posts: 15
Joined: 29 Jun 2020 15:37

Re: SA Learn error

Post by lukekenny »

I applied the changes mentioned in Henk's first post above, and all seems well. There's no error in the GUI any more.

Is there a way to determine if Razor is working, such as a command that will tell me which emails I've submitted?
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson »

Pukkeltje
Posts: 11
Joined: 08 Sep 2016 08:32

Re: SA Learn error

Post by Pukkeltje »

I still have this problem, while my EFA version is upgraded: "MailWatch for MailScanner v1.2.15 running on eFa-4.0.3 - © 2006-2020."

How can I remove this error? I tried Henk's steps, but it did not work.
henk
Posts: 517
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: SA Learn error

Post by henk »

I tried Henk's steps, but it did not work.
Please check again if you did all the changes
can you show the output of the commands mentioned?
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
hunter-nl
Posts: 9
Joined: 02 Apr 2014 10:07

Re: SA Learn error

Post by hunter-nl »

I had the same issue. I've fixed it with the following steps:

1. Into the file /var/spool/postfix/.razor/razor-agent.conf add the line

Code: Select all

razorhome = /var/spool/postfix/.razor
2. Into the file /etc/MailScanner/spamassassin.conf add the following section

Code: Select all

ifplugin Mail::SpamAssassin::Plugin::Razor2
razor_config  /var/spool/postfix/.razor/razor-agent.conf
#razorhome     = /var/spool/postfix/.razor
endif
And restart spamassassin service

Code: Select all

systemctl restart spamassassin
3. Run the command:

Code: Select all

su -c "/bin/cat /usr/share/doc/spamassassin/sample-spam.txt | razor-report -d --verbose" -s /bin/bash postfix
4. If /var/spool/postfix/.razor/razor-agent.log doesn't exist yet, create empty file

Code: Select all

touch /var/spool/postfix/.razor/razor-agent.log
5. Change permissions

Code: Select all

chown -R postfix:mtagroup /var/spool/postfix/.razor
chmod 640 /var/spool/postfix/.razor/{identity-*,razor-agent.conf}
chmod 664 /var/spool/postfix/.razor/razor-agent.log
chmod 644 /var/spool/postfix/.razor/server*
chmod ug+s /var/spool/postfix/.razor
Now it should work.
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: SA Learn error

Post by shawniverson »

This is still happening? I'll take another look.
Post Reply