On Feb 2,  9:20am, <[EMAIL PROTECTED]> wrote:
} KAM wrote:
} > New version  now at
} > http://www.pccc.com/downloads/MIMEDefang/contrib/check_primary_mx_stub.pl
} > which takes into account much more of the cases you stated.  Thanks
} > for the feedback and I've added some comments inline below.
} 
} Beautiful.
} 
} One nitpick:
} 
}   #172.16/12
}   if ($ip =~ /^172\.16\./) { # not complete
}     #return 1;
}   }
} 
} True enough, but actually 172.16/12 includes 172.16-31...
} 
}   #172.16/12
}   if ($ip =~ /^172\.(16|17|18|19|2[0-9]|30|31)\./) { # messy?
}     #return 1;
}   }

use NetAddr::IP;

if ($ip->within(new NetAddr::IP("172.16.0.0/12"))) {
  #return 1;
}

complete and not messy

}-- End of excerpt from <[EMAIL PROTECTED]>
_______________________________________________
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list
[email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to