The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dual Email Delivery - Not possible it would seem...

Discussion in 'E-mail Discussions' started by SNET1, Jan 30, 2011.

  1. SNET1

    SNET1 Member

    Joined:
    Sep 5, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Hello guys, I'm in need of a little help after 8 hours of seemingly getting no closer to a solution :(

    I have Google Apps > my domain mx records are all set to google apps. Google apps has a forwarder for any email address not hosted with google apps to be forward to the cpanel servers IP address. All emails sent to google apps work perfectly, its emails that are forwarded to the cpanel server that are having issues...

    The only way (seemingly... I could have missed something) to receive mail is to set cPanel to 'local mail exchanger', if cPanel is not set to that (backup or remote) then no emails get though to the server. The problem is, scripts on the server then fail to send any email to the email addresses @googleapps (we have a ticket script that should alert staff when a new ticket is created) also any cPanel messages that should be sent to root (new accounts etc...), have a forwarder to the @gmailaddress, they also fail to be sent.

    If I set the cPanel setting to 'Remote Mail Exchanger' then scripts on the server can send email, but the server cannot receive email; emails sent to addresses @cpanelserver bounce back with:
    Just to sum up what I'm aiming for: staff members all have staff.name@googleapps addresses, generic addresses such as sales@mydomain should go to the cPanel server for processing by our ticket system, staff would then receive an email from our script alerting them to the new ticket.

    It would appear that the server can receive mail perfectly fine, but seems to be unable to send mail externally @thesamedomain - the server can send mail externally to addresses not @mydomain.

    Any suggestions guys :confused:
     
    #1 SNET1, Jan 30, 2011
    Last edited: Jan 30, 2011
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If google apps is handling that domain's MX records, then you should setup a subdomain on the domain for the ones for the ticket system. You could then setup a different MX record for that subdomain, something like support.mydomain.com or tickets.mydomain.com instead.

    The method you are trying to use is not going to work easily when google apps is handling the MX records for the domain itself. You'd end up having to use some sort of filtering or routing to get it to work that way, and you cannot even easily filter in google apps since you do not have the full fledged filtering or routing capacities there that exim provides. The subdomain is the easier way to get this working.
     
  3. SNET1

    SNET1 Member

    Joined:
    Sep 5, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Hi Tristan, I was hoping you would respond :)

    Google apps seems to be filtering the email fine, if the address is @googleapps then it goes to that inbox or if the address is not at googleapps then it is sent to the cPanel server. Unless I'm missing something, it should be upto cPanel to then process... which cPanel seems to do fine, except it is unable to send emails to @googleapps users with the same domain.

    cPanel seems capable of doing this, but lacks the option to receive and send mail at the same domain, as I said it can receive when set to 'local exchanger' but only send (to @thesamedomain addresses) when set to 'remote exchanger' - is it not possible to configure something in between the two? I don't really see what Google apps has to do with this, once the email has been passed to cPanel.

    Please correct me if I'm wrong, my knowledge of how this kind of thing works is basic
     
    #3 SNET1, Jan 30, 2011
    Last edited: Jan 30, 2011
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The issue with exim in cPanel setup is that it does indeed not have the option to both remotely send and locally receive emails coming from outside for a domain when that domain has remote MX records and is listed in /etc/remotedomains. What this means is that a local user sending to an account showing remote MX records must send out to the remote MX server for that domain entirely (not individual users on the domain but the entire domain). There is no way with the MX record system to know select users that would receive emails locally, since it is by email record (MX) for the domain not by email account that the decision is made for delivery. The /etc/remotedomains file itself only takes domain names rather than email addresses.

    For it to route a domain differently, you would need to setup some type of router to determine if the email is a set address and either send it to google apps or deliver it locally. That type of router is not something I know off the top of my head, although I could research it.

    The easier method is the subdomain. You do not then have to add extra processing to exim to go through the router nor do you have to reconfigure the router for every additional email account you add later on and want to route differently. You can simply separate off the ones you want to locally send and be locally received from those that go to Google apps by having the local ones be on the subdomain and having the remote ones remain with google apps as they are currently.

    If I'm still misunderstanding the situation, I apologize, but I think using a subdomain solves the issue that is happening regardless.

    Thanks.
     
  5. SNET1

    SNET1 Member

    Joined:
    Sep 5, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Tristan, seems I will be using a subdomain for now. Perhaps I might go down the routing option if I have a spare few hours!
     
Loading...

Share This Page