[Mimedefang] RelayAddr

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Mon Sep 23 15:34:00 EDT 2002


Good question!

For small subnets your best bet is to list each alternative:
Example: 10.1.2.32/29
10\.1\.2\.((32)|(33)|(34)|(35)|(36)|(37)|(38)|(39))
or more simply
10\.1\.2\.3(2|3|4|5|6|7|8|9)
or even better
10\.1\.2\.3(2-9)

For larger subnets it gets trickier.
Example: 10.1.2.32/27 which is 10.1.2.32 - 10.1.2.63
To follow the example above
10\.1\.2\.((3(2-9))|((4-5)\d)|(6(1-3)))

You might try something like
if (	($ip =~ /^10\.1\.2\.(\d{1-3})$/
		and 32 <= (0 + $1)
		and (0 + $1) <= 63
	) or
	($ip =~ /^(next range)$/
		...
	)
)
{	(ip is local)
}


> -----Original Message-----
> From: Ashley M. Kirchner [mailto:ashley at pcraft.com]
> Sent: Friday, September 20, 2002 16:05
> To: mimedefang at lists.roaringpenguin.com
> Subject: Re: [Mimedefang] RelayAddr
> 
> 
> Matthew.van.Eerde at hbinc.com wrote:
> 
> > It should also be verified that $LocalNetworks has its "|" 
> families suitably
> > parenthesized
> >
> > $LocalNetworks =
> > "(10\.\d{1,3}\.\d{1,3}\.\d{1,3})|(192\.168\.\d{1,3}\.\d{1,3})"
> 
>     This makes me wonder:  While I can have email originating 
> from a number of local servers, I don't necessarily want to 
> put all of their IPs in here, and since I don't own a full 
> c-class subnet, I can't do something like (aaa\.bbb\.ccc\.\d{1,3}).
> 
>     So how would I list the subnets we own which currently 
> are /29, /28, and /27 subnets?  (trust me, this was not my 
> idea of running a network but our ISP handed us IP ranges 
> from three different subnets)
> 
> 
> --
> H | "Life is the art of drawing without an eraser." - John Gardner
>   
> +--------------------------------------------------------------------
>   Ashley M. Kirchner <mailto:ashley at pcraft.com>   .   
> 303.442.6410 x130
>   Director of Internet Operations / SysAdmin    .     
> 800.441.3873 x130
>   Photo Craft Laboratories, Inc.            .     3550 
> Arapahoe Ave, #6
>   http://www.pcraft.com ..... .  .    .       Boulder, CO 
> 80303, U.S.A.
> 
> 
> 
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
> 



More information about the MIMEDefang mailing list