Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm trying to figure out if there is a way that an email can be sent to two mail servers. One being a local server configured in CPanel and the other is Google Apps.

I've already configured the server to allow for email to be sent to Gmail's servers with the MX record. But now I want it to also keep a copy of the email on the actual Cpanel server. That way any mail that is sent to an email address is viewed in Google Apps AND left on the server for Cpanel Horde/etc to receive.

I'm attempting this because of the fact that my webhost doesn't allow connections for some reason to Google Apps via a PHP script (like setting it up would cause errors).

Can anyone help?

share|improve this question
    
To help address the issue, can you say why do you need two copies of every message? –  danlefree Dec 27 '11 at 0:07
    
Certainly. I was planning on using the program OSTicket to handle Support Tickets for my site. However, after some fiddling, I found that I can pipe mail through the program and have it import that way, thus making accounts not needed. Now comes the new problem. If I set up the pipes, I can't use Google Mail for other accounts. If I use Google Mail, I can't use the pipes. –  Paul Williams Dec 27 '11 at 3:37
    
Updated accepted answer (sorry, overlooked potential for OSTicket outgoing messages to be picked up as spam if not from smtp.google.com) –  danlefree Dec 28 '11 at 2:32
    
Your modified answer regarding the sub-domains is still valid. I did several test runs of it today and didn't have any problems using Google Apps mail to forward the message down for importing to the subdomains. Even still works that I send the messages FROM the non-subdomain address and they're accepted into OSTicket. –  Paul Williams Dec 30 '11 at 1:35

1 Answer 1

up vote 1 down vote accepted

Google Apps includes a variety of ways to divert mail to multiple inboxes, however, there is not (to the best of my knowledge) any reliable way to send and receive e-mail through Google Apps while sending and receiving e-mail through a cPanel server under the same domain. The following solution allows you to make full use of Google Apps' excellent spam filtering and overall uptime while maintaining an accountability trail for incoming messages intended for OSTicket.

  1. Use Google Apps to host mail under your primary domain; use cPanel to host mail under a subdomain (i.e. support.domain.com) and create an e-mail user osticket@support.domain.com on that subdomain

  2. Create a Google Apps user account for the alias you will use (support@domain.com) to forward mail Create a Google Apps user account (no-reply@domain.com) to act as a catch-all for your domain - the advantage of using no-reply@domain.com over support@domain.com will become apparent when you find a need to add other aliases

  3. In the account, create a filter to forward (and mark as read) messages addressed To: support@domain.com to the osticket@support.domain.com address

  4. Configure your application (i.e. OSTicket) to route outgoing mail with the Google Apps SMTP settings to send messages as support@domain.com

share|improve this answer
    
I like this and I pretty much figured out how I'm gonna use it with the multiple emails thanks. –  Paul Williams Dec 28 '11 at 4:52
    
Ahh I see what you just did as I refreshed the page Dan, problem is the webhost I'm at won't let me use GMail to send the mail AS Gmail. (It won't let me connect via SSL for some reason which is what you need to connect to Gmail with). –  Paul Williams Dec 28 '11 at 4:54
    
There remains the option of using the osticket@support.domain.com subdomain address directly (no saved copies at Google but would solve messages being flagged as spam), however, unless you're locked in to your hosting provider, it may be more economical to find a host that supports outgoing SMTP over SSL - many of the larger cPanel hosting providers could accommodate this configuration. –  danlefree Dec 28 '11 at 6:06
    
I'm semi-somehwat locked into my host for the most part. I'm open for possibly moving if it fits. Already fell into one trap of a host that weird restrictions on MySQL operations. It wasn't pretty. –  Paul Williams Dec 28 '11 at 6:18

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.