Inbound Email: PHP Notice: Unknown: Kerberos error report emails with MS Exchange #4251

Open
opened 2026-02-20 16:15:22 -05:00 by deekerman · 1 comment
Owner

Originally created by @J-Wick4 on GitHub (Mar 20, 2020).

Issue

When setting up an MS Exchange 2016 inbox for inbound email monitoring, every minute when a mail check is performed with cron, an email alert with a PHP NOTICE message.

Expected Behavior

PHP-IMAP should be configured to properly fall back on other authentication methods without triggering an alert.

Actual Behavior

PHP Notice: Unknown: Kerberos error: No Kerberos credentials available (default cache: KEYRING:persistent:10002) (try running kinit) for [199.193.205.202] (errflg=1) in Unknown on line 0

Possible Fix

Seems like this is the answer to this problem.
github.com/Z-Hub/Z-Push@b66ce5e88b

It would be nice to have service-specific settings button for major email technologies. Exchange, GSuite/Gmail, etc. This would set the encoding, authentication method, etc.

Steps to Reproduce

  1. Created a new inbound email record to monitor.
  2. Upon save, the inbox is being checked every minute, getting alert messages each time.

Context

This is an annoying bug that is flooding my administrator's inbox.

Your Environment

  • SuiteCRM: 7.11.12
  • Brave V1.5.113
  • 10.0.38-MariaDB, PHP 7.3.15
  • CentOS Linux release 7.7.1908 (Core)
Originally created by @J-Wick4 on GitHub (Mar 20, 2020). #### Issue When setting up an MS Exchange 2016 inbox for inbound email monitoring, every minute when a mail check is performed with cron, an email alert with a PHP NOTICE message. #### Expected Behavior PHP-IMAP should be configured to properly fall back on other authentication methods without triggering an alert. #### Actual Behavior > PHP Notice: Unknown: Kerberos error: No Kerberos credentials available (default cache: KEYRING:persistent:10002) (try running kinit) for [199.193.205.202] (errflg=1) in Unknown on line 0 #### Possible Fix Seems like this is the answer to this problem. https://github.com/Z-Hub/Z-Push/commit/b66ce5e88bd47c3bd18b432cd19ed620722a3137 It would be nice to have service-specific settings button for major email technologies. Exchange, GSuite/Gmail, etc. This would set the encoding, authentication method, etc. #### Steps to Reproduce 1. Created a new inbound email record to monitor. 2. Upon save, the inbox is being checked every minute, getting alert messages each time. #### Context This is an annoying bug that is flooding my administrator's inbox. #### Your Environment * SuiteCRM: 7.11.12 * Brave V1.5.113 * 10.0.38-MariaDB, PHP 7.3.15 * CentOS Linux release 7.7.1908 (Core)
Author
Owner

@J-Wick4 commented on GitHub (Mar 23, 2020):

As per request, moving this from community forum to here.
https://community.suitecrm.com/t/inbound-email-errors-with-exchange-imap/71929/5?u=ceopx

I found a solution just before giving up. I know this isn’t right, but it worked, the constant CRON emails stopped on every check, Inbound Mail check works.

Changed this:

protected function getImapConnection($mailbox, $username, $password, $options = 0)

{
$connection = null;
$authenticators = ['', 'GSSAPI', 'NTLM'];

while (!$connection && ($authenticator = array_shift($authenticators)) !== null) {
    if ($authenticator) {
        $params = [
            'DISABLE_AUTHENTICATOR' => $authenticator,
        ];
    } else {
        $params = [];
    }

    $connection = $this->getImap()->open($mailbox, $username, $password, $options, 0, $params);
}

return $connection;

}
To this:

protected function getImapConnection($mailbox, $username, $password, $options = 0)

{
$connection = null;
$authenticators = ['', 'GSSAPI', 'NTLM'];

while (!$connection && ($authenticator = array_shift($authenticators)) !== null) {
    if ($authenticator) {
        $params = [
            'DISABLE_AUTHENTICATOR' => 'GSSAPI', 'NTLM',
        ];
    } else {
        $params = ['DISABLE_AUTHENTICATOR' => 'GSSAPI', 'NTLM'];
    }

    $connection = $this->getImap()->open($mailbox, $username, $password, $options, 0, $params);
}

return $connection;

}

@J-Wick4 commented on GitHub (Mar 23, 2020): As per request, moving this from community forum to here. [https://community.suitecrm.com/t/inbound-email-errors-with-exchange-imap/71929/5?u=ceopx](https://community.suitecrm.com/t/inbound-email-errors-with-exchange-imap/71929/5?u=ceopx ) I found a solution just before giving up. I know this isn’t right, but it worked, the constant CRON emails stopped on every check, Inbound Mail check works. Changed this: protected function getImapConnection($mailbox, $username, $password, $options = 0) { $connection = null; $authenticators = ['', 'GSSAPI', 'NTLM']; while (!$connection && ($authenticator = array_shift($authenticators)) !== null) { if ($authenticator) { $params = [ 'DISABLE_AUTHENTICATOR' => $authenticator, ]; } else { $params = []; } $connection = $this->getImap()->open($mailbox, $username, $password, $options, 0, $params); } return $connection; } To this: protected function getImapConnection($mailbox, $username, $password, $options = 0) { $connection = null; $authenticators = ['', 'GSSAPI', 'NTLM']; while (!$connection && ($authenticator = array_shift($authenticators)) !== null) { if ($authenticator) { $params = [ 'DISABLE_AUTHENTICATOR' => 'GSSAPI', 'NTLM', ]; } else { $params = ['DISABLE_AUTHENTICATOR' => 'GSSAPI', 'NTLM']; } $connection = $this->getImap()->open($mailbox, $username, $password, $options, 0, $params); } return $connection; }
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4251
No description provided.