-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't work #2
Comments
For what it's worth (more than 2 years later 🤷♂️):
my $fail = 0;
if ( not defined($ret) )
{
$ret = 'unfortunately $ret is NOT defined';
$fail = 1;
}
print STDERR 'Content of $ret:"'.$ret.'"'."\n";
if ( $fail )
{
exit(1);
} between lines 115 and 117 and paste the output in this issue. edit: changed debug codeblock |
Theoryhttps://metacpan.org/release/TODDR/Razor2-Client-Agent-2.86/source/lib/Razor2/Client/Agent.pm#L449 defines # returns 0 if match (spam)
# returns 1 if no match (legit)
# returns 2 if error for the But my %logret = ( 0 => 'spam', 1 => 'ham'); If the When this value is later used in ErrorLog( "return value: ". $logret{$ret} ) if $debug; there is not a key in the SolutionChanging the my %logret = ( 0 => 'spam', 1 => 'ham', 2 => 'error' ); should solve this problem. Side noteAlso it's interesting that if the Razor2 Agent ( Though this might be a good design decision because if the Razor2 Agent just fails a lot of good emails (ham) might be flagged as spam and people might loose important mails. So this is probably for the best? |
Thinking about it a bit more: The problem is not that razorfy.pl is broken but that at the moment it gives you misleading error messages. The problem probably lies with razor / Rspamd (or the Library So the following patch for - my %logret = ( 0 => 'spam', 1 => 'ham');
+ my %logret = ( 0 => 'spam', 1 => 'ham', 2 => 'Error: razor / Rspamd or Razor2::Client:Agent may be broken as it returns an error.' ); is maybe more truthful. 😅 🙃 |
Hello
Just installed razorfly. Doesn't work
Here is log:
janv. 29 13:23:12 saturne razorfy.pl[33233]: RAZORFY started, PID: 33233 Waiting for client connections...
janv. 29 13:23:40 saturne razorfy.pl[33233]: active threads: -1
janv. 29 13:23:40 saturne razorfy.pl[33233]: client array length: 1
janv. 29 13:23:40 saturne razorfy.pl[33233]: Accepted New Client Connection From:127.0.0.1:56350
janv. 29 13:23:40 saturne razorfy.pl[33233]: Use of uninitialized value within %logret in concatenation (.) or string at /usr/local/bin/razorfy.pl line 117, line 36.
janv. 29 13:23:40 saturne razorfy.pl[33233]: return value:
janv. 29 13:23:40 saturne razorfy.pl[33233]: Thread 1 terminated abnormally: IO::Socket::INET: connect: Operation already in progress at /usr/local/bin/razorfy.pl line 77, line 36.
OS: Debian buster
The text was updated successfully, but these errors were encountered: