Skip to content

Mail: messages to public mailboxes with spaces in the name are not delivered #8309

Open

Description

@DavidePrincipi

Steps to reproduce

  • Create a public mailbox with spaces in its name, for example TEST PUBLIC MAILBOX
  • Create an address, for example testpub@example.org, with that public mailbox as destination
  • Send a message to testpub@example.org from outside

Expected behavior

The message is stored in the TEST PUBLIC MAILBOX public mailbox.

Actual behavior

The message is not stored in the public mailbox. The mail server splits the mailbox name at the spaces and handles it as three different recipients:

  • one copy is stored in a hidden folder of the internal vmail user, which holds all public mailboxes, so nobody sees it
  • the other two recipients do not exist, so the sender receives an error message (bounce) with 550 5.1.1 User doesn't exist

The same problem probably affects a user's mail forward and a domain catch-all address that point to a public mailbox with spaces in its name.

Addresses cannot contain spaces, as in NethServer 7, so the address created automatically with the mailbox name ("TEST PUBLIC MAILBOX"@example.org) never received messages. Mail no longer creates it for names that are not valid addresses.

Workaround

Do not use spaces in public mailbox names.

Components

Mail 1.9.3 and earlier. The problem is still present in Mail 2.0.0-beta.1.

See also

Activity

  1. moved this from ToDo to In Progress in NethServeron Nov 11, 2026
  2. added a commit that references this issue on Nov 11, 2026
  3. DavidePrincipi commented on Nov 11, 2026

    @DavidePrincipi
    MemberAuthor

    The testing image ghcr.io/nethserver/mail:2.0.0-beta.2 is available, with the fix from NethServer/ns8-mail#343.

    The mail server now receives public mailbox destinations as quoted names, so messages reach public mailboxes with spaces, commas or quotes in the name. Delivery to users, groups, external addresses and public mailboxes without spaces does not change.

    Test cases for verification, using a public mailbox with spaces in its name, for example TEST PUBLIC MAILBOX:

    • Address: create testpub@example.org with that public mailbox as destination and send a message from outside. It is stored in the public mailbox, with no bounce and no copy in hidden vmail folders.
    • Mailbox name address: send a message to "TEST PUBLIC MAILBOX"@example.org. It is delivered to the public mailbox instead of being rejected with User unknown in virtual alias table.
    • User forward: set a user's forward to the public mailbox. Messages for the user reach the public mailbox.
    • Domain catch-all: set the domain catch-all to the public mailbox and send a message to a non-existing address. It reaches the public mailbox.
    • Regression: a public mailbox without spaces, users and groups still receive messages as before.

    Automated coverage: tests/50__smtp/00__public_mailbox.robot (Public mailbox destination, Address of public mailbox with spaces and comma, Quoted public mailbox name address, User forward to public mailbox with spaces, Catchall to public mailbox with spaces).

  4. added
    testing
    on Nov 11, 2026
  5. moved this from In Progress to Testing in NethServeron Nov 11, 2026
  6. DavidePrincipi commented on Nov 27, 2026

    @DavidePrincipi
    MemberAuthor

    VERIFIED

    All the test cases of this issue are covered by the automated tests (tests/50__smtp/00__public_mailbox.robot), which pass on Mail 2.0.0-beta.6. No manual check was needed.

  7. added
    verified
    and removed
    testing
    on Nov 27, 2026
  8. moved this from Testing to Verified in NethServeron Nov 27, 2026
  9. moved this from Verified to In Progress in NethServeron Nov 27, 2026
  10. moved this from In Progress to Verified in NethServeron Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

verified

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions