Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by masegaloeh, peterh, mdpc, Andrew Schulman, Hyppy Apr 30 at 13:50

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

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.

share|improve this answer

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