postfix 如何启动、关闭、重新加载配置文件

postfix 执行启动或者关闭的时候,最好先检查一下,当前的状态。然后再进行进一步的操作。

检查 postfix 的运行状态

/etc/init.d/postfix status
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/lib/systemd/system/postfix.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sun 2021-12-26 02:00:24 HKT; 1 months 2 days ago
 Main PID: 1181 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailabl

postfix 启动

/etc/init.d/postfix start
[ ok ] Starting postfix (via systemctl): postfix.service.

检查25端

 ss -lnpt | grep ":25"
LISTEN    0         100                0.0.0.0:25               0.0.0.0:*        users:(("master",pid=26046,fd=13))
LISTEN    0         100                   [::]:25                  [::]:*        users:(("master",pid=26046,fd=14))

postfix 关闭

/etc/init.d/postfix stop
[ ok ] Stopping postfix (via systemctl): postfix.service.

postfix 重新加载配置文件

执行重新加载配置文件的是,postfix 应该处于正常运行的状态。

/etc/init.d/postfix reload
[ ok ] Reloading postfix configuration (via systemctl): postfix.service.

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注