On 2020年12月29日, jak <nospam at please.ty> wrote: >> you could try this way: >> # ----------- > from dns import resolver as dns >> emails=['john.doe at fakeserver.bah', > 'john.doe at gmail.com'] >> for ue in emails: > try: > mxl = dns.resolve(ue.split('@')[1], 'MX') > except: > print(f'{ue}: bad mail server') > else: > if len(mxl) > 0: > print(f'{ue}: valid mail server') > # ----------- >> ... so, having verified the sever, you should only worry about the name. I actually have tried, that's good idea. -- Thanks