[Mimedefang] MX -> 127.0.0.1

John Nemeth jnemeth at victoria.tc.ca
Mon Sep 12 18:28:32 EDT 2005


On Feb 2,  9:20am, <Matthew.van.Eerde at hbinc.com> 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 <Matthew.van.Eerde at hbinc.com>



More information about the MIMEDefang mailing list