Why sendmail is accepting mails for hostname not present in local-host-names file?
6,535
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.
Related videos on Youtube
Author by
Sachin Divekar
Updated on September 18, 2022Comments
-
Sachin Divekar almost 2 years
I have following line in my
cf
fileFw/etc/mail/local-host-names
and following lines in
local-host-names
filemydomain.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?-
David Schwartz over 11 yearsWhat do you mean by "is accepting"? Do you mean it's delivering the mails locally?
-
Sachin Divekar over 11 yearsNo if I try to send mail by accessing SMTP using telnet, for rcpt to it says recipient ok. It should say user unknown right?
-
-
Sachin Divekar over 11 yearsthanks 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. -
AnFi over 11 yearsThere is an option to turn off "auto detection/adding" local email domains (DontProbeInterfaces).
-
Sachin Divekar over 11 years@AndrzejA.Filip thanks a lot for your suggestion. Yes, I verified
DontProbeInterfaces
is False in my case. -
AnFi over 11 yearsIs otherhost.mydomain.com a CNAME DNS record? YES => sendmail rewrites CNAMEs (DNS aliases) to "true names".