René's URL Explorer Experiment


Title: Self-hosted on Kubernetes: SMTP mailer sends EHLO [127.0.0.1], rejected by strict SMTP relays (all outbound email fails) · Issue #6778 · simstudioai/sim · GitHub

Open Graph Title: Self-hosted on Kubernetes: SMTP mailer sends EHLO [127.0.0.1], rejected by strict SMTP relays (all outbound email fails) · Issue #6778 · simstudioai/sim

X Title: Self-hosted on Kubernetes: SMTP mailer sends EHLO [127.0.0.1], rejected by strict SMTP relays (all outbound email fails) · Issue #6778 · simstudioai/sim

Description: Summary On self-hosted Kubernetes deployments, the SMTP email provider sends EHLO [127.0.0.1] on every connection. Strict SMTP servers — notably Google Workspace's SMTP relay (smtp-relay.gmail.com) — reject this with a 421 tarpit, so eve...

Open Graph Description: Summary On self-hosted Kubernetes deployments, the SMTP email provider sends EHLO [127.0.0.1] on every connection. Strict SMTP servers — notably Google Workspace's SMTP relay (smtp-relay.gmail.com)...

X Description: Summary On self-hosted Kubernetes deployments, the SMTP email provider sends EHLO [127.0.0.1] on every connection. Strict SMTP servers — notably Google Workspace's SMTP relay (smtp-relay.gmail....

Opengraph URL: https://github.com/simstudioai/sim/issues/6778

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Self-hosted on Kubernetes: SMTP mailer sends EHLO [127.0.0.1], rejected by strict SMTP relays (all outbound email fails)","articleBody":"### Summary\n\nOn self-hosted Kubernetes deployments, the SMTP email provider sends `EHLO [127.0.0.1]` on every connection. Strict SMTP servers — notably Google Workspace's SMTP relay (`smtp-relay.gmail.com`) — reject this with a `421` tarpit, so **every outbound email fails** (invitations, verification, etc.) even when the relay is configured correctly.\n\n### Root cause\n\n`apps/sim/lib/messaging/email/providers/smtp.ts` creates the nodemailer transport without a `name` option:\n\n```ts\nconst transporter = nodemailer.createTransport({\n  host: env.SMTP_HOST,\n  port,\n  secure,\n  auth: ...,\n})\n```\n\nWhen `name` is not provided, nodemailer's `SMTPConnection._getHostname()` falls back to `os.hostname()` — **and if that hostname contains no dot, it replaces it with `[127.0.0.1]`**:\n\n```js\n_getHostname() {\n  let hostname;\n  try { hostname = os.hostname() || ''; } catch (err) { hostname = 'localhost'; }\n  if (!hostname || hostname.indexOf('.') \u003c 0) {\n    hostname = '[127.0.0.1]';   // \u003c-- always taken on Kubernetes\n  }\n  ...\n}\n```\n\nKubernetes pod hostnames (e.g. `sim-app-5b8f7d9c4-x2k9q`) never contain a dot, so on k8s this fallback is taken 100% of the time and the mailer introduces itself as loopback.\n\n### Symptom\n\nAgainst Google Workspace SMTP relay, every send fails at the EHLO stage:\n\n```\nError: Server terminates connection. response=421-4.7.0 Try again later, closing connection. (EHLO)\n421-4.7.0  For more information, go to\n421 4.7.0  https://support.google.com/a/answer/3221692 ... - gsmtp\n```\n\nsurfaced in the UI as `All email providers failed: ...` (e.g. when inviting workspace members). Note: Sim still creates the invitation DB row before the email attempt, so the UI can show a member as invited even though no email was ever delivered.\n\nThis is easy to misdiagnose as a relay/allowlist misconfiguration — the relay setup was correct in our case, and raw SMTP sessions from the same pod / same egress IP succeeded whenever a dotted EHLO name was used.\n\n### Reproduction\n\nFrom any Kubernetes pod, open an SMTP session to `smtp-relay.gmail.com:587`:\n\n- `EHLO [127.0.0.1]` → `421-4.7.0 Try again later, closing connection. (EHLO)`\n- `EHLO any.dotted.name` → `250` (and the full send succeeds)\n\nVerified on v0.7.50; `smtp.ts` on current `main` still passes no `name`, so the bug should still be present.\n\n### Suggested fix\n\nPlumb an optional env var through to the transport, e.g.:\n\n```ts\nname: env.SMTP_EHLO_NAME || undefined,\n```\n\n(plus the env schema entry / helm chart docs). Defaulting to the current behavior keeps it non-breaking; a fancier default could use `os.hostname()` only when it's a FQDN and otherwise fall back to the configured public app domain.\n\n### Workaround for other k8s users\n\nForce the pod's kernel hostname to be a FQDN so nodemailer uses it:\n\n```bash\nkubectl -n \u003cns> patch deploy \u003capp-deploy> --type=strategic \\\n  -p '{\"spec\":{\"template\":{\"spec\":{\"hostname\":\"sim-app\",\"subdomain\":\"sim-app\",\"setHostnameAsFQDN\":true}}}}'\n```\n\nAfter the rollout, `os.hostname()` returns `sim-app.sim-app.\u003cns>.svc.cluster.local` (contains dots), nodemailer sends it as the EHLO name, and Google's relay accepts it. Confirmed working.\n\n### Environment\n\n- Sim v0.7.50 (helm chart 1.4.0), self-hosted on GKE\n- Email provider: SMTP (`smtp-relay.gmail.com:587`, STARTTLS, IP-allowlist relay)\n","author":{"url":"https://github.com/MatteoCarrabba","@type":"Person","name":"MatteoCarrabba"},"datePublished":"2026-08-17T18:28:18Z","url":"https://github.com/simstudioai/sim/issues/6778"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5cfb32a7-300e-a4ad-433a-cecf48f7e83f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBCE6:2D6147:AD3A08:F5B74C:6AFB5982
html-safe-nonceb9ab1020a51be34280e64e8a40fbfda6d3411c93d4a7b31bc09478f0c0a06ea5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0U2OjJENjE0NzpBRDNBMDg6RjVCNzRDOjZBRkI1OTgyIiwidmlzaXRvcl9pZCI6IjU3NDUzMDU5NzE4NjU2MzkyOTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccec922623dfe920d144ad69fa7df565fb6a1532832676e42b8b0192e958eda45
hovercard-subject-tagissue:5174202630
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/simstudioai/sim/6778/issue_layout
twitter:imagehttps://opengraph.githubassets.com/70860daff6a62892a917faaaec8a756fef9bffb268279db654bc5255c8fb4c0f/simstudioai/sim/issues/6778
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/70860daff6a62892a917faaaec8a756fef9bffb268279db654bc5255c8fb4c0f/simstudioai/sim/issues/6778
og:image:altSummary On self-hosted Kubernetes deployments, the SMTP email provider sends EHLO [127.0.0.1] on every connection. Strict SMTP servers — notably Google Workspace's SMTP relay (smtp-relay.gmail.com)...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMatteoCarrabba
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/simstudioai/sim/issues/6778#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fissues%2F6778
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fissues%2F6778
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/issues/6778
Reloadhttps://github.com/simstudioai/sim/issues/6778
Reloadhttps://github.com/simstudioai/sim/issues/6778
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
https://github.com/simstudioai/sim
New issuehttps://github.com/login?return_to=https://github.com/simstudioai/sim/issues/6778
New issuehttps://github.com/login?return_to=https://github.com/simstudioai/sim/issues/6778
Self-hosted on Kubernetes: SMTP mailer sends EHLO [127.0.0.1], rejected by strict SMTP relays (all outbound email fails)https://github.com/simstudioai/sim/issues/6778#top
https://github.com/MatteoCarrabba
MatteoCarrabbahttps://github.com/MatteoCarrabba
on Aug 17, 2026https://github.com/simstudioai/sim/issues/6778#issue-5174202630
https://github.com/waleedlatif1
waleedlatif1https://github.com/waleedlatif1
on Aug 24, 2026https://github.com/simstudioai/sim/issues/6778#issuecomment-5392284717
#6799https://github.com/simstudioai/sim/pull/6799
waleedlatif1https://github.com/waleedlatif1
completedhttps://github.com/simstudioai/sim/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 24, 2026https://github.com/simstudioai/sim/issues/6778#event-29899028978
Sign up for freehttps://github.com/signup?return_to=https://github.com/simstudioai/sim/issues/6778
Sign in to commenthttps://github.com/login?return_to=https://github.com/simstudioai/sim/issues/6778
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.