前提・実現したいこと
Webサイトの問い合わせフォームから送信完了画面に到達した時点でメール送信を行う仕組みを構築しています。
Postfixを利用して送信をしようとしていますが、 うまく受信することができません。
問い合わせフォームは正しく動作している(送信完了画面まで遷移することができる)状態です。
現在のDNS設定
さくらVPSをWebサーバー、さくらのレンタルサーバーをメールサーバーにしたい
・MXレコード 10 xxx.sakura.ne.jp.(さくらレンタルサーバーの初期ドメイン)
・Aレコード xxx.xx.xxx.xxx(さくらVPSのIPアドレス)
VPSの状態
・CentOS 7
・Webサイト用のサーバーとして構築済「https://example.com/」
・ssh設定済
・Postfix、Dovecot導入済
設定ファイルの編集
vi /etc/postfix/main.cf
myhostname = mail.example.com mydomain = example.com myorigin = $mydomain inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost #inet_interfaces = localhost mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain #mynetworks = 168.100.189.0/28, 127.0.0.0/8 #mynetworks = $config_directory/mynetworks #mynetworks = hash:/etc/postfix/network_table mynetworks = 192.168.0.0/24, 127.0.0.0/8 home_mailbox = Maildir/ smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination smtpd_tls_auth_only = yes smtp_tls_protocols = !SSLv2, !SSLv3 smtpd_tls_protocols = $smtp_tls_protocols smtp_tls_mandatory_protocols = $smtp_tls_protocols smtpd_tls_mandatory_protocols = $smtp_tls_protocols
発生している問題・エラーメッセージ
上記設定でWebサイトの問い合わせフォームから送信した後のメールログです
「example@example.com」(メールフォーム側で設定している送信用アドレス)と、
フォームに入力した人に送る控えメール(今回はtest@test.jpとしました)で、
test@test.jpには控えメールがくるのですが、example@example.comからのメールを受け取ることができていません。
(from欄が「apacheになってしまっているのが謎です…)
Jun 13 11:43:11 tk2-408-45171 postfix/pickup[7861]: 0E5F868135D9: uid=48 from=<apache> Jun 13 11:43:11 tk2-408-45171 postfix/cleanup[7973]: 0E5F868135D9: message-id=<20190613024311.0E5F868135D9@mail.example.com> Jun 13 11:43:11 tk2-408-45171 postfix/qmgr[7862]: 0E5F868135D9: from=<apache@example.com>, size=1595, nrcpt=1 (queue active) Jun 13 11:43:11 tk2-408-45171 postfix/pickup[7861]: 1161C680EC29: uid=48 from=<apache> Jun 13 11:43:11 tk2-408-45171 postfix/cleanup[7973]: 1161C680EC29: message-id=<20190613024311.1161C680EC29@mail.example.com> Jun 13 11:43:11 tk2-408-45171 postfix/qmgr[7862]: 1161C680EC29: from=<apache@example.com>, size=1875, nrcpt=1 (queue active) Jun 13 11:43:11 tk2-408-45171 postfix/local[7977]: 0E5F868135D9: to=<example@example.com>, relay=local, delay=0.02, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir) Jun 13 11:43:11 tk2-408-45171 postfix/qmgr[7862]: 0E5F868135D9: removed Jun 13 11:43:11 tk2-408-45171 postfix/smtp[7978]: 1161C680EC29: to=<test@test.jp>, relay=test.jp[test.jpのIPアドレス]:25, delay=0.34, delays=0/0.01/0.18/0.15, dsn=2.0.0, status=sent (250 2.0.0 x5D2hBux015004 Message accepted for delivery) Jun 13 11:43:11 tk2-408-45171 postfix/qmgr[7862]: 1161C680EC29: removed
回答1件
あなたの回答
tips
プレビュー