[Mimedefang] Scanning inbound mail only

listuser at neo.pittstate.edu listuser at neo.pittstate.edu
Tue Dec 10 13:23:00 EST 2002


On Sat, 7 Dec 2002, David F. Skoll wrote:

> On Sat, 7 Dec 2002 listuser at neo.pittstate.edu wrote:
> 
> > Unfortunately we don't use SMTP AUTH.  The other unfortunate thing is I
> > haven't got a clue how to use $RelayAddress.  Do you think there might be
> > an example in the archives and if so do you about when it might have been
> > posted?
> 
> Something like this:
> 
> 	if ($RelayAddress eq "127.0.0.1" or
> 	    $RelayAddress =~ /^192\.168\.2\./) {
> 		# Do not do spam check
> 	} else {
> 		# Do spam check
> 	}
> 
> That skips checking for 127.0.0.1 and the entire class C 192.168.2.xxx network.

Could someone help me with a regex to match an entire /24 with the
exception of a single IP?  We don't do any SA scoring on our backup MX
which resides on a subnet with hosts when want to not filter from.  I
worded that badly.  We want to score mail from a single host that's in the
same /24 with hosts that we don't want scored (hence the purpose of the
$RelayAddr check above).  I was thinking along the lines of

$RelayAddr =~ /^aaa\.bbb\.ccc\.([0-9]*|![2])/

Alas I'm afraid I'm worse at regexs than I am perl.  I was trying to
write 'any number of occurences of 0-9 but not a single occurence of
"2"Any tips?

Thanks
Justin




More information about the MIMEDefang mailing list