We lock down our SMTP relays (i.e. Edge Servers) to only accept incoming email messages from specific server IP adresses. At the moment, our server is home to over 2100 different IP addresses. To consolidate the list, I considered trying to find similar CIDR notation subnets, but that turned to difficult and opened too many holes.
What I found is Exchange 2007 allows you to define ranges. From that I defined the attached script to sort, then consolidate the list into a single series of IPs. This process has reduced the single IPs into 1100 IP ranges.