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.

Redirecting mail from remote domain

Discussion in 'E-mail Discussions' started by deadlock, Jun 7, 2006.

  1. deadlock

    deadlock Well-Known Member

    Joined:
    May 12, 2002
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    A client of mine wants me to handle his mail. His hosting service has set up the MX record on remotedomain.com to point to mydomain.com but my server is rejecting the mail. I have tested his local mailbox on my server blue@mydomain.com and it delivers fine, but blue@remotedomain.com is rejected. I've tried the following:

    1. Put remotedomain.com in /etc/localdomains
    Result: rejected with 'unrouteable address'

    2. Put remotedomain.com in /etc/remotedomains
    Result: rejected with 'lowest numbered MX record points to local host'

    Do I need to add a CNAME record for remotedomain.com to the zone file for mydomain.com? Or perhaps add a rule to exim.conf?

    Any help appreciated!
     
  2. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator

    I have played around with this some. It would seem to me (Although I am no expert) you would need to just go to the DNS part in WHM and add a DNS zone for the remotedomain with the mail part pointing to your own server.

    Good luck
     
  3. deadlock

    deadlock Well-Known Member

    Joined:
    May 12, 2002
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for trying, I did what you suggested and I now have a zone file for remotedomain.com with these lines in it:

    remotedomain.com. 14400 IN MX 0 localdomain.com.

    mail 14400 IN CNAME localdomain.com.


    ... and I now have a new reject message:

    [incoming mail server IP] is currently not permitted to relay through this server. Perhaps you have not logged into the pop/imap server in the last 30 minutes or do not have SMTP Authentication turned on in your email client.

    This is with remotedomain.com in /etc/remotedomains

    I tried putting remotedomain.com in /etc/localdomains to try and fool it into allowing the relay, but then I get back to the 'unrouteable address' bounce.
     
  4. bmcgrail

    bmcgrail Well-Known Member

    Joined:
    Dec 8, 2003
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    A DNS Zone won't help.

    The problem is there are no user accounts associated with remotedomain on your box. Once the mail gets to your box it can't find an account.

    You could

    Park remotedomain on top of yourdomain.

    or

    Create account for remotedomain and setup mail forward from user@remotedomain to user@yourdomain.

    After that you might want to delete the DNS zone or change it to be a secondary in named.conf so that it's in sync with the real DNS information.

    When all is said and done remotedomain.com should be in /etc/localdomains
     
  5. deadlock

    deadlock Well-Known Member

    Joined:
    May 12, 2002
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Thanks, parking worked, the mail is now being delivered but unfortunately it's all going to the main default mailbox for localdomain.com instead of the individual mailboxes (despite having the default address set as :fail:). I guess I could set up a rule in /etc/vfilters/remotedomain.com but is there a simpler way to have user@remotedomain.com save to user@localdomain.com globally so that my client can add/remove mailboxes without the need for configuration changes?
     
    #5 deadlock, Jun 7, 2006
    Last edited: Jun 7, 2006
Loading...

Share This Page