Why sendmail is accepting mails for hostname not present in local-host-names file?

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 [email protected], sendmail is accepting mails for it. otherhost.mydomain.com resolves to one of the private IP address. What could be the reason?


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.