Use hosts file as primary and then DNS as secondary

Since I have a local mail server domain on intranet which has now been bought by someone. I need to bypass DNS server for that particular domain and use hosts file for that. How can this be done ?