LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Forward domain emails to another domain and address (https://www.linuxquestions.org/questions/linux-server-73/forward-domain-emails-to-another-domain-and-address-4175505361/)

szboardstretcher 05-18-2014 06:14 AM

Forward domain emails to another domain and address
 
Quick Background:
I've always been terrible with mail setup. I would so much rather leave it for a mail administrator/expert.

Anyway, im in this situation.

I have access to the domain records for all sites at the registrar (nettica). And I have full access to do whatever I would like at the servers.

There are two domains, and one administrator email. The two domains are fooX.com and fooY.com, and the admin email is admin@gmail.com

Question:
What kind of setup would i have to do, MX/TXT record-wise, and server-wise, to take all mail inbound to *.fooX.com and *.fooY.com and forward to admin@gmail.com?

A few pointers and an explanation as to where to go from here would be sufficient. I just don't even know where to start right now.

dijetlo 05-18-2014 04:29 PM

I'm not a big fan of doing clever things with MX records.
1: If you screw it up, you're going to be saying " soon" for at least 12 hours while your fix gets replicated.
2: People will, from time to time, look at MX records, you don't want your corporate mail server pointed at your gmail account...not good for your image, as it were.

You can do it at the mail server but it depends on which mail server your running. You want to set up an alias for the accounts (all accounts) which, if your server accepts expansion characters looks something like
Code:

*@foo?.com = admin@gmail.com
or maybe...
*@foo{x,y}.com = admin@gmail.com

It depends on how the email program or underlying shell interprets expansion characters,
Quote:

And I have full access to do whatever I would like at the servers.
Fortune favors the bold.
Quote:

He either fears his fate too much,
Or his deserts are small,
That dares not put it to the touch
To gain or lose it all.

bathory 05-19-2014 12:54 PM

Quote:

Question:
What kind of setup would i have to do, MX/TXT record-wise, and server-wise, to take all mail inbound to *.fooX.com and *.fooY.com and forward to admin@gmail.com?

A few pointers and an explanation as to where to go from here would be sufficient. I just don't even know where to start right now.
Assuming that the MX records for both domains point to your smtp server, you can create a catch-all email address for both domains. Thus whatever mail comes in, it's forwarded to admin@gmail.com.
So use your favorite search engine to see how to setup a catch-all email address for your MTA

Regards

szboardstretcher 05-19-2014 12:58 PM

Quote:

Originally Posted by bathory (Post 5173692)
Assuming that the MX records for both domains point to your smtp server, you can create a catch-all email address for both domains. Thus whatever mail comes in, it's forwarded to admin@gmail.com.
So use your favorite search engine to see how to setup a catch-all email address for your MTA

Regards

Thanks for the info, it was super simple to find with the words 'catch all.' That was my missing piece. Thank you friend.


All times are GMT -5. The time now is 08:51 PM.