Is it possible to use the LAN DNS to redirect an email to a different domain?

i.e. if I want to send emails to the domain name this.longdomainname.co.uk on a regular basis I could setup my DNS so that I could instead send an email to recipient@alias and the DNS would change alias to this.longdomainname.co.uk so in fact my email would be sent to recipient@this.longdomainname.co.uk


No, this is not possible as stated. DNS does not know anything about email. A DNS server only receives "name lookup queries" (or other types of lookup) and answer.

For example, you lookup "example.com" and you get the IP address associated with it. Or you ask the DNS server, what's the "mail exchanger for example.com" and you get the name of the email server to send emails to.

What you would need is run a local MTA (mail transport agent), such as Postfix, which could translate the email addresses for you and forward to a real server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.