Sendmail server connection refused via public IP

I’ve had to replace my CentOS 7 server with an AlmaLinux 9. I run my own sendmail service which has been working for many years. Now, I’m not receiving e-mail messages from most outside senders. Strangely, I’m able to get an e-mail from my gmail account via the google e-mail page. I’m not sure why that’s happening, but it may not be related.

Should I be able to connect to my sendmail server via port 25?
I see that sendmail is listening on that port and I can connect to it via telnet on localhost:

telnet localhost 25

lsof -i :25 gives:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sendmail 3225 root 4u IPv4 24109 0t0 TCP localhost:smtp (LISTEN)

But if I try telnet with my public IP, it gets connection refused:

telnet 65.78.188.61 25

It doesn’t appear to be my firewall (iptables-based) as I’ve stopped the firewall and still cannot telnet to that port.

I used Network Tools: DNS,IP,Email with the TestEmailServer option and it shows the following error:

Connecting to 65.78.188.61
5/5/2024 9:11:24 AM Connection attempt #1 - Unable to connect after 15 seconds. [15.02 sec]

This sendmail configuration has been working for a long time and I can’t see what’s wrong with it now. Can anyone familiar with this please offer some guidance? I’ll share what information you need.

I see what I did. Due to a different problem (sending e-mail to my local user from a system script) I changed:

DAEMON_OPTIONS(`Port=smtp, Name=MTA’)dnl

to

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA’)dnl

I thought that would allow connections from both internal and external.

Once I set it back to the original setting, the server is once again accepting connections from outside.

Also, the Test Email Server test at Network Tools: DNS,IP,Email shows the server as okay.

I’m going to consider this issue resolved. If the other problem comes back (unable to send mail to local user from within the system), I troubleshoot that (more carefully!)

Thanks for reading.