3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

'postmap /etc/postfix/sasl_passwd'したとき'postmap: fatal: parameter inet_interfaces: no local interface found for ::1'となったら

Posted at

Dockerでpostfixいれて、mailtrapでメールを受けたいとき、
mailtrap曰く/etc/postfix/sasl_passwdを書かなきゃいけないんですが

そのとおりにやってると

postmap /etc/postfix/sasl_passwd                                                                                                                                  > [21/25] RUN postmap /etc/postfix/sasl_passwd:
#26 0.399 postmap: fatal: parameter inet_interfaces: no local interface found for ::1

とだめだよって・・

ぐぐるとipv6が使えないの/etc/hostsにあるから・・ということらしいので
じゃあその記述を抜いた/etc/hostsをDockerfileでCOPYしようとしたら
今度は

 => ERROR [20/25] RUN grep -v '::1' /etc/hosts > /etc/hosts                                                                                                                            0.3s
------
 > [20/25] RUN grep -v '::1' /etc/hosts > /etc/hosts:
#24 0.292 /bin/sh: /etc/hosts: Read-only file system

とhostsファイルをイジんじゃねぇとのこと・・

\(^o^)/

ipv6使うつもりないからなぁ・・と見てたら

/etc/postfix/main.cf
# Enable IPv4, and IPv6 if supported
inet_protocols = ALL

という記述を見つけたので

/etc/postfix/main.cf
# Enable IPv4, and IPv6 if supported
inet_protocols = ipv4

としたらpostmap /etc/postfix/sasl_passwdは無事通りました!

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?