コンテンツにスキップ

Gmailの取り消し

Google Gmailでのメール取り消しのワークフロー

このチュートリアルでは、Gmailのメール取り消しを設定する方法を学びます。

1. Google Cloud Platformでプロジェクトとサービスアカウントを設定する

Email SecurityがGmailの受信トレイからメッセージを取り消すためには、まずGoogle Cloud Platform(GCP)プロジェクトにサービスアカウントを作成する必要があります。

  1. Google Cloud Consoleにアクセスします。ダッシュボードからCREATE PROJECTを選択します。

    新しいプロジェクトを開始するためにCreate projectを選択

  2. 新しいプロジェクトの詳細を入力し、CREATEを選択して新しいプロジェクトを開始します。

    組織の詳細を入力

  3. 新しいプロジェクトが作成されると、GCPコンソールは自動的にプロジェクトコンソールにリダイレクトされます。リダイレクトされない場合は、Project selectorを使用して作成したプロジェクトに切り替えます。

    必要に応じてProject selectorを使用して前のステップで作成したプロジェクトを選択

  4. Getting Startedカードで、Explore and enable APIsを選択してAPIとサービスの設定コンソールにアクセスします。

    Getting startedカードを見つけ、Explore and enable APIsを選択

  5. ENABLE APIS AND SERVICESを選択してAPIライブラリを開きます。

    APIs and servicesを有効にする

  6. Admin SDK APIとGmail APIを有効にする必要があります。APIライブラリで、Google Workspaceセクションを見つけます。次に、View Allを選択してGoogle Workspaceのすべての利用可能なAPIにアクセスします。

    Admin SDK APIとGmail APIにアクセスするためにView allリンクを見つける

  7. Admin SDK APIを選択します。

    SDK APIを選択

  8. Enableを選択してAdmin SDK APIを有効にします。

    SDK APIを有効にするためにEnableを選択

  9. Google Workspace APIライブラリに戻り、Gmail APIを選択します。

    Gmail APIを選択

  10. ENABLEを選択してGmail APIを有効にします。

    Gmail APIを有効にするためにEnableを選択

  11. APIを使用するためのサービスアカウントを作成します。Gmail API consoleからCredentialsを選択します。

    サービスアカウントを作成するためにCredentialsを選択

  12. CREATE CREDENTIALS > Service accountを選択します。

    Create credentialsを選択し、次にService accountを選択

  13. Service account detailsに以下の情報を提供します:

    • Service account name: Message Retraction Service Account
    • Service account ID: この値は自動的に生成されます。
    • Service account description: このサービスの説明。例えば、Email Security Message Retraction

    完了したらCREATE AND CONTINUEを選択します。

    サービスアカウントを作成するための詳細を提供

  14. Grant this service account access to projectで、Select a roleドロップダウンメニューを選択します。次に、左の列でProjectを選択し、右の列でOwnerを選択します。

    Grant this service account access to projectセクションでプロジェクトオーナーオプションを見つける

  15. 役割が割り当てられたら、DONEを選択して設定を完了します。

    設定を完了するためにDoneボタンを選択

  16. 役割の割り当てが保存されると、API資格情報設定コンソールに戻ります。Service Accountsで、新しく作成したサービスアカウントを選択してドメイン全体の委任を設定します。

    続行するために新しく作成したサービスアカウントを選択

  17. Detailsで、Unique IDをメモします。次に、SHOW ADVANCED SETTINGSを選択します。

    Unique IDコードをメモし、次にShow advanced settingsを選択

  1. VIEW GOOGLE WORKSPACE ADMIN CONSOLEを選択してドメイン全体の委任を設定します。これにより、Google管理コンソールの新しいウィンドウが開きます。

    ドメイン全体の委任を設定するためにView Google Workspace Admin Consoleを選択

  2. Security > Access and data control > API controlsに移動します。

    Security、Access and data controlsに移動し、API controlsを選択

  3. Domain wide delegationセクションを見つけ、MANAGE DOMAIN WIDE DELEGATIONを選択します。

    Manage domain wide delegationを選択

  4. Add newを選択して新しいクライアントIDを追加します。

    Add newを選択

  5. Add a new client IDで、以下の情報を入力します:

    • Client ID: クライアントIDを入力します。これはステップ17で保存したUnique IDの値です。
    • OAuth scopes: 以下の情報を入力します(入力フィールドはカンマ区切りの値を受け入れます):
    https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.user.alias.readonly, https://www.googleapis.com/auth/gmail.labels, https://mail.google.com/

    完了したらAUTHORIZEを選択します。

    必要な情報を入力

  6. Google Cloud Platform(GCP)コンソールに戻り、IAM & Admin > Service Accountsを選択してサービスアカウント画面に戻ります。

    Service accountsを選択

  7. サービスアカウント設定パネルでAPIキーを作成する必要があります。三点リーダーボタンを選択してメニューを開き、次にManage keysを選択します:

    三点リーダーメニューを選択し、次にManage Keysを選択

  8. キー設定パネルで、ADD KEY > Create new keyを選択します。

    Add Keyを選択し、次にCreate new keyを選択

  9. Key typeで、プライベートキーを作成するためにJSONをフォーマットとして選択します。次に、CREATEを選択します。

    キータイプとしてJSONを選択

2. サービスアカウントのJSONキーをEmail Securityと共有する

前のステップで生成されたプライベートキーをEmail Securityにアップロードする必要があります。これは、Gmailの受信トレイで取り消しを実行するために必要です。

  1. Email Securityダッシュボードにログインし、Settings(歯車アイコン)を選択します。

  2. Email Configuration > RETRACT SETTINGS > Authorize Gmailに移動します。

    Email SecurityダッシュボードでAuthorize Gmailに移動

  3. New Authorizationを選択し、以下の設定を構成します:

    • **AUTHORIZATION DATA (JWT)**を選択し、JSONプライベートキーを見つけてアップロードします。
    • Domainsの下で、このプライベートキーが属するドメインを指定します。
    • Saveを選択して設定を保存します。

    New authorizationを選択し、その設定を構成

3. Email Securityで自動取り消しアクションを設定する

You can set up auto-retraction to automatically move messages matching certain dispositions to specific folders within a user’s mailbox.

To set up automatic retraction:

  1. Log in to the Email Security (formerly Area 1) dashboard.

  2. Go to Settings (the gear icon).

  3. On Email Configuration, go to Retract Settings > Auto-Retract.

  4. Select Edit.

  5. For each disposition, choose which folder the message should be sent to:

    • No Action: Do not move the message.
    • Junk Email: Sends the message to the junk or spam email folder.
    • Trash: Sends the message to the trash or deleted items email folder.
    • Soft Delete — user recoverable (Microsoft only): Sends the message to the user’s Deleted Items folder. Messages can be recovered by the user.
    • Hard Delete — admin recoverable: Completely deletes messages from a user’s inbox. Google Gmailメッセージは、管理者によっても回復できません。
  6. Select Update Auto-retract Settings.

Post delivery retractions for new threats

Email Security (formerly Area 1) is continuously gathering new information about phishing campaigns. Users might have email messages in their inboxes that were scanned by Email Security (formerly Area 1) but not retracted initially because, at the time of scan, these email messages had not been identified as a threat. To mitigate risk, Email Security (formerly Area 1) offers you tools to re-evaluate email messages at a fixed time interval based on knowledge Cloudflare may have acquired since initial delivery. Any email messages that fit this new threat knowledge will be retracted.

You can enable two options:

  • Post Delivery Response: Email Security (formerly Area 1) will continue to re-evaluate emails already delivered to your users’ inboxes at a fixed time interval in search for phishing sites or campaigns not previously known to Cloudflare. If any email messages fitting these new criteria are found, Email Security (formerly Area 1) retracts them.
  • Phish Submission Response: Email Security (formerly Area 1) will retract emails already delivered that are reported by your users as phishing, and are found to be malicious by Email Security (formerly Area 1). Retraction will occur according to your configuration.

4. Email Securityでホップカウントを調整する

Email SecurityがあなたのドメインのMXレコードとして設定されていないため、メール処理順序におけるArea 1の位置(ホップカウント)を調整する必要があります。

  1. Email Securityダッシュボードにログインし、Settings(歯車アイコン)を選択します。

  2. Email Configuration > DOMAINS & ROUTINGに移動します。

  3. 確認したいドメインの三点リーダーメニューを選択し、次にEditを選択します。

    Email Securityのホップ位置を確認するためにDomainに移動

  4. スタンドアロンのGmailのみのデプロイメントの場合、値は2に設定する必要があります。そうでない場合は、Hopsカウントを2に調整し、Update Domainを選択します。

    Email Securityのホップ位置を確認するためにDomainに移動

5. Google WorkspacesでBCCルールを設定する

Email Securityがメッセージを自動的に取り消すためには、受信メールメッセージのコピーをEmail Securityに送信する必要があります。メッセージはBCCコンプライアンスルールを使用してEmail Securityに送信できます。これを設定する方法を学ぶために以下の手順を参照してください。Email SecurityがMXとしてデプロイされている場合、自動取り消しは利用できません。

  1. In the Admin console, go to Menu > Apps > Google Workspace > Gmail > Compliance.

    Select the compliance option

  2. Scroll to Content Compliance and select CONFIGURE.

    Select the configure option

  3. Add a Content Compliance filter and name it Area 1 - BCC.

  4. In Email messages to affect, select Inbound.

    Choose inbound as the messages to affect

  5. Select the recipients that you want to send emails to Area 1 via BCC:

    1. Select Add to configure the expression.
    2. Select Advanced content match.
      1. In Location, select Headers + Body from the dropdown.
      2. In Match type select Matches regex.
      3. In Regexp input .*. You can customize the regex as needed and test within the admin page or on sites like https://regexr.com/.
      4. Select SAVE.

    Configure expressions

  6. In If the above expressions match, do the following, make the following changes:

    1. In Also deliver to select Add more recipients.

      1. Under Recipients select Add.
      2. Change the setting to Advanced.
      3. In Envelope recipient select Change envelope recipient.
      4. In Replace recipient add the recipient BCC address. For example, <customer_name>@journaling.mxrecord.io. This address is specific to each customer tenant and can be found in your Portal.
      1. Make sure that in Spam and delivery options > Do not deliver spam to this recipient is not checked.
      2. Under Headers select Add X-Gm-Spam and X-Gm-Phishy headers.
      3. Select SAVE.

    Configure recipients

    Configure headers

  7. Scroll down and select Show options.

    1. Under Account types to affect select Groups.
    2. Select SAVE.

    Configure groups

地理的な場所

Select from the following BCC addresses to process email in the correct geographic location.

HostLocationNote
<customer_name>@journaling.mxrecord.ioUSBest option to ensure all email traffic processing happens US data centers.
<customer_name>@journaling.mailstream-eu-primary.mxrecord.ioEUBest option to ensure all email traffic processing happens in Germany, with backup to US data centers.
<customer_name>@journaling.mailstream-eu1.mxrecord.ioEUBest option to ensure all email traffic processing happens within the EU without backup to US data centers.
<customer_name>@journaling.mailstream-bom.mxrecord.mxIndiaBest option to ensure all email traffic processing happens within India.
<customer_name>@journaling.mailstream-india-primary.mxrecord.mxIndiaSame as mailstream-bom.mxrecord.mx, with backup to US data centers.
<customer_name>@journaling.mailstream-asia.mxrecord.mxIndiaBest option to ensure all email traffic processing happens in India, with Australia data centers as backup.
<customer_name>@journaling.mailstream-syd.area1.cloudflare.netAustralia / New ZealandBest option to ensure all email traffic processing happens within Australia.
<customer_name>@journaling.mailstream-australia.area1.cloudflare.netAustralia / New ZealandBest option to ensure all email traffic processing happens in Australia, with India and US data centers as backup.

6. 手動メッセージ取り消し

When retraction is enabled, you can manually retract messages that were not automatically retracted.

  1. Log in to the Email Security (formerly Area 1) dashboard.

  2. Select the search bar and enter the search parameters to find the emails you are looking for.

  3. To retract a single message, select Retract. To retract multiple messages, first select the checkboxes on the messages you want to retract. Then, select Retract.

  4. Choose where you want to retract the message to, and select Retract message.

    Choose your retraction destination

  5. If the retraction was successful, there will be positive confirmation on Email Security (formerly Area 1) dashboard.