原作链接:
http://www.koukousky.com/server/1857.html
yum安装postfix
yum -y install postfix
保错信息如下:
(cmdb) [root@node1 ~]# systemctl start postfix
Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.
(cmdb) [root@node1 ~]# journalctl -xe
Jan 21 16:30:01 node1.cn systemd[1]: Starting Session 764 of user root.
-- Subject: Unit session-764.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

▽ Unit session-764.scope has begun starting up.
Jan 21 16:30:01 node1.cn CROND[5943]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jan 21 16:30:21 node1.cn polkitd[450]: Registered Authentication Agent for unix-process:5950:36693241 (system bus name :1.1600 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org
Jan 21 16:30:21 node1.cn systemd[1]: Reloading.
Jan 21 16:30:21 node1.cn systemd[1]: Configuration file /usr/lib/systemd/system/eni.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs witho
Jan 21 16:30:21 node1.cn polkitd[450]: Unregistered Authentication Agent for unix-process:5950:36693241 (system bus name :1.1600, object path /org/freedesktop/PolicyKit1/AuthenticationAgent,
Jan 21 16:30:28 node1.cn polkitd[450]: Registered Authentication Agent for unix-process:5967:36693923 (system bus name :1.1601 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org
Jan 21 16:30:28 node1.cn systemd[1]: Starting Postfix Mail Transport Agent...
-- Subject: Unit postfix.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postfix.service has begun starting up.
Jan 21 16:30:28 node1.cn aliasesdb[5973]: /usr/sbin/postconf: fatal: parameter inet_interfaces: no local interface found for ::1
Jan 21 16:30:29 node1.cn postfix/sendmail[5975]: fatal: parameter inet_interfaces: no local interface found for ::1
Jan 21 16:30:29 node1.cn aliasesdb[5973]: newaliases: fatal: parameter inet_interfaces: no local interface found for ::1
Jan 21 16:30:29 node1.cn postfix[5978]: fatal: parameter inet_interfaces: no local interface found for ::1
Jan 21 16:30:30 node1.cn systemd[1]: postfix.service: control process exited, code=exited status=1
Jan 21 16:30:30 node1.cn systemd[1]: Failed to start Postfix Mail Transport Agent.
-- Subject: Unit postfix.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

解决方法:
修改 /etc/postfix/main.cf的设置
inet_protocols = ipv4
inet_interfaces = all
重新启动postfix即可
systemctl start postfix.service