fix email lookup to work with internal addresses