0

I have a main server where are placed the DNS records for a domain (eg: example.com), but this domain has another server only for webmail. The DNS setup is working fine: I can access example.com through the browser and the webmail can send/receive emails (from webmail.example.com - A/MX DNS records are ok).

The problem is that on example.com there's a page where I send emails to contact@example.com and this is not being delivered - it works with anything else (Gmail, Hotmail etc).

I've tried some different things I found on Google/StackOverflow to fix it but without success.

exim -bt noreply@example.com (returns: router = localuser, transport = local_delivery)
exim -bt contact@example.com (returns: contact@example.com is undeliverable: Unrouteable address)

Where noreply@ was created on the main server to send the emails from that page and contact@ was created at the second server (webmail server). It looks like Exim4 is always looking for internal email addresses for this domain, even though the MX record is setup for another server.

How I could fix it? Exim4 should look for the MX record instead of trying to deliver it locally.

Thank you.

Alexandre Paiva
  • 987
  • 2
  • 10
  • 24

1 Answers1

0

you have set example.com as a local domain. don't do that except on the MX server for example.com.

Jasen
  • 11,837
  • 2
  • 30
  • 48
  • Hi Jasen, thanks for your answer. Where/how I should modify this setup? Is it on Exim config or the DNS records? – Alexandre Paiva Dec 27 '20 at 03:28
  • exim config, it might be pulling it from /etc/mailname or /etc/hostname as default behaviour in which case you'll need to override that feature in the config. – Jasen Dec 27 '20 at 05:57