SendMail: Connection refused by [127.0.0.1]
Solution 1:
Sendmail passes messages submitted by "send via command line sendmail" to local sendmail daemon listening at 127.0.0.1:25.
It seems that you sendmail listens only on IPv4 192.168.0.1:25 (local network?) and IPv6 ::1:25 (any). Most likely you wanted to accept incoming TCP connections only from local network.
Fix DAEMON_OPTIONS
in your sendmail.mc
file. Add listening on 127.0.0.1 or use listening on IPv4 "any".
In your sendmail.mc
add the second DAEMON_OPTIONS listed below.
Recompile sendmail.mc
into sendmail.cf
and restart (or HUP) sendmail daemon.
DAEMON_OPTIONS(`Port=smtp, Addr=192.168.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=MTA-loopback')dnl