2

I have whm installed on my VPS, which my domain MX records are pointing to:

 0:mail.mydomain.com

and whm/cpanel has mail forwarding rules which pipes certain @mydomain email addresses into my CRM software.

But for certain email addresses I want to forward into Google Apps. For example, sales@mydomain.com, support@mydomain.com pipes into cPanel --> CRM (mail.mydomain.com) but josh@mydomain.com should be going to Google MX records. Is that possible?

The reason why is I want to register for Google Apps such as analytics and other Google services under josh@mydomain.com.

My initial thoughts were to add a subdomain such as josh@admin.mydomain.com and point that subdomain's MX records to Google.. but I want to avoid this if possible.

Ladadadada
  • 25,847
  • 7
  • 57
  • 90
Josh
  • 21
  • 1

1 Answers1

2

MX records work for the entire domain and there is no way to have one email address at a domain point to different MX records than another email address at the same domain.

It might be better to go the other way. Set your MX records to point to Google and have them forward certain email addresses to your mail server. You will get better reliability that way too.

It certainly is possible to have Postfix forward emails. In main.cf:

smtp_generic_maps = hash:/etc/postfix/generic

And in /etc/postfix/generic:

josh@example.com josh@gmail.com

Run postmap generic after editing the file and postfix reload to tell Postfix to reload its config.

If you're using something other than Postfix, add it to your question.

Ladadadada
  • 25,847
  • 7
  • 57
  • 90