在 AWS Route 53 中設定 DKIM 的注意事項


昨天在 AWS Route 53 中設定 Proxmox Mail Gateway 的 DKIM Record 時踩到兩個小問題:

字數過長

在 Route 53 的 TXT Recoed 最長只支援 255 字元,超出去的話必須要使用「"」來分割字串,其實 PMG 已經預設有幫你切好了,但如果直接複製貼上又會遇到一個問題..

DKIM Public Key 被截斷

直接貼上後,用 MXToolBox 怎麼測都不會過,後來發現是 Public Key 被截斷了,仔細看了官方文件 How do I resolve the “CharacterStringTooLong (Value is too long) encountered with {Value}” error that I received when I tried to create a TXT record using DKIM syntax?

Split the DKIM key value into two parts, and enclose each part in double quotation marks. For example, the value for "long_string" is split into "long_""string".

在雙引號之間「"」是不可以有空格、換行的,PMG 提供的直接貼上會導致換行、空格後的資訊被忽略,所以需要把空格及換行拿掉即可:


See also

comments powered by Disqus