Closed tizianosartori closed 4 years ago
You should check your imap server logs, and make sure connexion is ok from sever.
This looks like a network connection error rather than a GLPI issue; I close.
The network is the same before the upgrade from 9.4. After upgrade mailcollector stop working.
OK, I cannot make any checks instead of you anyways.
Error is your GLPI server cannot connect to Gwr01
. There are test to do like using the IP instead of a host name, etc; to make sure everything is OK.
Feel free to reopen the issue when you have more information on how to reproduce.
Maybe the new laminas-mail
component ignore the NO-VALIDATE-CERT option?
No; and there is nothing in provided data that can let think about any SSL certificate. I guess it would not change anything you remove it.
Without SSL on port 143 the error is:
[2020-07-08 16:24:47] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\RuntimeException: cannot login, user or password wrong in /var/www/glpi/vendor/laminas/laminas-mail/src/Storage/Imap.php at line 218 Backtrace : inc/toolbox.class.php:2323 Laminas\Mail\Storage\Imap->__construct() inc/mailcollector.class.php:1290 Toolbox::getMailServerStorageInstance() inc/mailcollector.class.php:667 MailCollector->connect() front/mailcollector.form.php:77 MailCollector->collect()
but i'm sure that the password is good. Maybe the field get not stored correctly on database?
NO VALIDATE option was ignored
[2020-07-08 17:37:32] glpiphplog.WARNING: *** PHP Warning (2): stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in /var/www/glpi/vendor/laminas/laminas-mail/src/Protocol/Imap.php at line 106
Sounds strange, this is used in IMAP unit tests, and as far as I remember, this was required; so that should work. I reopen the issue, no idea what's wrong.
i have this error too.
[2020-07-09 11:42:39] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\RuntimeException: cannot login, user or password wrong in /var/www/html/glpi/vendor/laminas/laminas-mail/src/Storage/Imap.php at line 218
updated to 9.5.0 and mailgate doesn't work anymore. user and password are verified to be correct, i even changed the password for testing this. Before the update everything worked fine.
Mail Backend is Exchange 2013 on premise.
IMAP Log:
"TAG1 BAD Command received in Invalid state."
Hi,
Can you give us which params you are using here ?
Regards
I can confirm mailgate works if use a valid SSL certificate. I think the problem is the "NO VALIDATE" option.
I can confirm mailgate works if use a valid SSL certificate. I think the problem is the "NO VALIDATE" option.
Indeed, looking at the code, this is not handled in the new dependency we use to replace usage of obsolete php-imap extension.
A solution may be to override the class to do something like https://github.com/laminas/laminas-mail/issues/63 .
I also figure that the 'norsh', 'secure' and 'debug' options may have no effet.
There were already a fix proposal on Zend-Mail; I've requested a new one (with same existing code); see: https://github.com/laminas/laminas-mail/pull/94
Another error on same laminas component
[2020-07-10 11:49:10] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name reply-to or reply-to not found in /var/www/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307
I don't know if is a new issue or not.
The same applies here! After Upgrade 9.4 to 9.5 Mailgate works for 20h (I made 5 E-mail tests) and after that get stuck. Recovered to 9.4 and it works again. Annoying!!
Another error on same laminas component
[2020-07-10 11:49:10] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name reply-to or reply-to not found in /var/www/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307
I don't know if is a new issue or not.
Same error for me, GLPI 9.5.0 Help... :-)
Another error on same laminas component
[2020-07-10 11:49:10] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name reply-to or reply-to not found in /var/www/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307
I don't know if is a new issue or not.
This is another issue and it has been fixed in #7652 (see #7643 ).
Another error on same laminas component
[2020-07-10 11:49:10] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name reply-to or reply-to not found in /var/www/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307
I don't know if is a new issue or not.This is another issue and it has been fixed in #7652 (see #7643 ).
Thanks !!! 👍 i have replace inc/mailcollector.class.php with the last fix
I recently updated to 9.5 using IMAP and works fine
{mail.mydomain.com:993/imap/ssl/validate-cert}FOLDER
I recently updated to 9.5 using IMAP and works fine
{mail.mydomain.com:993/imap/ssl/validate-cert}FOLDER
If you have not self-signed certificate it will. For example I have to use self-sighted certificate or from local Windows CA, it doesn't work. Furthermore, if you will disable certificate check it will produce an error in log, that login or password is wrong. (Mail Server Exchange 2010/2016).
Interesting!
After upgrade from 9.4 to 9.5 I made www-data as owner for glpi folder recursive. After run: sudo -u www-data /usr/bin/php /var/www/html/glpi/front/cron.php I get:
Uncaught Exception Laminas\Cache\Exception\RuntimeException: Error opening file '/var/www/html/glpi/files/_cache/cache_trans/glpi_cache_trans_9.5.0ce6dddfb1e143d3cf64c47f81bba6781-38/glpi_cache_trans_9.5.0ce6dddfb1e143d3cf64c47f81bba6781-Laminas_I18n_Translator_Messages_31ebc1a09507bf4ac4680c9eb82c177a.dat' in /var/www/html/glpi/vendor/laminas/laminas-cache/src/Storage/Adapter/Filesystem.php at line 1581
after rerun "chown ww-data glpi/ -R" again, it works. Which user create this cache?
[2020-07-15 13:16:06] glpiphplog.CRITICAL: *** Uncaught Exception Error: Call to a member function getEmail() on bool in /var/www/html/inc/mailcollector.class.php at line 1407 Backtrace : inc/mailcollector.class.php:912 MailCollector->getHeaders() inc/mailcollector.class.php:711 MailCollector->buildTicket() inc/mailcollector.class.php:1725 MailCollector->collect() inc/crontask.class.php:847 MailCollector::cronMailgate() front/crontask.form.php:49 CronTask::launch()
Any ideas?
Which user create this cache?
The one you use.
Frequently, users setups cron with any default user (root...) and then does not understand why webserver cannot access logs or cache. BTW; this is not related to current issue.
See #7693; closing this one as it is very unclear and refers to several issues.
[2020-07-15 13:16:06] glpiphplog.CRITICAL: *** Uncaught Exception Error: Call to a member function getEmail() on bool in /var/www/html/inc/mailcollector.class.php at line 1407 Backtrace : inc/mailcollector.class.php:912 MailCollector->getHeaders() inc/mailcollector.class.php:711 MailCollector->buildTicket() inc/mailcollector.class.php:1725 MailCollector->collect() inc/crontask.class.php:847 MailCollector::cronMailgate() front/crontask.form.php:49 CronTask::launch()
Any ideas?
I think is has been fixed yet in #7652.
My news post #7790 it's the same problem
I recently updated to 9.5 using IMAP and works fine
{mail.mydomain.com:993/imap/ssl/validate-cert}FOLDER
If you have not self-signed certificate it will. For example I have to use self-sighted certificate or from local Windows CA, it doesn't work. Furthermore, if you will disable certificate check it will produce an error in log, that login or password is wrong. (Mail Server Exchange 2010/2016).
I have the same issue, there is any fix for that ? I'm on Exchange 2016 and GLPI 10.0.5
@MathysLioson
Please open a new issue and give all requested information.
`#0 /var/www/glpi/vendor/laminas/laminas-mail/src/Storage/Imap.php(216): Laminas\Mail\Protocol\Imap->connect('ssl://Gwr01', 993, 'ssl')
1 /var/www/glpi/inc/toolbox.class.php(2323): Laminas\Mail\Storage\Imap->__construct(Object(stdClass))
2 /var/www/glpi/inc/mailcollector.class.php(1290): Toolbox::getMailServerStorageInstance('imap', Array)
3 /var/www/glpi/inc/mailcollector.class.php(667): MailCollector->connect()
4 /var/www/glpi/inc/mailcollector.class.php(1725): MailCollector->collect(2)
5 /var/www/glpi/inc/crontask.class.php(847): MailCollector::cronMailgate(Object(CronTask))
6 /var/www/glpi/front/cron.php(83): CronTask::launch(2, '15')
7 {main} {"user":"@glpi"}
[2020-07-08 13:26:07] glpiphplog.ERROR: MailCollector::collect() in /var/www/glpi/inc/mailcollector.class.php line 669`
Mails receivers Name: 'Glpi@stetspa.it' Active: Yes Server: '{Gwr01/imap/ssl/novalidate-cert}INBOX' Login: 'glpi' Password: Yes
An error occured trying to connect to collector. cannot connect to host ; error = fsockopen(): unable to connect to ssl://Gwr01:993 (Unknown error) (errno = 0 )