feat: allow pass hostname in docker env#6
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| if self.use_tls and self.opportunistic_tls: | ||
| smtp.ehlo(local_host) | ||
| smtp.starttls() | ||
| smtp.ehlo(local_host) |
There was a problem hiding this comment.
EHLO behavior changed from server to local hostname
Medium Severity
The SMTP EHLO command behavior changed unintentionally. Previously, smtp.ehlo(self.server) used the SMTP server's address for the EHLO domain name (as documented in the removed comment). Now smtp.ehlo(local_host) uses SMTP_LOCAL_HOSTNAME if configured, otherwise an empty string which causes Python's smtplib to use socket.getfqdn() (the local machine's FQDN). This silent change in default behavior could break existing opportunistic TLS SMTP configurations that relied on using the server address for EHLO.
Benchmark PR from agentic-review-benchmarks#6
Note
Introduces configurable SMTP HELO/EHLO hostname for deployments behind NAT or with strict MTAs.
SMTP_LOCAL_HOSTNAMEto config (MailConfig) and wires it intoSMTPClientaslocal_hostnameforsmtplib.SMTP/SMTP_SSLand EHLO during STARTTLS.env.examplefiles (api, integration tests, docker) anddocker-compose.yamlto exposeSMTP_LOCAL_HOSTNAMESMTPClient.sendto selectSMTPvsSMTP_SSLvia a ternary and to EHLO with the configured hostname when using STARTTLSlocal_hostnameto be passed (usesANY)Written by Cursor Bugbot for commit 6facade. Configure here.