Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tail-ses: Support noreply address of `Real Name <[email protected]>`.
Alex Vandivera8d0908893ec
diff --git a/tools/tail-ses b/tools/tail-sesindex b871e1b6178..42e9c116e12 100755--- a/tools/tail-ses+++ b/tools/tail-ses@@ -2,6 +2,7 @@import osimport sysfrom email.headerregistry import Address+from email.utils import parseaddrsys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))from scripts.lib.setup_path import setup_path@@ -31,7 +32,8 @@ class IdentityArgsDict(TypedDict, total=False):def main() -> None:session = boto3.session.Session(region_name=settings.S3_REGION)- from_address = settings.NOREPLY_EMAIL_ADDRESS+ # Strip off the realname, if present, and extract just the domain name+ _, from_address = parseaddr(settings.NOREPLY_EMAIL_ADDRESS)from_host = Address(addr_spec=from_address).domainses: SESClient = session.client("ses")