使用mail发送邮件时候报错:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[root@hz /]# systemctl start postfix.service Job for postfix.service failed. See 'systemctl status postfix.service' and 'journalctl -xn' for details. [root@hz /]# systemctl status postfix.service postfix.service - Postfix Mail Transport Agent Loaded: loaded (/usr/lib/systemd/system/postfix.service; disabled) Active: failed (Result: exit-code) since Fri 2015-03-04 22:36:41 CST; 10s ago Process: 11445 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE) Process: 11440 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS) Process: 11437 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=75) Mar 04 22:36:39 hz.t4x.org aliasesdb[11437]: /usr/sbin/postconf: fatal: parameter inet_interfaces: no local interface found for ::1 Mar 04 22:36:40 note.t4x.org aliasesdb[11437]: newaliases: fatal: parameter inet_interfaces: no local interface found for ::1 Mar 04 22:36:40 note.t4x.org postfix/sendmail[11439]: fatal: parameter inet_interfaces: no local interface found for ::1 Mar 04 22:36:40 note.t4x.org postfix[11445]: fatal: parameter inet_interfaces: no local interface found for ::1 Mar 04 22:36:41 note.t4x.org systemd[1]: postfix.service: control process exited, code=exited status=1 Mar 04 22:36:41 note.t4x.org systemd[1]: Failed to start Postfix Mail Transport Agent. Mar 04 22:36:41 note.t4x.org systemd[1]: Unit postfix.service entered failed state. |
解决方法:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@hz /]# sed -i "s#inet_interfaces = localhost#inet_interfaces = 127.0.0.1#g" /etc/postfix/main.cf [root@hz /]# systemctl start postfix.service [root@hz /]# systemctl status postfix.service postfix.service - Postfix Mail Transport Agent Loaded: loaded (/usr/lib/systemd/system/postfix.service; disabled) Active: active (running) since Fri 2015-03-04 22:41:17 CST; 53s ago Process: 11546 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS) Process: 11543 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS) Process: 11539 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS) Main PID: 11619 (master) CGroup: /system.slice/postfix.service ├─11619 /usr/libexec/postfix/master -w ├─11620 pickup -l -t unix -u └─11621 qmgr -l -t unix -u Mar 04 22:41:16 note.t4x.org systemd[1]: Starting Postfix Mail Transport Agent... Mar 04 22:41:17 note.t4x.org postfix/postfix-script[11617]: starting the Postfix mail system Mar 04 22:41:17 note.t4x.org postfix/master[11619]: daemon started -- version 2.10.1, configuration /etc/postfix Mar 04 22:41:17 note.t4x.org systemd[1]: Started Postfix Mail Transport Agent. |
其他参考文档:
1:https://note.t4x.org/error/configuring-for-ipv4-support-only/
2:https://note.t4x.org/system/config-msmtp-mutt/SourceByrd's Weblog-https://note.t4x.org/error/no-local-interface-found/
SourceByrd's Weblog-https://note.t4x.org/error/no-local-interface-found/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!