postfix 启动报错

前端之家收集整理的这篇文章主要介绍了postfix 启动报错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

今天在启动postfix的时候,查看centos中的postfix日志 more /var/log/maillog,出现了如下报错,

  1. Apr 28 09:04:44 PaulV1 aliasesdb[23836]: /usr/sbin/postconf: fatal: parameter inet_interfaces: no local interface found for ::1
  2. Apr 28 09:04:45 PaulV1 aliasesdb[23836]: newaliases: fatal: parameter inet_interfaces: no local interface found for ::1
  3. Apr 28 09:04:45 PaulV1 postfix[23844]: fatal: parameter inet_interfaces: no local interface found for ::1

后来查看了下配置文件 vi /etc/postfix/main.cf

将配置为:

  1. inet_interfaces = localhost
  2. inet_protocols = all

改成了:

  1. inet_interfaces = all
  2. inet_protocols = all

接着重新启动,又出现了如下信息

  1. Apr 28 09:09:08 PaulV1 postfix[23919]: postsuper: fatal: scan_dir_push: open directory defer: Permission denied
  2. Apr 28 09:09:08 PaulV1 postfix/postsuper[23952]: fatal: scan_dir_push: open directory defer: Permission denied
  3. Apr 28 09:09:10 PaulV1 postfix/postfix-script[23953]: fatal: Postfix integrity check Failed!

这是因为启动时邮件服务对系统目录没有权限导致的,我们更改相关目录的所有者,然后重新启动

  1. chown -R postfix /var/spool/postfix/

但是。启动的时候显示还有一个目录没有权限。

  1. Apr 28 09:21:57 PaulV1 postfix/master[24146]: fatal: open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied
  2. Apr 28 09:21:58 PaulV1 postfix/master[24145]: fatal: daemon initialization failure
  3. Apr 28 09:21:59 PaulV1 postfix/postfix-script[24147]: fatal: mail system startup Failed

所以

  1. chown -R postfix /var/lib/postfix/

最后。才启动成功了。

  1. [root@V1 ~]# systemctl status postfix -l
  2. postfix.service - Postfix Mail Transport Agent
  3. Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
  4. Active: active (running) since Sat 2018-04-28 09:24:31 CST; 1min 40s ago
  5. Process: 24175 ExecStart=/usr/sbin/postfix start (code=exited,status=0/SUCCESS)
  6. Process: 24172 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited,status=0/SUCCESS)
  7. Process: 24169 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited,status=0/SUCCESS)
  8. Main PID: 24250 (master)
  9. Tasks: 3
  10. Memory: 3.6M
  11. CGroup: /system.slice/postfix.service
  12. ├─24250 /usr/libexec/postfix/master -w
  13. ├─24251 pickup -l -t unix -u
  14. └─24252 qmgr -l -t unix -u
  15.  
  16. Apr 28 09:24:31 PaulV1 systemd[1]: Starting Postfix Mail Transport Agent...
  17. Apr 28 09:24:31 PaulV1 postfix/postfix-script[24239]: warning: not owned by group postdrop: /var/spool/postfix/public
  18. Apr 28 09:24:31 PaulV1 postfix/postfix-script[24240]: warning: not owned by group postdrop: /var/spool/postfix/maildrop
  19. Apr 28 09:24:31 PaulV1 postfix/postfix-script[24248]: starting the Postfix mail system
  20. Apr 28 09:24:31 PaulV1 postfix/master[24250]: daemon started -- version 2.10.1,configuration /etc/postfix
  21. Apr 28 09:24:31 PaulV1 systemd[1]: Started Postfix Mail Transport Agent.

参考资料:

  1. 解决没有本地接口发现

  2. 邮件服务器启动postfix时的问题

猜你在找的CentOS相关文章