postfix 启动报错

简介: 今天在启动postfix的时候,查看centos中的postfix日志 more /var/log/maillog,出现了如下报错,Apr 28 09:04:44 PaulV1 aliasesdb[23836]: /usr/sbin/postconf: fatal: paramet...

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

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

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

将配置为:

inet_interfaces = localhost
inet_protocols = all

改成了:

inet_interfaces = all
inet_protocols = all

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

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

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

chown -R postfix /var/spool/postfix/

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

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

所以

chown -R postfix /var/lib/postfix/

最后。才启动成功了。

[root@V1 ~]# systemctl status postfix -l       
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2018-04-28 09:24:31 CST; 1min 40s ago
  Process: 24175 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
  Process: 24172 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 24169 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
 Main PID: 24250 (master)
    Tasks: 3
   Memory: 3.6M
   CGroup: /system.slice/postfix.service
           ├─24250 /usr/libexec/postfix/master -w
           ├─24251 pickup -l -t unix -u
           └─24252 qmgr -l -t unix -u

Apr 28 09:24:31 PaulV1 systemd[1]: Starting Postfix Mail Transport Agent...
Apr 28 09:24:31 PaulV1 postfix/postfix-script[24239]: warning: not owned by group postdrop: /var/spool/postfix/public
Apr 28 09:24:31 PaulV1 postfix/postfix-script[24240]: warning: not owned by group postdrop: /var/spool/postfix/maildrop
Apr 28 09:24:31 PaulV1 postfix/postfix-script[24248]: starting the Postfix mail system
Apr 28 09:24:31 PaulV1 postfix/master[24250]: daemon started -- version 2.10.1, configuration /etc/postfix
Apr 28 09:24:31 PaulV1 systemd[1]: Started Postfix Mail Transport Agent.

参考资料:

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

  2. 邮件服务器启动postfix时的问题
目录
相关文章
|
网络协议 Linux 文件存储
Postfix 邮件服务器的配置
Postfix是一种功能强大且功能多样的邮件传输代理。在本文中,我们已经了解了如何使用postfix 和 dovecot为基于系统用户帐户的单个域实现基本电子邮件服务器。我们几乎没有涉及基于 postfix 的系统的真正功能,但希望能为新用户构建提供坚实的工作基础。
1689 0
|
存储 网络协议 Linux
Postfix + Extmail 企业邮件服务器搭建
ExtMail套件用于提供从浏览器中登录、使用邮件系统的Web操作界面,而Extman套件用于提供从浏览器中管理邮件系统的Web操作界面。它以GPL版权释出,设计初衷是希望设计一个适应当前高速发展的IT应用环境,满足用户多变的需求,能快速进行开发、改进和升级,适应能力强的webmail系统。
723 0
Postfix + Extmail 企业邮件服务器搭建
|
网络协议 Linux 网络安全
Linux服务器---邮件服务安装postfix
安装postfix      postfix是一个快速、易于管理、安全性高的邮件发送服务,可以配合dovecot实现一个完美的邮箱服务器。1、安装postfix       [root@localhost ~]# rpm -qa | grep postfix      [root@localhos...
2364 0
|
开发工具 网络安全 数据安全/隐私保护
Postfix 邮件服务器安装与配置
#!/bin/bash yum -y install postfix dovecot; #/etc/postfix/main.cf #postfix check  postfix start  postfix stop postfix flush  postfixreload #/etc/postfix/main.
1291 0
|
网络协议 测试技术 开发工具
|
网络协议 测试技术 数据安全/隐私保护
|
测试技术 开发工具 数据安全/隐私保护
|
网络协议 安全 关系型数据库
|
Linux 开发工具 数据安全/隐私保护