DMARC Reports を自前で集計する方法
- POST
DMARC Reports を自前で集計する方法を備忘録として残しておく
方法 GAS(Google Apps Script) を使用して集約する
新規で Spread Sheet を作成 「拡張機能」>「Apps Script」を選択 「ファイル」>「コード.gs」のデフォルトで記載されているソースを削除して以下を貼り付ける let today = new Date(); let targetDate = new Date(today); let nextDate = new Date(today); targetDate.setDate(today.getDate() - 1); nextDate.setDate(targetDate.getDate() + 1); const folderId = '<<Folder ID>>'; // レポートファイルを保存する親フォルダIDを指定 const sheetId = '<<Sheet ID>>'; // レポートを出力するスプレッドシートIDを指定 // 実行日の前日のメールを検索 // DMARC レポートを取得できる検索条件を指定する const query = 'From:noreply-dmarc-support@google.com after:' + Utilities.formatDate(targetDate, Session.getScriptTimeZone(), 'yyyy/MM/dd') + ' before:' + Utilities.