Mail Domain list fails after migration from NethServer 7

Migrations process is from a Proxmox VM NS7 fully patched with LDAP to a new Proxmox VM NS8 fully patched with LDAP on top of Rocky which is also fully patched. DNS is via an external to NS Nginx Proxy Manager.

The Apps migrating are Ejabber, Emails and Webtop.

Emails are working fine, just can not access Mail > Domains. I can create new users and the email work for the new users and old users.
I have encountered several issues related to domain management which are affecting user accounts.

When accessing the domain management page, I receive the following validation error:

Validation errors: [2.catchall: Must validate one and only one schema (oneOf) 2.catchall.dtype: 2.catchall.dtype must be one of the following: “user”, “group”, “public”, “apo”]

Additionally, when I attempt to create a new domain, the system indicates that the domain has been created successfully. However, the new domain does not appear in the domain list, and thus I am unable to manage it.

The original NS7 email server had a catchall email address, which I suspect may be causing the issue and needs to be deleted. Is there any way to delete the catch-all email address from the command line?

1 Like

Yes, it is possible to change the SQLite database containing Postfix configuration. Before doing that, please inspect the API output with:

api-cli run module/mail1/list-domains | jq

You’d see the validation error message too. Please paste the full output/error here.

You can inspect the current catchall configuration of the Domains page with a similar command:

[root@rl1 ~]# runagent -m mail1 podman exec postfix sqlite3 -markdown /srv/pcdb.sqlite 'select * from domains where catchall is not null;'                                                   
|   domain    | transport | addusers | addgroups | catchall | bccaddr | ddesc |
|-------------|-----------|----------|-----------|----------|---------|-------|
| example.org |           | 0        | 0         | myuser   |         |       |

To disable the catchall of a certain domain, run this command:

api-cli run module/mail1/alter-domain --data '{"domain":"example.org","catchall":null}'
3 Likes

Removing the old catchall fixed it. Thank you.

As per your request:

api-cli run module/mail1/list-domains | jq

You’d see the validation error message too. Please paste the full output/error here.

Here is the output I received -

Warning: using user “cluster” credentials from the environment
Validation errors: [0.catchall: Must validate one and only one schema (oneOf) 0. catchall.dtype: 0.catchall.dtype must be one of the following: “user”, “group”, “public”, “apo”]
[
{
“domain”: “domain name removed”,
“addusers”: true,
“addgroups”: false,
“catchall”: {
“dtype”: “external”,
“name”: “email address removed”
},
“bccaddr”: null,
“description”: “”
},

1 Like

Thank you for providing this information. There could be a nethserver-mail NS7 use case that is not covered by migration-tool.

If possible, run this command on NS7 and attach its output:

config show postfix

I guess it was a full email address like user@example.org. Just tell me if the domain part (e.g. example.org) was handled by NS7 or an external domain, like gmail.com.

RE: config show postfix

postfix=service
AccessBypassList=192.168.0.232,127.0.0.1
AccessPolicies=smtpauth,trustednetworks
AlwaysBccAddress=
AlwaysBccStatus=disabled
ConnectionsLimit=0
ConnectionsLimitPerIp=0
DynamicGroupAlias=disabled
HeloHost=
MessageQueueLifetime=4
MessageSizeMax=20000000
SenderValidation=disabled
SmartHostName=
SmartHostPassword=
SmartHostPort=
SmartHostStatus=disabled
SmartHostTlsStatus=enabled
SmartHostUsername=
SystemUserRecipientStatus=disabled
TCPPorts=25,465,587
access=green,red
status=enabled
RE:
I guess it was a full email address like user@example.org . Just tell me if the domain part (e.g. example.org ) was handled by NS7 or an external domain, like gmail.com .

“dtype”: “external”, is a mystery.

Yes, it was the correct email address with the correct domain of the email server.

1 Like

@stephdl has filed a bug here: Wrong migration of Mail's "Accept Unknown Recipients" setting · Issue #7257 · NethServer/dev · GitHub

1 Like