Skip to content

feat(signature): add setting to disable the "-- " separator above signatures#13098

Open
joeldj-nl wants to merge 1 commit into
nextcloud:mainfrom
joeldj-nl:main
Open

feat(signature): add setting to disable the "-- " separator above signatures#13098
joeldj-nl wants to merge 1 commit into
nextcloud:mainfrom
joeldj-nl:main

Conversation

@joeldj-nl

@joeldj-nl joeldj-nl commented Jun 17, 2026

Copy link
Copy Markdown

Summary

The signature separator (--) was previously always inserted above account signatures, with no way for users to disable it.

This PR adds a per-account setting:

Add a separator line (--) above the signature

The setting is enabled by default to preserve the existing behavior for current users.

Changes

  • Add a per-account signatureAboveSeparator setting.
  • Store the setting in the database.
  • Expose the setting through the account controller.
  • Include the setting in the user/account migration.
  • Thread the setting through the composer signature command.
  • Keep the existing behavior as the default by enabling the separator unless explicitly disabled.

Testing

Tested successfully in a fresh Nextcloud development installation.

Manual test performed:

  • Started a fresh Nextcloud dev container with PHP 8.3.
  • Enabled the Mail app from this branch.
  • Added/configured a mail account.
  • Verified that the separator line is shown by default.
  • Disabled the new account setting.
  • Verified that the -- separator is no longer inserted above the signature.
  • Re-enabled the setting.
  • Verified that the separator is inserted again.

Notes

This keeps backward compatibility by defaulting the new option to enabled.

Assisted-by: Claude:claude-opus-4-8

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI
screenshot-signature-separator-setting

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution

Code looks good. Test coverage is appreciated

@ChristophWurst

Copy link
Copy Markdown
Member

DCO is failing. Please sign off your commits. By signing off you guarantee that the contribution is compatible with the project's license.

@kesselb

kesselb commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Thanks for your pull request.

Thunderbird has a hidden flag to disable the separator too, so it probably makes sense to have it.

That said, I would like to double-check if you are aware that this separator, while not strictly standardized (apart from being mentioned at https://www.rfc-editor.org/info/rfc3676/#section-4.3), is widely used to distinguish content from a signature. Many clients provide an option to split or hide on it. Removing the separator therefore reduces interoperability.

Is there a particular reason why you need that switch?

…natures

Signed-off-by: Joël de Jager <contact@joeldejager.nl>
@joeldj-nl

Copy link
Copy Markdown
Author

Thanks for your pull request.

Thunderbird has a hidden flag to disable the separator too, so it probably makes sense to have it.

That said, I would like to double-check if you are aware that this separator, while not strictly standardized (apart from being mentioned at https://www.rfc-editor.org/info/rfc3676/#section-4.3), is widely used to distinguish content from a signature. Many clients provide an option to split or hide on it. Removing the separator therefore reduces interoperability.

Is there a particular reason why you need that switch?

Thanks for the clarification. Yes, I’m aware that the -- separator is a long-standing convention and that some clients use it to detect, hide or strip signatures in replies.

The intention of this PR is not to change the default behavior. The new setting defaults to enabled, so existing interoperability is preserved unless a user explicitly opts out.

The reason for the switch is that the separator is not desirable for every account or signature style. For modern/HTML or business signatures, the visible -- line can look odd to recipients, and currently users who do not want it have to manually remove it every time they compose a message.

Since Thunderbird also provides a way to suppress the separator, I think it makes sense for Nextcloud Mail to expose this as an account-level preference as well: keep the interoperable behavior by default, but allow users to disable it when they intentionally prefer not to send the visible separator.

@joeldj-nl joeldj-nl requested a review from ChristophWurst June 17, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants