I have two domains: d1.tld and d2.tld.
I would like to send emails from d2.tld with the mail from user@d1.tld
How should I set my MX record so that receiving mail servers will accept the message?
Is it:
d1.tld IN MX 10 mail.d2.tld
or
d2.tld IN MX 10 mail.d1.tld ?
At the same time I only want to receive emails on d1.tld when sent to an @d1.tld address - so I guess d1.tld should point at mail.d1.tld like this d1.tld IN MX 10 mail.d1.tld, right?
Side note: I set an SPF record that allows d2.tld to send messages with the mail from @d1.tld