New ApisCP users resulting in "listfile for pam service does not exist"

Bug Report Template

Description

Adding new users to a domain wind up in an error. " * smtp: listfile for pam service does not exist" or " * smtp: listfile for pam service does not exist".

Steps to Reproduce

Please provide detailed steps to reproduce the bug. Include any necessary code snippets, commands, or configuration files.

  • Create or use existing domain.
  • Add user via User > Manage Users
  • User accounts will be created, email will be received, but email will not be checked in the edit of details and cannot login.
  • Returning to the page lists " * imap: listfile for pam service does not exist" for each users.

Expected Behavior

Describe what you expected to happen when the bug occurred.

Expected just to add a user like any time else.

Actual Behavior

Describe what actually happened when the bug occurred.

" * imap: listfile for pam service does not exist" lists for each user.

Environment

ApisCP version: 3.2.40
Operating System: 4.18.0-513.9.1.el8_9.x86_64

Additional relevant information (e.g., PHP version, database, etc.):

Additional Information

Provide any additional information about the bug, such as error messages, logs, screenshots, or any other relevant details.

Is mail service enabled for this domain? If so, what’s the mail provider?

Yes. Mail is enable. Builtin.

I am unable to reproduce with the provided steps. See attached screencap.

Trying to track this down.
This is currently affecting the most recent domain added to ApisCP. Adding emails to the respective users will display an error.

Email cannot be enabled under the user Nexus - Users - Manage Users - Edit.
apiscp-email-screenshot
Green check under email will not appear when editing the user.

Ensured the domain’s MX pointed to the server correctly.
Ensured mail is enabled and match the settings of other domains on the server.
Just in case, ran “upcp -sb” and “EditDomain --reconfig --all” to ensure everything is clean.

Just to confirm, you’re reproducing this if you add a new domain?

AddDomain -c siteinfo,domain=testdomain.test -c dns,enabled=0 -c mail,enabled=1 -c mail,provider=builtin -c siteinfo,admin_user=djkhdsf

/etc/<service>.pamlist is created when mail,enabled=1. Mail::install() is always true, so this condition is always triggered.