Skip to content

fix: preserve HTML signature marker position - #27

Open
Brams-s wants to merge 4 commits into
ssp-data:mainfrom
Brams-s:fix/html-signature-marker-position
Open

fix: preserve HTML signature marker position#27
Brams-s wants to merge 4 commits into
ssp-data:mainfrom
Brams-s:fix/html-signature-marker-position

Conversation

@Brams-s

@Brams-s Brams-s commented Aug 27, 2026

Copy link
Copy Markdown

Why

[html-signature] currently acts only as an inclusion flag. SMTP always appends the configured HTML signature before </body>, so replies can place it after quoted history, where clients may collapse it.

What changed

  • Render the first line-trim-exact marker in place and scrub all markers from plain text.
  • Prevent duplicate signatures and safely fall back for malformed or colliding marker contexts.
  • Share marker-aware rendering across immediate send, scheduled send, and browser preview.
  • Preserve selected-account signatures and marker-free Listmonk bodies.
  • Add unit and end-to-end workflow coverage.

This touches the MIME-building and send paths.

Test plan

  • go test ./... -count=1
  • go vet ./...
  • gofmt -l on all touched Go files
  • git diff --check
  • Manually verified the equivalent patch in a real reply flow.

@Brams-s
Brams-s force-pushed the fix/html-signature-marker-position branch from 756cf86 to 71888bf Compare August 31, 2026 18:41
@Brams-s

Brams-s commented Aug 31, 2026

Copy link
Copy Markdown
Author

Hi, I’ve rebased this onto the latest main and resolved the conflicts. The hardening suite, full unit test suite, and go vet all pass locally. It preserves the HTML signature and Listmonk marker positions. When you have a moment, I’d appreciate a review.

@Brams-s

Brams-s commented Sep 7, 2026

Copy link
Copy Markdown
Author

Small process note rather than a new change: this PR's CI has never actually run.

The workflow run for the current head 71888bf is sitting at action_required — the first-time-contributor approval gate — since 2026-08-31:
https://github.com/ssp-data/neomd/actions/runs/33426404580

That is why the PR shows as UNSTABLE with "no checks reported" rather than green. main has not moved since out of office signature on 2026-08-31, so the branch is still cleanly rebased and the run should be valid as-is.

Could a maintainer approve that run so the PR gets a real upstream result to review against? Happy to rebase first if you would rather I refresh the branch.

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