You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mail: messages to public mailboxes with spaces in the name are not delivered #8309
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.
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).
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.
Activity
Merge pull request #343 from NethServer/public-mailbox-spaces
DavidePrincipi commentedon Nov 11, 2026
The testing image
ghcr.io/nethserver/mail:2.0.0-beta.2is 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:testpub@example.orgwith 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 hiddenvmailfolders."TEST PUBLIC MAILBOX"@example.org. It is delivered to the public mailbox instead of being rejected withUser unknown in virtual alias table.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).fix: no address for invalid mailbox names (#353)
DavidePrincipi commentedon Nov 27, 2026
VERIFIED
All the test cases of this issue are covered by the automated tests (
tests/50__smtp/00__public_mailbox.robot), which pass on Mail2.0.0-beta.6. No manual check was needed.