Redirecting mail from remote domain

deadlock

Well-Known Member
May 12, 2002
58
0
306
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 [email protected] and it delivers fine, but [email protected] 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!
 

rhenderson

Well-Known Member
Apr 21, 2005
785
1
166
Oklahoma
cPanel Access Level
Root Administrator
deadlock said:
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 [email protected] and it delivers fine, but [email protected] 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!

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
 

deadlock

Well-Known Member
May 12, 2002
58
0
306
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.
 

bmcgrail

Well-Known Member
Dec 8, 2003
83
0
156
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 [email protected] to [email protected]

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
 

deadlock

Well-Known Member
May 12, 2002
58
0
306
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 [email protected] save to [email protected] globally so that my client can add/remove mailboxes without the need for configuration changes?
 
Last edited: