宝塔邮局管理器Postfix无法启动解决办法
1.查看日志
Mar 2 09:55:58 localhost postfix/postfix-script[11530]: starting the Postfix mail system
Mar 2 09:55:58 localhost postfix/master[11532]: fatal: bind 0.0.0.0 port 25: Address already in use
Mar 2 09:55:59 localhost postfix/master[11531]: fatal: daemon initialization failure
Mar 2 09:56:00 localhost postfix/postfix-script[11533]: fatal: mail system startup failed
显示25
端口被占用
2.查找被占用的端口
netstat -tln 查看端口的使用情况
root@localhost:~# netstat -tln | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
3.查看端口被哪个进程占用
root@localhost:~# lsof -i:25
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sendmail- 1067 root 4u IPv4 19186 0t0 TCP localhost:smtp (LISTEN)
4.杀掉占用25
端口的进程
kill -9 进程id
root@localhost:~# kill -9 1067
启动Postfix
成功,正常收发邮件