前提・実現したいこと
Docker側からRailsでメール送信をし、ホストのPostfixをrelayして外部SMTPサーバまで行く構成を作成しています。
が、Postfix側で止まってしまい、外部SMTPサーバまで行かない状態です。
debug_peer_level = 3にしてもこれといったログがなく手詰まりになってしまいました。
発生している問題・エラーメッセージ
postfix/smtpd[2506]: connect from unknown[172.17.0.1]
postfix/smtpd[2506]: match_hostname: unknown ~? 172.17.0.0/16
postfix/smtpd[2506]: match_hostaddr: 172.17.0.1 ~? 172.17.0.0/16
postfix/smtpd[2506]: > unknown[172.17.0.1]: 220 test.localdomain ESMTP Postfix
postfix/smtpd[2506]: watchdog_pat: 0x7f41d5a69e00
postfix/smtpd[2506]: vstream_fflush_some: fd 11 flush 36
postfix/smtpd[2506]: vstream_buf_get_ready: fd 11 got 28
postfix/smtpd[2506]: < unknown[172.17.0.1]: EHLO localhost.localdomain
postfix/smtpd[2506]: > unknown[172.17.0.1]: 250-test.localdomain
postfix/smtpd[2506]: > unknown[172.17.0.1]: 250-PIPELINING
postfix/smtpd[2506]: > unknown[172.17.0.1]: 250-SIZE 10240000
postfix/smtpd[2506]: > unknown[172.17.0.1]: 250-VRFY
postfix/smtpd[2506]: match_list_match: unknown: no match
postfix/smtpd[2506]: match_list_match: 172.17.0.1: no match
postfix/smtpd[2506]: > unknown[172.17.0.1]: 250-ETRN
postfix/smtpd[2506]: > unknown[172.17.0.1]: 250-ENHANCEDSTATUSCODES
postfix/smtpd[2506]: > unknown[172.17.0.1]: 250-8BITMIME
postfix/smtpd[2506]: > unknown[172.17.0.1]: 250 DSN
postfix/smtpd[2506]: watchdog_pat: 0x7f41d5a69e00
postfix/smtpd[2506]: vstream_fflush_some: fd 11 flush 125
postfix/smtpd[2506]: vstream_buf_get_ready: fd 11 got 6
postfix/smtpd[2506]: < unknown[172.17.0.1]: QUIT
postfix/smtpd[2506]: > unknown[172.17.0.1]: 221 2.0.0 Bye
postfix/smtpd[2506]: match_hostname: unknown ~? 172.17.0.0/16
postfix/smtpd[2506]: match_hostaddr: 172.17.0.1 ~? 172.17.0.0/16
postfix/smtpd[2506]: disconnect from unknown[172.17.0.1]
該当のソースコード
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 3
debug_peer_list = 172.17.0.1
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 172.17.0.0/16, 127.0.0.0/8, 10.21.101.0/24
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relayhost = 10.21.101.57
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination
smtpd_reject_unlisted_recipient = no
smtpd_reject_unlisted_sender = no
unknown_local_recipient_reject_code = 550
試したこと
Dockerからのwgetによる25番ポート疎通確認⇒OK
ホストサーバからのsendmailコマンドによるメール送信⇒OK
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答2件
あなたの回答
tips
プレビュー