Open nick-filmriss opened 10 months ago
Can you check and see if you have the php-imap
module installed and enabled?
phpinfo()
. Execute Diagnostic
, Download the diagnostic file
.phpinfo.html
,.module_imap
.php-imap
. It should be able to login with DIGEST-MD5
.Many thanks for the quick reply. We have probably found the problem. The Docker container provided by Bitnami does not contain the Imap module. It can neither be installed in the container nor will bitnami fix it, as the module is apparently too old: https://github.com/bitnami/containers/issues/51877#issuecomment-1766661039
I will verify again on a local install
I have now installed everything on Ubuntu 22.04.3 and also made sure that imap is installed:
Unfortunately, the error still exists unchanged.
When you run this command from the command line:
pear channel-update pear.php.net
pear install Auth_SASL
sudo /opt/bitnami/scripts/apache/reload.sh
..and go to Admin, Email, New inbound email account
again, what's the behavior?
EDIT: you may need to fully restart apache
to get this new package used by PHP. In the container, run:
sudo /opt/bitnami/scripts/apache/restart.sh
this will also restart the container.
Thank you very much. Installing it has fixed the error. I can now set up my inbound email inbox.
However, the next error follows immediately, which is already known: https://github.com/salesagility/SuiteCRM-Core/issues/363 My inbox also shows no sender and only (no subject). The fix shown in the issue also fixed it for me.
Excellent @nick-filmriss glad your issues are fixed!
We've had the same issue that was reported, but just installing pear Auth_SASL didn't solve the issue. We're running on AlmaLinux 8.9 running Plesk - we have been able to install PEAR Auth_SASL manually, and verified this with a simple test script
<?php
require_once('SASL.php');
if (class_exists('Auth_SASL')) {
echo 'PEAR Auth SASL is enabled';
} else {
echo 'PEAR Auth SASL is NOT enabled';
};
This replicates the check that the Javanile/php-imap2 package is doing, and triggers the error message. (we also had to make some changes to include_dirs, and open_basedir in our PHP setup specifically due to Plesk restrictions so that the PEAR files could be accessed)
However, we still got the same error message in SuiteCRM. What we have had to do is directly edit the Javanile\Imap2\Roundcube ImapClient.php to make some changes
We removed the use Javanile\Imap2\Roundcub\Auth_SASL;
statement - as this namespace doesn't actually exist in the package!
Replaced this with require_once('SASL.php');
so now it loads the PEAR Auth_SASL class instead.
Then when creating the Auth_SASL object it was still trying to use the namespace previously referenced, so had to change $auth_sasl = new Auth_SASL;
to $auth_sasl = new \Auth_SASL;
Fundamentally issue caused by the package referencing a namespace that doesnt exist, and then because of that its not able to pickup the PEAR Auth_SASL that it should be using.
Attention: DIGEST-MD5 is old and unsecure, it has been replaced by SCRAM-SHA-X.
The ticket for compatibility in SuiteCRM:
@Neustradamus do you know how to add that? Is it difficult to make a PR?
@pgorod: SCRAM has been included in Auth_SASL/Auth_SASL2 by @Jehan a long time ago and improved recently by @schengawegga:
It has been added by @schengawegga in Net_SMTP, a big thanks:
Only -PLUS variants (Channel Binding) are not supported yet and SHA3-512 too.
@schengawegga: Can you reply to @pgorod question?
Creating a new inbound email account failed when trying to select the Monitored Folders, Trash Folder or Sent Folder. The dialog to select the folders flashes very briefly once and the POST request fails with a HTML 500 status. The error message says: Can not authenticate to IMAP server: The Auth_SASL package is required for DIGEST-MD5 authentication.
When using a different mail server (which apparently does not support DIGEST-MD5) the creation of an inbound email account works as expected.
Expected Behavior
The dialog for selecting the folders should be displayed.
Actual Behavior
The dialog to select the folders flashes very briefly once and the POST request fails with a HTML 500 status.
Possible Fix
To temporarily fix the error I have removed DIGEST-MD5 from the following array in the javanile php-imap2 package: This causes the authentication mechanism to fall back to Basic Authentication and the creation of the email account works. However, this is certainly not the right thing to do!
vendor/javanile/php-imap2/src/Roundcube/ImapClient.php:
Steps to Reproduce
Context
Basic setup of outgoing mail accounts when setting up SuiteCRM. Without the function to send emails, SuiteCrm is not usable for me.
Maybe related error in 7.14.1: https://github.com/salesagility/SuiteCRM/issues/10256
Your Environment
Logs
Error Log:
Expected log with different mail server (works despite the IMAP close error):