How to receive email from another domain using cname?

0

For example,

I have an address info@mail.example1.example. I want to send email to this address and receive it on info@test.example2.example or info@example2.example.

Is it possible to do this trick without configuring redirect of emails? For example, with cname.

trnj

Posted 2018-05-10T21:44:55.663

Reputation: 9

If possible, please delete this question. – trnj – 2018-05-11T00:00:01.437

Answers

1

Ask the administrator of the first email address to setup a forwarding to the second one. This can be done address by address. On Unix it starts often by a simple .forward file in home directory.

You are stating you do not want forwarding, but why exactly? Because if you intend to do DNS changes (that will only partially solves the problem as @HomoTechsual shows) that means you control example1.example in some way (otherwise you won't be able to do any DNS change here), so if you control it why you do not want to set up forwarding on it?

By being so overly generic in your question, you are making it difficult to give you relevant answers, so you probably need to edit your question to be more specific/clear on your constraints. Using non obfuscated names could help too.

Patrick Mevzek

Posted 2018-05-10T21:44:55.663

Reputation: 1 334

I also struggled to answer given the generic nature of the question however the question is explicit "Is it possible to do this trick without configuring redirect of emails? For example, with cname." The answer "forward the emails" would appear to not answer the question. – HomoTechsual – 2018-05-10T22:58:52.023

1Maybe but the set of constraints makes no sense. Dealing with DNS means he has some control over example1.example anyway. So how could he control it but not configuring forwarding on it? – Patrick Mevzek – 2018-05-10T23:05:37.747

I would like to explore if I cname 1.superuser.com to 2.superuser1.com, and then send an email to info@1.superuser.com, will I be able to receive this email on info@2.superuser1.com – trnj – 2018-05-10T23:33:01.193

@trnj you are restating the same thing, without noticing my earlier comment (your constraints do not make sense) nor HomoTechsual's answer that already replies to you that a CNAME just by itself is not enough. Start by explaining if you control one of the two domain (their DNS, their services), both, or none of them. Edit your question for that do not add comments. – Patrick Mevzek – 2018-05-10T23:37:39.190

I control 1 domain, another one is owned by a user. I just explore a feature for software development purposes. Anyway, moderator, please close this thread. – trnj – 2018-05-10T23:43:16.363

0

You can't do this purely with DNS due to how email routing works. The destination email server would need to know that it is supposed to handle mail for both/all domains and to route these emails to the same mailbox (either through use of aliases or forwarding)

Email is generally routed through "Mail Exchange" or MX records in DNS falling back to A/AAAA records where MX records aren't configured.

The scenario is thus:

  • You send an email to info@mail.example1.example
  • Your MX record for mail.example1.example says deliver mail to mail.example2.example

  • Your outgoing mail server resolves mail.example2.example to 192.0.2.111

  • Your outgoing mail server says to 192.0.2.111 I have an email here for info@mail.example1.example

Here one of two things happens:

  1. 192.0.2.111 says "Sorry I don't know how to handle mail for mail.example1.example, goodbye."
  2. 192.0.2.111 says "Ah okay, thanks" and delivers the email according to it's configured aliases or forwarders.

Note: This is drastically oversimplified but the key point is that you cannot forward mail to a different domain without configuring the receiving mail server accordingly. Just changing the DNS is very unlikely to work with a sanely configured receiving mail server.

HomoTechsual

Posted 2018-05-10T21:44:55.663

Reputation: 124

You can forward without any change at the new recipient side as long as the forwarder rewrites the To address in the envelope. – Patrick Mevzek – 2018-05-10T22:54:29.887

Straight DNS/Cname forwarding can't rewrite the to address in the envelope - that would require config on either sending or receiving mail server as far as I can deduce? – HomoTechsual – 2018-05-10T22:56:26.420

"MX records in DNS."... or A/AAAA records in absence of MX records. To argue :-) – Patrick Mevzek – 2018-05-10T23:08:39.953

@PatrickMevzek good point - added – HomoTechsual – 2018-05-10T23:15:38.033