Problem: Misleading PAM_functional_account messages during Dovecot authentication

Problem

On UCS systems with Dovecot and Open-Xchange integration, regular user logins can generate repeated PAM_functional_account messages in /var/log/auth.log, even when mailbox access works successfully.

Frequent authentication requests can cause substantial log growth and increase disk usage. Misleading messages, including one logged at critical severity, can also trigger monitoring alerts and make genuine authentication problems harder to identify. These messages alone do not indicate a failed login.

The file /var/log/auth.log repeatedly contains messages similar to:

auth[12345]: pam_sss(dovecot:auth): authentication success; ... user=user@example.com
PAM_functional_account[acct_mgmt][12345]: Trying to log with user: (user@example.com) and ruser: (user@example.com)
PAM_functional_account[acct_mgmt][12345]: Incorrect user format
PAM_functional_account[acct_mgmt][12345]: ruser unknown

Users can still access their mailboxes successfully.


Environment

Observed on UCS 5.2 with:

  • Dovecot and Open-Xchange integration
  • univention-mail-dovecot version 8.6.0
  • univention-mail-dovecot-ox version 6.0.4

Root cause

The logging issue is tracked in Bug 60045. Refer to the bug for the current status and any available correction. Bugzilla access requires authentication.

The PAM module pam_oxfunctionalaccount.so supports authentication for OX functional accounts. It expects a special login format consisting of a 36-character functional-account UUID followed by a user identifier.

The module also runs during regular user authentication. A normal email address such as user@example.com does not match the expected format and triggers the messages above.

In this code path:

  • Incorrect user format is logged at critical severity.
  • ruser unknown follows the failed format check. It does not indicate that an LDAP lookup failed or that the user does not exist.

With the following account-management configuration, the module’s unsuccessful result is ignored and processing continues:

account [success=done default=ignore] pam_oxfunctionalaccount.so ...

The ellipsis represents installation-specific module parameters; this line is an illustration, not a replacement configuration.

Actual login failures must still be investigated separately.


Verification

Check the installed package versions:

dpkg-query -W univention-mail-dovecot univention-mail-dovecot-ox

Inspect the active PAM configuration:

cat /etc/pam.d/dovecot

Look for pam_oxfunctionalaccount.so and its control flags. Compare the messages with successful Dovecot logins.

A targeted user lookup can help verify name resolution:

getent passwd 'user@example.com'

Replace the example address with an affected user’s address. A successful lookup returns a passwd-format record for the user. This verifies name resolution, not the outcome of the complete authentication process.


Resolution and recommendations

Check the linked bug for an available correction. This article does not specify a verified fixed package version.

Until a correction is available:

  • Monitor log size, disk space, and log rotation.
  • Do not remove the functional-account module solely to suppress these messages; doing so may affect functional-account access.
  • Do not deploy unverified PAM patches or broadly suppress authentication logs.

References

Bureport 60045