Skip to content

[codex] fix SMTP sender validation for digit-leading domains#12993

Open
Phillipxh wants to merge 1 commit into
nextcloud:mainfrom
Phillipxh:codex/fix-digit-leading-mail-domain-validation
Open

[codex] fix SMTP sender validation for digit-leading domains#12993
Phillipxh wants to merge 1 commit into
nextcloud:mainfrom
Phillipxh:codex/fix-digit-leading-mail-domain-validation

Conversation

@Phillipxh
Copy link
Copy Markdown

Summary

  • route SMTP sends through a small LenientSmtphordeTransport wrapper
  • disable Horde's strict From header validation for sender addresses so domains like 180grad-kiel.de are accepted
  • add a regression test for digit-leading domains and update the SMTP factory test to cover the new transport

Why

Horde_Mail_Transport::prepareHeaders() uses Horde_Mail_Rfc822 with validate => true for the From header. That rejects valid domains whose labels start with digits, which breaks message sending for addresses like user@180grad-kiel.de even though RFC 1123 permits them.

This keeps the workaround local to the SMTP transport used by Mail instead of patching vendor code in place.

Validation

  • Added a unit regression test for From: Test User <user@180grad-kiel.de>
  • Ran git diff --check
  • Could not run PHPUnit locally in this environment because php is not installed

Closes #12992

Signed-off-by: Phillipxh <150742483+Phillipxh@users.noreply.github.com>
@Phillipxh Phillipxh force-pushed the codex/fix-digit-leading-mail-domain-validation branch from 5fa2f38 to e040701 Compare May 29, 2026 11:32
@Phillipxh Phillipxh marked this pull request as ready for review May 29, 2026 11:33
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.

Horde_Mail_Rfc822 validator rejects valid email domains starting with digits (e.g. 180grad-kiel.de) causing "Error when parsing angle address"

2 participants