Skip to content

Replace SMTP sender modes with From templates - #113

Open
7heMech wants to merge 2 commits into
devfrom
feat/smtp-sender-templates
Open

7heMech wants to merge 2 commits into
devfrom
feat/smtp-sender-templates

Conversation

@7heMech

@7heMech 7heMech commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Each site's From is now a single template, so the "Force one address" / "Allow site domains" choice is gone.

Token Value
{site} The CloudPanel site's domain
{from.local} The name part of the From the app asked for, if its domain is allowed; otherwise noreply
{from.domain} The app's domain, kept only if it's the site's own or a granted domain
  • noreply@{site} is the default. {from.local}@{site} keeps wordpress@ / orders@ on the site's domain.
  • A requested From on a foreign domain (a contact form's visitor) is sent as noreply@ the site, with the original in Reply-To, instead of the message being rejected. Display names are kept.
  • Postfix's local sender map follows from the template: an exact address, or the whole domain when {from.local} is used.
  • The test mail runs as the site's Unix account through smtp-submit, so it covers the PHP path. There's an optional field for the From the app asks for.
  • Saving updates the page from the reply instead of calling location.reload().
  • preview:shot now installs Chromium with bunx --bun, because Playwright refuses Node 18.

Verified on staging: PHP mail() through the site's FPM pool and the test action both queued with the expected From, envelope sender and Reply-To. Staging was reset to unconfigured afterwards.

🤖 Generated with Claude Code

A site's From is now one template using {from.local}, {from.domain} and
{site}, instead of a force/allow mode with separate domain and address
lists. {from.domain} keeps only the site's own or granted domains. A
foreign requested address becomes the site's and moves to Reply-To, so
no PHP mail is rejected for its sender. Display names are kept.

The test mail now runs as the site's Unix account through smtp-submit,
and saves repaint the page from the action's reply instead of reloading.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: f1ea1ddc-a15a-4db9-9402-d2cd3b69a398

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Staging is running this pull request as of b60c200. It stays until the next deploy from dev or from another pull request.

{from.local} now applies only when the requested domain is the site's own
or granted, so a contact form's visitor is never sent as a mailbox on the
site's domain. Their address still goes to Reply-To.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging — b60c200a Deployed Sep 29, 2026 by 7heMech via deploy #187
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant