This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new cbdfe74 Fix a problem with outgoing email validation
cbdfe74 is described below
commit cbdfe748878fead1f1d8ef9705474f82251b5c32
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Nov 14 18:30:50 2025 +0000
Fix a problem with outgoing email validation
---
atr/mail.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/atr/mail.py b/atr/mail.py
index 17fafe4..1ead3f0 100644
--- a/atr/mail.py
+++ b/atr/mail.py
@@ -145,7 +145,9 @@ def _split_address(addr: str) -> tuple[str, str]:
def _validate_recipient(to_addr: str) -> None:
# Ensure recipient is @apache.org or @tooling.apache.org
_, domain = _split_address(to_addr)
- if domain not in ("apache.org", "tooling.apache.org"):
- error_msg = f"Email recipient must be @apache.org or
@tooling.apache.org, got {to_addr}"
+ domain_is_apache = domain == "apache.org"
+ domain_is_subdomain = domain.endswith(".apache.org")
+ if not domain_is_apache or domain_is_subdomain:
+ error_msg = f"Email recipient must be @apache.org or @*.apache.org,
got {to_addr}"
log.error(error_msg)
raise ValueError(error_msg)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]