We have a problem with sendmail relaying to the wrong host. Some how it is relaying to "gateway.domain.com" instead of "mail.domain.com"
The smart host is "mail.domain.com" there is no mention of gateway. The only thing I can think of is that gateway.domain.com is the MX record for mail.domain.com
This works fine obviously for mail going to our domain from this server, but it tries to relay all mail - even to other domains - to gateway.domain.com.
Any suggestions on where to start looking? I am completely lost. Let me know if you need more info. Two typical log entries are below. One to our domain and one to another domain. Obviously the second one to the other domain is rejected by our gateway server as an invalid domain.
Jul 6 14:38:06 quark sendmail: n66FKT1Q005730: to=<email@example.com>, ctladdr=<firstname.lastname@example.org> (0/0), delay=04:16:57, xdelay=00:00:00, mailer=relay, pri=1020500, relay=gateway.domain.com. [220.127.116.11], dsn=2.0.0, stat=Sent (Ok: queued as 40C9914A9C5D)
Jul 6 14:38:06 quark sendmail: n66FF71Q005698: to=<email@example.com>, ctladdr=<firstname.lastname@example.org> (0/0), delay=04:22:19, xdelay=00:00:00, mailer=relay, pri=1020500, relay=gateway.ebby.com. [18.104.22.168], dsn=5.1.1, stat=User unknown