Specify *both* IP interfaces in *.mc file you use to generate sendmail.cf
and recompile it.
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA-local')dnl
and recompile it.
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA-local')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=192.168.1.100, Name=MTA-public')dnl
找到某博主文章结尾有这句,翻译后操作,成功修复错误。
在sendmail.mc文件中的DAEMON_OPTIONS行,将Addr为127.0.0.1的Name改为MTA-local(默认是MTA),
新增同样一行,将Addr改为你的邮箱地址,Name设置为MTA-public(默认是MTA)。
最后,重编译sendmail.mc文件到sendmail.cf文件,
即用m4命令:
m4 sendmail.mc>sendmail.cf
重新启动sendmail服务
systemctl restart sendmail.service