Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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