新しいサーバに正常起動しているPostfixのmain.cfを移植してきたがPostfixが起動しない・・・
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@HYPERION postfix]# systemctl status postfix.service ● postfix.service - Postfix Mail Transport Agent Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since 日 2018-10-07 18:12:46 JST; 6min ago Process: 13021 ExecStop=/usr/sbin/postfix stop (code=exited, status=1/FAILURE) Process: 13057 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE) Process: 13055 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS) Process: 13052 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=75) Main PID: 12430 (code=killed, signal=TERM) 10月 07 18:12:44 HYPERION systemd[1]: Starting Postfix Mail Transport Agent... 10月 07 18:12:44 HYPERION aliasesdb[13052]: /usr/sbin/postconf: fatal: parameter inet_interfaces: no local interface found for ::1 10月 07 18:12:45 HYPERION aliasesdb[13052]: newaliases: fatal: parameter inet_interfaces: no local interface found for ::1 10月 07 18:12:45 HYPERION postfix[13057]: fatal: parameter inet_interfaces: no local interface found for ::1 10月 07 18:12:46 HYPERION systemd[1]: postfix.service: control process exited, code=exited status=1 10月 07 18:12:46 HYPERION systemd[1]: Failed to start Postfix Mail Transport Agent. 10月 07 18:12:46 HYPERION systemd[1]: Unit postfix.service entered failed state. 10月 07 18:12:46 HYPERION systemd[1]: postfix.service failed. [root@HYPERION postfix]# |
interfaceにまつわる設定が怪しいらしい
1 2 |
[root@HYPERION postfix]# cat /etc/postfix/main.cf | grep ^inet_interfaces inet_interfaces = localhost |
localhostなので、hostsを見てみる。
1 2 3 |
[root@HYPERION postfix]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 |
そういえばこいつはipv6を無効にしていたんだっけか
1 2 |
[root@HYPERION postfix]# sysctl -p | grep ipv6 net.ipv6.conf.all.disable_ipv6 = 1 |
hostsのipv6の行をコメントアウトしてみる。
1 2 3 |
[root@HYPERION postfix]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 #::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 |
無事起動した!
1 2 3 4 |
[root@HYPERION postfix]# systemctl restart postfix [root@HYPERION postfix]# echo $? 0 [root@HYPERION postfix]# |