問題
2021年2月19日 朝7時ごろにSentryに通知が来ていて確認したところ、
Net::SMTPAuthenticationError
535 Authentication failed: Bad username / password
が発生していました。
どうやらAutheticationエラーによってメールが送信されなかったようです。
発生後
このエラーが発生して以降、メールが送信できなくなり、
最後に送信できていたのは19日 0時5分でした。
つまり、エラーが発生する6〜7時間前まではメールが送信できていたことになります。
原因
SendGridから告知がされていました。
2021年2月17日までにSMTPからAPI Keyに認証方式を切り替えろ、とのことでした。
https://status.sendgrid.com/
In progress - For clarification, this is a customer advisory.
There is no maintenance work happening right now.
We have attempted to notify affected customers in our outreach campaign
and this is an additional step to alert customers of the breaking change
that will occur if authentication methods are not updated by next Wednesday,
February 17th, as outlined here:
https://sendgrid.com/docs/for-developers/sending-email/upgrade-your-authentication-method-to-api-keys/.
Scheduled - In order to enhance security for all of our customers,
Twilio SendGrid is requiring existing Essentials customers to update their authentication
to API Keys for all API and SMTP requests by Wednesday, February 17th, 2021.
Customers impacted by this breaking change will experience authentication errors
when making API calls leveraging Basic Authentication. In order to ensure uninterrupted service,
customers must update their authentication method to API keys by following the steps here:
https://sendgrid.com/docs/for-developers/sending-email/upgrade-your-authentication-method-to-api-keys/.
解決策
SMTPからAPIKeyによる認証方式に切り替えましょう。
反省
まったくもって気づきませんでした。
メール来てたっけ?と思い確認しましたが、どうやら来てないようでした。
仮に来てたとしても確認してなかったと思うので、今後こういうメールは確認するようにしたいです。
今後の糧にします。