株式会社ヴァンデミックシステム

Blog

<スポンサーリンク>

新しいサーバに正常起動しているPostfixのmain.cfを移植してきたがPostfixが起動しない・・・

[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にまつわる設定が怪しいらしい

[root@HYPERION postfix]# cat /etc/postfix/main.cf  | grep ^inet_interfaces
inet_interfaces = localhost

localhostなので、hostsを見てみる。

[root@HYPERION postfix]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

そういえばこいつはipv6を無効にしていたんだっけか

[root@HYPERION postfix]# sysctl -p | grep ipv6
net.ipv6.conf.all.disable_ipv6 = 1

hostsのipv6の行をコメントアウトしてみる。

[root@HYPERION postfix]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
#::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

無事起動した!

[root@HYPERION postfix]# systemctl restart postfix
[root@HYPERION postfix]# echo $?
0
[root@HYPERION postfix]#

<スポンサーリンク>

コメントを残す

Allowed tags:  you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>
Please note:  all comments go through moderation.

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)