0

We have the following setup:

  • One web-server on Debian with PHP on the main domain, that can send emails, but must not receive. It has exim4 installed. Let's call it example.com
  • One mail server on a different machine, that is used for both sending and receiving emails. This one would be mail.example.com.

I am only in charge of the first server, which was migrated. The second one is shared with other domains working fine. The problem is I can't make it send emails to the second one. When a user from a different domain uses the password reset option on our site, the new password is sent successfully to them, but when a user@example.com tries it, then the first server tries to deliver the mail locally. I tried setting it to relay to mail.example.com, but then it tries to send every single email through it, whether they belong there or not. I've exhausted the options given when I try dpkg-reconfigure exim4-config that I could think of. Most of them I don't understand, because half the time these unix people name things the exact opposite of what they mean.

coladict
  • 219

2 Answers2

1

Sending mail via a smarthost is a standard exim4 configuration. This meets the criteria you specify above.

Run dpkg-reconfigure exim4-config. Select the option mail sent by smarthost; no local mail. Then configure the second host as the smarthost.

BillThor
  • 28,293
  • 3
  • 39
  • 70
0

Give the host a proper fully qualified domain name. This is one of the many problems that occur when you name a host with the naked domain name.

Michael Hampton
  • 252,907