-
Notifications
You must be signed in to change notification settings - Fork 17
Description
When creating a public mailbox on a mail server instance running on NS8, the configuration wizard suggests that a wildcard mail address will also be created automatically.
The Name field validator currently allows the use of the @ character in the public mailbox name. This can be a valid and useful scenario on mail server instances that manage multiple mail domains, where the administrator may want the public mailbox to be created only for a specific domain (e.g. [email protected]).
However, allowing the @ character in the public mailbox name leads to a misconfiguration that causes the list-addresses API to fail.
Steps to reproduce
- Create a mail server instance on NS8.
- Create a new public mailbox.
- In the Name field, use a value containing the @ character (e.g.
[email protected]). - Complete the wizard (a wildcard address is created automatically).
- Run the following command from CLI:
api-cli run module/mail1/list-addresses | jq
Actual behavior
The API fails with validation errors because the local part of the address contains the @ character, which violates the expected schema:
Validation errors: [addresses.1: Must validate one and only one schema (oneOf)
addresses.1.local: Does not match pattern '^[^@]+$'
addresses.1: Must validate all the schemas (allOf)]
Full API output:
Validation errors: [addresses.1: Must validate one and only one schema (oneOf) addresses.1.local: Does not match pattern '^[^@]+$' addresses.1: Must validate all the schemas (allOf)]
{
"adduser_domains": [
"domain.tld"
],
"addgroup_domains": [],
"addresses": [
{
"local": "postmaster",
"destinations": [
{
"dtype": "public",
"name": "postmaster"
}
],
"description": "RFC-mandatory postmaster alias",
"atype": "wildcard",
"delete_forbidden": true
},
{
"local": "[email protected]",
"destinations": [
{
"dtype": "external",
"name": "[email protected]"
}
],
"atype": "wildcard"
},
{
"atype": "adduser",
"local": "admin",
"description": "Builtin administrator user"
},
{
"atype": "adduser",
"local": "testuser",
"description": "Test User"
}
]
}
Components
mail:1.7.4
See also
Discussion https://mattermost.nethesis.it/nethesis/pl/tmmy76yz1fg55ppho3cmnsfwpw
Metadata
Metadata
Assignees
Labels
Type
Projects
Status