Link to home
Start Free TrialLog in
Avatar of joe90kane
joe90kane

asked on

Exim allow emails to domain same as mail server.

Hi,

I have a debian etch server, its a web server and im using exim for sending emails. The problem is the domain name e.g. domain.com is on the same IP as our Exchange server.

I have an MX record that points mail.domain.com to the same IP

Sending mails to any external address is working great but sending to domain.com I get

2010-03-24 16:33:19 1NuTWB-0006RA-Nn mail.domain.com [80.80.80.80] Connection refused
2010-03-24 16:33:19 1NuTWB-0006RA-Nn == joe@domain.com R=dnslookup_relay_to_domains T=remote_smtp defer (111): Connection refused

Can I allow this relay with Exim?

Thanks, Joe
Avatar of joe90kane
joe90kane

ASKER

I have setup the A & MX record to point to the internal mail server but I am getting error

all relevant MX records point to non-existent hosts?
Avatar of noci
Toy need to edit the exim.conf

Find the line with:
domainlist local_domains                - for local deliveries
domainlist relay_to_domains          - for sending through

and add the intended domain. The lists are : (colon) separated.

Alternative it can be a lookup from a database:
domainlist relay_to_domains = lsearch;/etc/exim/mydomains

(or use LDAP , mysql etc.)
Thanks I have added the domain to those options but getting

Unrouteable address for the domain?
If you add it to local_domains the part after the @ is broken off and it is tried to use the native local delivery options (to a users .maildir or mail file)
but a user of the right name must exist in a lookup. (getuserbyname()) or if a special delivery has been configured then according to its rules.

if you added it to relay_to_domains then it needs to be able to pass it on to the next mailer.

If you added it to both it's a configuration error (how can an address be both local & remote at the same time)...
Ok I think I understand,

I added it to local_domains but How can I get the email sent through our exchange server on the same network?
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial