Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 26. október 2026

Rozdiely pre scripts/perl/postfix/spf.pl medzi verziami 1.1 a 1.2

verzia 1.1, 2005/12/02 17:56:50 verzia 1.2, 2005/12/02 20:56:12
Riadok 14 
Riadok 14 
 use Fcntl;  use Fcntl;
 use Carp;  use Carp;
 use Sys::Syslog qw(:DEFAULT setlogsock);  use Sys::Syslog qw(:DEFAULT setlogsock);
   use Time::HiRes qw(gettimeofday tv_interval usleep sleep);
 use strict;  use strict;
   
 # ----------------------------------------------------------  # ----------------------------------------------------------
Riadok 28  use strict;
Riadok 29  use strict;
  push @HANDLERS, "sender_permitted_from"; use Mail::SPF::Query;   push @HANDLERS, "sender_permitted_from"; use Mail::SPF::Query;
   
 my $VERBOSE = 1;  my $VERBOSE = 1;
   #my $VERBOSE = 0;
   
 my $DEFAULT_RESPONSE = "DUNNO";  my $DEFAULT_RESPONSE = "DUNNO";
   
Riadok 159  while (<STDIN>) {
Riadok 161  while (<STDIN>) {
   if (/=/)       { my ($k, $v) = split (/=/, $_, 2); $attr{$k} = $v; next }    if (/=/)       { my ($k, $v) = split (/=/, $_, 2); $attr{$k} = $v; next }
   elsif (length) { syslog('warning', "warning: ignoring garbage: %.100s", $_); next; }    elsif (length) { syslog('warning', "warning: ignoring garbage: %.100s", $_); next; }
   
   if ($VERBOSE) {    if (0 && $VERBOSE) {
     for (sort keys %attr) {      for (sort keys %attr) {
       syslog('debug', "Attribute: %s=%s", $_, $attr{$_});        syslog('debug', "Attribute: %s=%s", $_, $attr{$_});
     }      }
Riadok 169  while (<STDIN>) {
Riadok 171  while (<STDIN>) {
   
   my $action = $DEFAULT_RESPONSE;    my $action = $DEFAULT_RESPONSE;
   my %responses;    my %responses;
     my $ts0 = [gettimeofday];
   foreach my $handler (@HANDLERS) {    foreach my $handler (@HANDLERS) {
     no strict 'refs';      no strict 'refs';
     my $response = $handler->(attr=>\%attr);      my $response = $handler->(attr=>\%attr);
     syslog('debug', "handler %s: %s", $handler, $response);          #syslog('debug', "handler %s: %s", $handler, $response);
     if ($response and $response !~ /^dunno/i) {      if ($response and $response !~ /^dunno/i) {
       syslog('info', "handler %s: %s is decisive.", $handler, $response);        syslog('info', "handler %s: %s is decisive.", $handler, $response);
       $action = $response; last;        $action = $response; last;
     }      }
   }    }
     if ($VERBOSE) {
             syslog('debug', "SPF-REQUIRED-TIME: %s seconds", tv_interval($ts0, [gettimeofday]));
     }
   
   syslog('info', "decided action=%s", $action);    syslog('info', "decided action=%s", $action);
   

Legend:
Odstranené z verzie1.1  
zmenené riadky
  Pridané vo verzii1.2

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok