Re: sendmail error, "MX list for mydomain.com points back to server.mydomain.com"

From: Dan Mahoney (Ports) <freebsd_at_gushi.org>
Date: Thu, 18 May 2023 04:38:51 UTC
What you were saying about your ISP having bogus entries is quite possibly at least part of the problem.

Sendmail uses real DNS and ignores /etc/hosts (because it needs to look up MX records, there are no MX records in /etc/hosts).  If you *really* want to cheat that, you can run BIND on localhost and put a zone for your own domain answering on localhost, and put 127.0.0.1 in /etc/resolv.conf.  

What is the hostname of your system?

Can you post your full freebsd.mc?

Have you rebuilt your sendmail.cf recently?

-Dan


> On May 18, 2023, at 12:19 AM, vagabond <vagabond@blackfoot.net> wrote:
> 
>> What do you have in /etc/mail/local-host-names?
>  ns.dreamchaser.org
> it did have
>  ns.dreamchaser.org
>  ns.discoveriesinwood.com
> 
>> Are you using the stock freebsd.mc or sendmail.mc or whatever came with the system?
> 
> mc file was originally derived from freebsd.mc from 10.x adapted to 11.3 to 12.3 to 12.4 over the course of upgrades.
> It has:
>  define(`confCW_FILE', `-o /etc/mail/local-host-names')
> 
>> All variants of domains you accept mail for should be in /etc/mail/local-host-names, and if you want to map separately for each domain, you need to set up a virtusertable.
> 
> don't need to map separately.
> 
> Originally I accepted 2 domains, but to get it running I'm willing to change that to only 1,
> dreamchaser.org
> I just got rid of the other entry in local-host-names and bounced sendmail;
> the error persists.
> Any other places I could be messed up?
> 
> Thanks,
> 
> Gary