2

I have following line in my cf file

Fw/etc/mail/local-host-names

and following lines in local-host-names file

mydomain.com
hostname.mydomain.com

but when I send mail to mailaddress@otherhost.mydomain.com, sendmail is accepting mails for it. otherhost.mydomain.com resolves to one of the private IP address. What could be the reason?

adamo
  • 6,867
  • 3
  • 29
  • 58
Sachin Divekar
  • 2,445
  • 2
  • 20
  • 23

1 Answers1

4

In your prompt type:

$ sendmail -bt
> $=w

$=w is a class that contains all the names sendmail considers local. These include those listed in /etc/mail/local-host-names and those in /etc/hosts that sendmail considers local after examining the machine's network interfaces.

adamo
  • 6,867
  • 3
  • 29
  • 58
  • thanks a lot. sendmail is considering `otherhost.mydomain.com` as local after observing network interface. It is a PTR record for IP addresses on one of the ethernet interfaces. – Sachin Divekar Apr 03 '13 at 08:36
  • 1
    There is an option to turn off "auto detection/adding" local email domains (DontProbeInterfaces). – AnFi Apr 03 '13 at 09:32
  • @AndrzejA.Filip thanks a lot for your suggestion. Yes, I verified `DontProbeInterfaces` is False in my case. – Sachin Divekar Apr 03 '13 at 09:51
  • Is otherhost.mydomain.com a CNAME DNS record? YES => sendmail rewrites CNAMEs (DNS aliases) to "true names". – AnFi Apr 03 '13 at 09:55