Skip to content

Commit

Permalink
handle yet another noncompliant SMTP response
Browse files Browse the repository at this point in the history
Yandex improperly responds with a 5.7.1 enhanced mail status code when an inbox doesn't exist.
  • Loading branch information
Changaco committed Nov 30, 2024
1 parent 5292d9d commit 8fee0e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion liberapay/utils/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ def test_email_server(ip_address: str, email=None, timeout=None) -> None:
# OpenSMTPD
msg.startswith("Invalid recipient: ") or
# Tutanota's SMTP server
msg.endswith("Recipient address rejected: Recipient not found")
msg.endswith("Recipient address rejected: Recipient not found") or
# Yandex
msg.startswith("No such user")
)
if recipient_rejected:
raise EmailAddressRejected(email, msg, ip_address)
Expand Down

0 comments on commit 8fee0e4

Please sign in to comment.