因此,由于不同的问题,我多次重新安装了 postfix。结果发现它启动正常,并且似乎在端口 25 上运行良好:
我制作 netstat -nltp | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 18383/master
tcp6 1 0 ::1:25 :::* LISTEN 18383/master
然后 nc -v -C localhost 25 我得到
Ncat: Version 7.40 ( https://nmap.org/ncat )
Ncat: Connected to ::1:25.
我觉得这不行,因为应该会出现一些关于 postfix 的信息。不管怎样,我输入了“EHLO something”,但没有返回任何消息。
好的,这是我的邮件日志
Sep 17 10:18:24 localhost postfix/smtpd[3238]: fatal: open lock file pid/inet.smtp: cannot open file: Permission denied
Sep 17 10:18:25 localhost postfix/master[2477]: warning: process /usr/libexec/postfix/smtpd pid 3238 exit status 1
Sep 17 10:18:25 localhost postfix/master[2477]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Sep 17 10:18:53 localhost postfix/postfix-script[3264]: stopping the Postfix mail system
Sep 17 10:18:53 localhost postfix/master[2477]: terminating on signal 15
Sep 17 10:18:57 localhost postfix/postfix-script[3346]: starting the Postfix mail system
Sep 17 10:18:57 localhost postfix/master[3348]: daemon started -- version 3.2.5, configuration /etc/postfix
Sep 17 10:19:04 localhost postfix/smtpd[3360]: fatal: open lock file pid/inet.smtp: cannot open file: Permission denied
Sep 17 10:19:05 localhost postfix/master[3348]: warning: process /usr/libexec/postfix/smtpd pid 3360 exit status 1
Sep 17 10:19:05 localhost postfix/master[3348]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
答案1
好的,我最终用很简单的方法修复了它:
只需运行以下命令:
setenforce 0