mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
* fix(cognito): send email from the pool's EmailConfiguration sender Cognito email always came from no-reply@verificationemail.com. It now follows EmailConfigurationType: with DEVELOPER, From when set, otherwise the SourceArn identity's address; with COGNITO_DEFAULT, the SourceArn address. A domain identity takes its address from From. Without a SourceArn, the default address is kept. * test(cognito): read captured mail without the ?email= filter * fix(cognito): send from the configured sender only when SES has verified it A pool's EmailConfiguration sender is now used only when its SourceArn names an SES identity in the pool's account that SES has verified in the SourceArn Region (the pool's Region for a wildcard Region), and a From that supplies the sender is one mailbox at that address or in that domain. Anything else sends from no-reply@verificationemail.com and logs a warning, so a pool can no longer send as an address its account has not verified. When From has a sender name, the bare address now goes in ReturnPath. SES takes Source as the default return path, so the captured message's ReturnPath, and the envelope sender handed to the SMTP relay, was "Name <address>". The relay's mail client happened to strip the name from MAIL FROM; the envelope no longer depends on that. * style(cognito): use one parameterised message in the sender fallback log * fix(cognito): accept subdomains of a domain identity and match email identities exactly A verified SES domain covers its subdomains, so a From in one of them now sends instead of falling back. Email address identities are case sensitive, domain part included, so the From must equal the identity. The SourceArn must also be in the user pool's partition, not only its account. * refactor(ses): keep one definition of a verified identity SesService.isVerifiedIdentity now delegates to SesIdentityService.isIdentityVerified, made package-private, instead of repeating its check.