*** assp - b45.pl	Tue Nov 28 01:25:54 2006
--- assp.pl	Tue Nov 28 01:55:17 2006
***************
*** 262,269 ****
    Like a more efficient version of spamLovers &amp; redlist combined. Valid entry types are as per spamlovers.'],
  [npRe,'Expression to Identify No-processing Mail*',60,textinput,'','(.*)',ConfigCompileRe,
!   'If an email header matches this Perl regular expression it will pass through unprocessed. For example: \\[autoreply\\]<br /><hr />
!   <div class=\"menuLevel1\">Notes On Noprocessing</div>
!   <input type="button" value="Notes" onClick="javascript:popFileEditor(\'notes/noprocessing.txt\',3);">
  '],
  [0,0,0,'heading','Relaying'],
  [ispip,'ISP/Secondary MX Servers*',60,textinput,'','(\S*)',ConfigMakeRe,
--- 262,273 ----
    Like a more efficient version of spamLovers &amp; redlist combined. Valid entry types are as per spamlovers.'],
  [npRe,'Expression to Identify No-processing Mail*',60,textinput,'','(.*)',ConfigCompileRe,
!   'If an email header matches this Perl regular expression it will pass through unprocessed. For example: \\[autoreply\\]
  '],
+ [invertNoProcessing,'Invert Unprocessed Addresses',0,checkbox,0,'(.*)',undef,
+   'Inverts the Unprocessed Addresses and Expression to Identify No-processing Mail.  If enabled, these options will determine <br />
+   which emails are processed, instead of which ones are ignored. <br /><hr />
+   <div class=\"menuLevel1\">Notes On Noprocessing</div>
+   <input type="button" value="Notes" onClick="javascript:popFileEditor(\'notes/noprocessing.txt\',3);">'
+ ],
  [0,0,0,'heading','Relaying'],
  [ispip,'ISP/Secondary MX Servers*',60,textinput,'','(\S*)',ConfigMakeRe,
***************
*** 3329,3333 ****
      }
  # update Stats
!     if ($this->{noprocessing}==1) {
        $Stats{rcptUnprocessed}++;
      } elsif ($this->{addressedToSpamBucket}) {
--- 3333,3337 ----
      }
  # update Stats
!     if ($invertNoProcessing xor ($this->{noprocessing}==1) ) {
        $Stats{rcptUnprocessed}++;
      } elsif ($this->{addressedToSpamBucket}) {
***************
*** 3379,3383 ****
        return;
      }
!     if($this->{noprocessing}==1 || ($noProcessing && $this->{mailfrom}=~$NPREL) ) {
  # all addresses are on no-processing list
        $this->{noprocessing}=1;
--- 3383,3387 ----
        return;
      }
!     if( $invertNoProcessing xor ($this->{noprocessing}==1 || ($noProcessing && $this->{mailfrom}=~$NPREL) ) ) {
  # all addresses are on no-processing list
        $this->{noprocessing}=1;
***************
*** 3832,3836 ****
    return 1 if $this->{acceptall}==1;
    return 1 if $this->{whitelisted}  && !$bombReWL;
!   return 1 if $this->{noprocessing}==1 && !$bombReNP;
    return 1 if ($this->{relayok} && !$bombReRelay);
    $tlit="";
--- 3836,3840 ----
    return 1 if $this->{acceptall}==1;
    return 1 if $this->{whitelisted}  && !$bombReWL;
!   return 1 if ($invertNoProcessing xor ($this->{noprocessing}==1)) && !$bombReNP;
    return 1 if ($this->{relayok} && !$bombReRelay);
    $tlit="";
***************
*** 3870,3874 ****
    return 1 if $this->{acceptall}==1;
    return 1 if $this->{whitelisted}  && !$bombReWL;
!   return 1 if $this->{noprocessing}==1 && !$bombReNP;
    return 1 if ($this->{relayok} && !$bombReRelay);
    if($HeaderMaxBytes && $this->{maillength}>$HeaderMaxBytes) {
--- 3874,3878 ----
    return 1 if $this->{acceptall}==1;
    return 1 if $this->{whitelisted}  && !$bombReWL;
!   return 1 if ($invertNoProcessing xor ($this->{noprocessing}==1)) && !$bombReNP;
    return 1 if ($this->{relayok} && !$bombReRelay);
    if($HeaderMaxBytes && $this->{maillength}>$HeaderMaxBytes) {
***************
*** 3909,3913 ****
    return 1 if $this->{acceptall}==1;
    return 1 if $this->{whitelisted};
!   return 1 if $this->{noprocessing}==1;
    return 1 if ($this->{relayok});
    $tlit="";
--- 3913,3917 ----
    return 1 if $this->{acceptall}==1;
    return 1 if $this->{whitelisted};
!   return 1 if $invertNoProcessing xor ($this->{noprocessing}==1);
    return 1 if ($this->{relayok});
    $tlit="";
***************
*** 3942,3946 ****
    return 1 if $this->{contentonly};
    return 1 if $this->{whitelisted};
!   return 1 if $this->{noprocessing}==1;
  
    if ($DoValidFormatHelo && $validFormatHeloRe && !($helo =~('('.$validFormatHeloReRE.')'))) {
--- 3946,3950 ----
    return 1 if $this->{contentonly};
    return 1 if $this->{whitelisted};
!   return 1 if $invertNoProcessing xor ($this->{noprocessing}==1);
  
    if ($DoValidFormatHelo && $validFormatHeloRe && !($helo =~('('.$validFormatHeloReRE.')'))) {
***************
*** 3974,3978 ****
    return 1 if $this->{contentonly};
    return 1 if $this->{whitelisted};
!   return 1 if $this->{noprocessing}==1;
  
     
--- 3978,3982 ----
    return 1 if $this->{contentonly};
    return 1 if $this->{whitelisted};
!   return 1 if $invertNoProcessing xor ($this->{noprocessing}==1);
  
     
***************
*** 4002,4006 ****
    return 1 if ($this->{relayok});
    return 1 if ( $this->{whitelisted});
!   return 1 if ($this->{noprocessing}==1);
    return 1 if ($heloBlacklistIgnore && $this->{helo} =~ $HBIRE);
    $tlit="";
--- 4006,4010 ----
    return 1 if ($this->{relayok});
    return 1 if ( $this->{whitelisted});
!   return 1 if $invertNoProcessing xor ($this->{noprocessing}==1);
    return 1 if ($heloBlacklistIgnore && $this->{helo} =~ $HBIRE);
    $tlit="";
***************
*** 4034,4038 ****
    return 1 if ( $this->{contentonly});
    return 1 if ( $this->{whitelisted});
!   return 1 if ($this->{noprocessing}==1);
    return 1 if (pbWhiteFind($this->{ip}));
    return 1 if ($this->{relayok});
--- 4038,4042 ----
    return 1 if ( $this->{contentonly});
    return 1 if ( $this->{whitelisted});
!   return 1 if $invertNoProcessing xor ($this->{noprocessing}==1);
    return 1 if (pbWhiteFind($this->{ip}));
    return 1 if ($this->{relayok});
***************
*** 4091,4095 ****
    return 1 if ($this->{ispip}==1);
    return 1 if ($this->{nodelay}==1);
!   return 1 if ($this->{noprocessing}==1);
    return 1 if(pbWhiteFind($this->{ip}));
    return 1 if (!exists $PBBlack{$ip});
--- 4095,4099 ----
    return 1 if ($this->{ispip}==1);
    return 1 if ($this->{nodelay}==1);
!   return 1 if $invertNoProcessing xor ($this->{noprocessing}==1);
    return 1 if(pbWhiteFind($this->{ip}));
    return 1 if (!exists $PBBlack{$ip});
***************
*** 4115,4119 ****
    return 1 if ( $this->{contentonly});
    return 1 if ( $this->{whitelisted} && !$DoExtremeWL);
!   return 1 if ($this->{noprocessing}==1 && !$DoExtremeNP);
    return 1 if (exists $PBWhite{$ip});
    return 1 if ($this->{ispip}==1);
--- 4119,4123 ----
    return 1 if ( $this->{contentonly});
    return 1 if ( $this->{whitelisted} && !$DoExtremeWL);
!   return 1 if ($invertNoProcessing xor ($this->{noprocessing}==1)) && !$DoExtremeNP;
    return 1 if (exists $PBWhite{$ip});
    return 1 if ($this->{ispip}==1);
***************
*** 4147,4151 ****
    return 1 if ( $this->{contentonly});
    return 1 if ( $this->{whitelisted} && !$RBLWL);
!   return 1 if ($this->{noprocessing}==1);
    return 1 if !(exists $RBLCache{$ip});
    return 1 if ($DoRBLCache==0);
--- 4151,4155 ----
    return 1 if ( $this->{contentonly});
    return 1 if ( $this->{whitelisted} && !$RBLWL);
!   return 1 if $invertNoProcessing xor ($this->{noprocessing}==1);
    return 1 if !(exists $RBLCache{$ip});
    return 1 if ($DoRBLCache==0);
***************
*** 4177,4181 ****
    d('Delayok');
    return 1 unless (!$this->{relayok} && $EnableDelaying && !($ispip && $this->{ip}=~$ISPRE));
!   return 1 unless ($this->{noprocessing}!=1 && !($noProcessing && $this->{mailfrom}=~$NPREL));
    my $a=lc $this->{mailfrom};
    my $time=$UseLocalTime ? localtime() : gmtime();
--- 4181,4185 ----
    d('Delayok');
    return 1 unless (!$this->{relayok} && $EnableDelaying && !($ispip && $this->{ip}=~$ISPRE));
!   return 1 unless $invertNoProcessing xor (($this->{noprocessing}!=1 && !($noProcessing && $this->{mailfrom}=~$NPREL)));
    my $a=lc $this->{mailfrom};
    my $time=$UseLocalTime ? localtime() : gmtime();
***************
*** 4568,4572 ****
      $this->{maillength}=length($b);
  
!     if ($this->{noprocessing}==1) {
        if(($BlockNPExes>=1 && $BlockNPExes<=3 && $b=~$badattachRE[$BlockNPExes]) ||
           ($GoodAttach && $BlockNPExes==4 && $b=~$allattachRE && $b!~$goodattachRE) ){
--- 4572,4576 ----
      $this->{maillength}=length($b);
  
!     if ($invertNoProcessing xor ($this->{noprocessing}==1)) {
        if(($BlockNPExes>=1 && $BlockNPExes<=3 && $b=~$badattachRE[$BlockNPExes]) ||
           ($GoodAttach && $BlockNPExes==4 && $b=~$allattachRE && $b!~$goodattachRE) ){
***************
*** 4852,4856 ****
    my($myip,$score,$reason,$enforce)=@_;
    return	if ( $this->{whitelisted});
!   return	if ($this->{noprocessing}==1);
    return	if ($this->{ispip}==1);
    return	if ($this->{nodelay}==1);
--- 4856,4860 ----
    my($myip,$score,$reason,$enforce)=@_;
    return	if ( $this->{whitelisted});
!   return	if $invertNoProcessing xor ($this->{noprocessing}==1);
    return	if ($this->{ispip}==1);
    return	if ($this->{nodelay}==1);
***************
*** 5721,5725 ****
  my $ip=$_[1];
  $SpamProbConfidence=1;
! return $SpamProb=0 if $this->{noprocessing}==1;
  return $SpamProb=0 if $DoBayesian==0;
   if($npRe && $npReRE!="" && $msg=~('('.$npReRE.')')) {
--- 5725,5729 ----
  my $ip=$_[1];
  $SpamProbConfidence=1;
! return $SpamProb=0 if $invertNoProcessing xor ($this->{noprocessing}==1);
  return $SpamProb=0 if $DoBayesian==0;
   if($npRe && $npReRE!="" && $msg=~('('.$npReRE.')')) {
