Dnia  1.12.2019 o godz. 14:18:32 Linkcheck pisze:
> Ok, thanks. I can live with that.
> 
> But what about UNPARSEABLE_RELAY? How can I preoperly fix that? Do I
> really have to nullify the rule or is there something in postfix
> that I've got wrong?

I fixed this in one of SpamAssassin's Perl modules,
/usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm.

Here is my diff:

*** Received.orig.pm    2014-02-07 09:36:23.000000000 +0100
--- Received.pm 2019-09-27 12:38:23.000000000 +0200
***************
*** 146,153 ****
  
      my $relay = $self->parse_received_line ($line);
      if (!defined $relay) {
!       dbg("received-header: unparseable: $line");
!       $self->{num_relays_unparseable}++;
      }
  
      # undefined or 0 means there's no result, so goto the next header
--- 146,161 ----
  
      my $relay = $self->parse_received_line ($line);
      if (!defined $relay) {
!       # workaround: if SpamAssassin is running as a milter, first header is
!       # artificially generated and doesn't contain IP address nor Message ID
!       # like this:
!       # from brama.eko.wroc.pl (unknown)_ by rafa.eu.org(Postfix 
2.9.6/8.13.0) with SMTP id unknown_ Fri, 27 Sep 2019 12:31:50 +0200_ 
(envelope-from <rowery2-boun...@listy.eko.org.pl>
!       if ($line =~ m/^from +[-.a-zA-Z0-9]+ +\(unknown\).*with +SMTP +id 
+unknown.*\(envelope-from/) {
!         dbg("received-header: added by milter-ignored: $line");
!       } else {
!         dbg("received-header: unparseable: $line");
!         $self->{num_relays_unparseable}++;
!       }
      }
  
      # undefined or 0 means there's no result, so goto the next header

-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."

Reply via email to