Try   HackMD

Gmail 轉寄功能: 利用篩選器過濾

首先到 設定 > 轉寄和 POP/IMAP > 新增轉寄地址

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


輸入要轉寄的地址後按下一步,等待轉寄通知

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


轉寄對象會收到這封通知,進去點擊驗證連結即可

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


下一步是設定過濾器

先勾選特定的郵件,然後點上方的 點點點 按鈕,之後選擇 篩選這類的郵件

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


點擊後可以進一步設定篩選的細節

這邊的範例除了寄件者,另外加上特定的主旨

規則是 符合所有設定 的信件才會觸發

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


下一步是設定觸發的後續動作

這邊只做簡單的轉寄,用下拉選單選擇剛剛新增的轉寄對象

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


設定完成後,實際測試一下結果

過濾條件:寄件者設定為自己本身 && 主旨為 轉寄測試

寄件者信箱:

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

轉寄者信箱:

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

這邊可以看出,主旨的過濾有包含 wildcard,不需另外修改設定


Forwarding by Gmail to non confirmed email

因為 gmail 在自主動轉信的設定中,收件者必須要認證後,信才會轉過去

搜索一下是否有可以避開認證的方法:

首先官方說法:

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

即便透過 gmail API,用程式自動轉信的服務:Managing Forwarding

If Gmail requires user verification for a forwarding address, the address is returned with the status pending. A verification message is automatically sent to the target email address. The owner of the email address must complete the verification process before it can be used.

還是需要收信方認證

redit Gmail 群組有相關討論:

看來官方的自動轉信沒辦法避開認證,

似乎可以透過一些第三方工具達成需求:

其中 Email Forwarder 是透過 google sheet 上的 script,建立 custom rules,和 gmail 的 filter 相似,此外根據產品說明:

Here you can create a forwarding rule, just like Gmail filters, except that you are not required to verify the forwarding address. You can forward to any valid email address.

看起來符合需求

不過這套工具是 Google Workspace 的插件,需要額外收費

Free Edition - 1 Forwarding Rule, 20 emails per day, Runs once per hour
Premium for Gmail Accounts - Unlimited Rules, 100 emails per day, Runs every 15 minutes
Premium for G Suite - Unlimited Rules, 1500 emails (Google Suite for Work), Runs every 15 minutes

免費版的用量相當少

G Suite Admin 附加功能

另外,根據 這篇 文章的說法,如果是 G Suite Admin 的身分,有提供一些 mail list alias base by RBAC 的功能,可以自行定義 route 的規則,這部份因為沒有實際使用過,不確定是否符合需求
文章後半部就是一般的 Gmail 使用者的 forwarding 設定,和本篇一開始的範例相同


參考:
tags: gmail google