質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Google Cloud Platform

Google Cloud Platformは、Google社がクラウド上で提供しているサービス郡の総称です。エンドユーザー向けサービスと同様のインフラストラクチャーで運営されており、Webサイト開発から複雑なアプリ開発まで対応可能です。

SendGrid

SendGridは、米SendGrid社のクラウド型メール配信サービス。アカウントを作成するだけですぐに利用することが可能です。さらに到達率向上のための送信ドメイン認証対応や、柔軟性のあるスケーラビリティなど多くの機能を有します。

Postfix

Postfixは、電子メールサーバソフトウェアで、 メールを配送するシステムMTAの一種です。

メール

メールは、コンピュータネットワークを利用し、 情報等を交換する手段のことです。

GoogleComputeEngine

GoogleComputeEngineとは、Linux VMをGoogleのデータセンター上で走らせるIaaS (インフラストラクチャ アズ ア サービス)製品で、ビジネス向けクラウドコンピューティング基盤のことです。

Q&A

0回答

1399閲覧

PostfixからSendGridを使用してメールが送信できない(GCE)

109s

総合スコア1

Google Cloud Platform

Google Cloud Platformは、Google社がクラウド上で提供しているサービス郡の総称です。エンドユーザー向けサービスと同様のインフラストラクチャーで運営されており、Webサイト開発から複雑なアプリ開発まで対応可能です。

SendGrid

SendGridは、米SendGrid社のクラウド型メール配信サービス。アカウントを作成するだけですぐに利用することが可能です。さらに到達率向上のための送信ドメイン認証対応や、柔軟性のあるスケーラビリティなど多くの機能を有します。

Postfix

Postfixは、電子メールサーバソフトウェアで、 メールを配送するシステムMTAの一種です。

メール

メールは、コンピュータネットワークを利用し、 情報等を交換する手段のことです。

GoogleComputeEngine

GoogleComputeEngineとは、Linux VMをGoogleのデータセンター上で走らせるIaaS (インフラストラクチャ アズ ア サービス)製品で、ビジネス向けクラウドコンピューティング基盤のことです。

0グッド

0クリップ

投稿2021/02/25 03:53

編集2021/03/12 05:37

前提・実現したいこと

GCEのインスタンスからSendGridでメールを送信したいのですが、できません。
設定にあたっては、以下のドキュメントを参照しています。
https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid?hl=ja

・インスタンスのOS:Debian GNU/Linux 10 (buster)
・SendGridのAPI keyの権限:Mail Send(Full Access)
・Postfix Configurationの設定(apt update && apt -y install postfix libsasl2-modules)
ーLocal only
ーsendgrid-tutorial.asia-xxx.sendgrid-xxxxxx.internal(デフォルトのドメイン名)

以下のコマンドでメールを送信しているのですが、「Undelivered Mail Returned to Sender」となってしまいます。

発生している問題・エラーメッセージ

####システムログ

mm dd hh:mm:44 sendgrid-tutorial postfix/pickup[8867]: C6E5D2006B: uid=0 from=<root@sendgrid-tutorial.asia-xxx.sendgrid-xxxxxx.internal> mm dd hh:mm:44 sendgrid-tutorial postfix/cleanup[9253]: C6E5D2006B: message-id=<20210225033444.C6E5D2006B@sendgrid-tutorial.asia-xxx.sendgrid-xxxxxx.internal> mm dd hh:mm:44 sendgrid-tutorial postfix/qmgr[8868]: C6E5D2006B: from=<root@sendgrid-tutorial.asia-xxx.sendgrid-xxxxxx.internal>, size=478, nrcpt=1 (queue active) mm dd hh:mm:45 sendgrid-tutorial postfix/smtp[9255]: C6E5D2006B: to=<marketing@holo-bell.com>, relay=smtp.sendgrid.net[161.202.148.179]:2525, delay=0.67, delays=0.03/0.05/0.47/0.12, dsn=5.0.0, status=bounced (host smtp.sendgrid.net[161.202.148.179] said: 550 The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements (in reply to end of DATA command)) mm dd hh:mm:45 sendgrid-tutorial postfix/cleanup[9253]: 75C01227D3: message-id=<20210225033445.75C01227D3@sendgrid-tutorial.asia-xxx.sendgrid-xxxxxx.internal> mm dd hh:mm:45 sendgrid-tutorial postfix/qmgr[8868]: 75C01227D3: from=<>, size=3526, nrcpt=1 (queue active) mm dd hh:mm:45 sendgrid-tutorial postfix/bounce[9257]: C6E5D2006B: sender non-delivery notification: 75C01227D3 mm dd hh:mm:45 sendgrid-tutorial postfix/qmgr[8868]: C6E5D2006B: removed mm dd hh:mm:45 sendgrid-tutorial postfix/local[9258]: 75C01227D3: to=<root@sendgrid-tutorial.asia-xxx.sendgrid-xxxxxx.internal>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) mm dd hh:mm:45 sendgrid-tutorial postfix/qmgr[8868]: 75C01227D3: removed

####エラーメール本文(抜粋)

This is the mail system at host sendgrid-tutorial.asia-xxx.sendgrid-xxxxxx.internal. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system <hoge@example.com>: host smtp.sendgrid.net[xxx.xxx.xxx.xxx] said: 550 The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements (in reply to end of DATA command)

試したこと

メール本文に記載の以下のURLにアクセスし、Sender Identityを確認しました。
https://sendgrid.com/docs/for-developers/sending-email/sender-identity/

➾Single Sender Verificationとして、自身のメールアドレスが「Verified」のステータスとなっています。

補足情報(FW/ツールのバージョンなど)

Postfix configurationのデフォルトドメイン(sendgrid-tutorial.asia-xxx.sendgrid-xxxxxx.internal)にて、Sender Verificationをしなければならないのでしょうか。
一応試してみたのですが、Verification mailがインスタンスに届かないため、verifyができない状況です。

初歩的なご質問で大変恐縮ですが、どのように対応すべきかご教示頂けますと幸いです。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問