Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.47k stars 2.8k forks source link

Email Collector : Failed to open IMAP connection {XX}INBOX Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Authentication failed. #31487

Open borisboc opened 3 weeks ago

borisboc commented 3 weeks ago

Bug

Dear Dolibarr team, I try to configure the email collector to collect the emails of my OVH webmail. Saddly, even with several configurations (tweakgin) of the collector, I always get :

Failed to open IMAP connection {ssl0.ovh.net:993/service=imap/ssl/novalidate-cert}INBOX Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Authentication failed.

with info box doCollectOneCollector is using method MAIN_IMAP_USE_PHPIMAP=0 (native PHP imap, LOGIN) connectstringsource = {ssl0.ovh.net:993/service=imap/ssl/novalidate-cert}INBOX, $connectstringtarget={ssl0.ovh.net:993/service=imap/ssl/novalidate-cert}

I tested with docker (dolibarr/dolibarr:latest), local deb (ubuntu 22.04) and cloud aplose.ma-gestion-cloud

I followed the configurations given by OVH : https://help.ovhcloud.com/csm/fr-mx-plan-outlook-windows-configuration?id=kb_article_view&sysparm_article=KB0052099#rappel-des-parametres-pop-imap-et-smtp

I know these parameters work because it works for thunderbird and my android smartphone.

I tried the following parameters :

Any idea ? Best regards.

Dolibarr Version

20.0.1

Environment PHP

No response

Environment Database

No response

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

hregis commented 3 weeks ago

@borisboc can you try the port 143 and TLS?

borisboc commented 3 weeks ago

@borisboc can you try the port 143 and TLS?

Dear @hregis , thanks for your help. Saddly this does not work. Now I have the message : Failed to open IMAP connection {imap.mail.ovh.net:143/service=imap/tls/novalidate-cert}INBOX TLS/SSL failure for imap.mail.ovh.net: SSL negotiation failed I tried several variations (but always with port 143) : SSL, TLS, NOTLS, imap.mail.ovh.net, ssl0.ovh.net, with / without lib PHP-IMAP. Always failing.

SpookyDae commented 3 weeks ago

Hello @borisboc,

I've tried on two Dolibarr installations (20.01 on local Ubuntu and 18.0.4 online on OVH server) and I have no problem connecting to my OVH email address with the module.

Here's the configuration I used : dolibarr-emailcollector-config

It looks like a credential issue as I have the same error using a wrong password.

AKEOPLUS-boris-bocquet commented 3 weeks ago

Dear @SpookyDae , thanks for your reply.

Sure : that is also what I have for parameters :

image

And my credentials are OK because I use them for thunderbird, outlook and even the OVH webmail (round cube).

But thanks to you (because you talked about password) I found the problem : my password contains the < character and I guess the Dolibar and/or php implementation does not handle it properly.

May someone from Dolibar confirm / bugfix this ?