Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collector no longer moves the mails to accepted/refused folders #9893

Closed
2 tasks done
TylerVD opened this issue Nov 18, 2021 · 7 comments
Closed
2 tasks done

Collector no longer moves the mails to accepted/refused folders #9893

TylerVD opened this issue Nov 18, 2021 · 7 comments

Comments

@TylerVD
Copy link

TylerVD commented Nov 18, 2021

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

9.5.6

Bug description

Collecting mails don't remove them from the INBOX folders and create multiple duplicates of tickets and followups.

Same behavior from the cron, the automatic task or the button Get Email Tickets Now from Receivers setup page.

We did not make any changes and this malfunction appeared during the day.
I purged the accepted and refused folders to eliminate the cause of a duplicate mail but the error occurs on 90% of the new mails.
I also created 2 new folders with other names for the accepted/refused.

Relevant log output

Debug Mode Web page GeT Email Tickets Now Button:

PHP User Notice (1024): Invalid configuration for accepted folder in receiver [email protected] in /home/glpi/glpi-9.5.n/inc/mailcollector.class.php at line 1719
Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: unique id not found in /home/glpi/glpi-9.5.n/vendor/laminas/laminas-mail/src/Storage/Imap.php at line 312

Log from "/home/glpi/files/_log/php-errors.log"
[2021-11-18 16:50:32] glpiphplog.NOTICE:   *** PHP User Notice (1024): Invalid configuration for accepted folder in receiver [email protected] in /home/glpi/glpi-9.5.n/inc/mailcollector.class.php at line 1719
  Backtrace :
  inc/mailcollector.class.php:1719                   trigger_error()
  inc/mailcollector.class.php:915                    MailCollector->deleteMails()
  front/mailcollector.form.php:88                    MailCollector->collect()

[2021-11-18 16:50:32] glpiphplog.CRITICAL:   *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: unique id not found in /home/glpi/glpi-9.5.n/vendor/laminas/laminas-mail/src/Storage/Imap.php at line 312
  Backtrace :
  inc/mailcollector.class.php:1724                   Laminas\Mail\Storage\Imap->getNumberByUniqueId()
  inc/mailcollector.class.php:915                    MailCollector->deleteMails()
  front/mailcollector.form.php:88                    MailCollector->collect()

Page URL

No response

Steps To reproduce

Launch mail collecting from any means.

Your GLPI setup information

[code]   GLPI 9.5.6 ( => /home/glpi/glpi-9.5.n) Installation mode: TARBALL

Operating system: Linux RATTICKET2 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 PHP 7.3.31-1~deb10u1 fpm-fcgi (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apc, apcu, bz2, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, soap, sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib) Setup: max_execution_time="60" memory_limit="1024M" post_max_size="50M" safe_mode="" session.save_handler="files" upload_max_filesize="50M" Software: Apache () Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0 Server Software: Debian 10 Server Version: 10.3.29-MariaDB-0+deb10u1 Server SQL Mode: Parameters: [email protected]/glpi Host info: 172.16.1.24 via TCP/IP PHP version is at least 7.2.0 - Perfect! Sessions support is available - Perfect! Allocated memory > 64 Mio - Perfect! mysqli extension is installed ctype extension is installed fileinfo extension is installed json extension is installed mbstring extension is installed iconv extension is installed zlib extension is installed curl extension is installed gd extension is installed simplexml extension is installed intl extension is installed ldap extension is installed apcu extension is installed Zend OPcache extension is installed xmlrpc extension is installed exif extension is installed zip extension is installed bz2 extension is installed sodium extension is installed Database version seems correct (10.3.29) - Perfect! The log file has been created successfully. Write access to /home/glpi/glpi-9.5.n/files/_cache has been validated. Write access to /home/glpi/glpi-9.5.n/config has been validated. Write access to /home/glpi/glpi-9.5.n/files/_cron has been validated. Write access to /home/glpi/glpi-9.5.n/files has been validated. Write access to /home/glpi/glpi-9.5.n/files/_dumps has been validated. Write access to /home/glpi/glpi-9.5.n/files/_graphs has been validated. Write access to /home/glpi/glpi-9.5.n/files/_lock has been validated. Write access to /home/glpi/glpi-9.5.n/files/_pictures has been validated. Write access to /home/glpi/glpi-9.5.n/files/_plugins has been validated. Write access to /home/glpi/glpi-9.5.n/files/_rss has been validated. Write access to /home/glpi/glpi-9.5.n/files/_sessions has been validated. Write access to /home/glpi/glpi-9.5.n/files/_tmp has been validated. Write access to /home/glpi/glpi-9.5.n/files/_uploads has been validated. Write access to /home/glpi/glpi-9.5.n/marketplace has been validated. Web access to the files directory should not be allowed Check the .htaccess file and the web server configuration.

GLPI_ROOT: /home/glpi/glpi-9.5.n GLPI_CONFIG_DIR: /home/glpi/glpi-9.5.n/config GLPI_VAR_DIR: /home/glpi/glpi-9.5.n/files GLPI_MARKETPLACE_DIR: /home/glpi/glpi-9.5.n/marketplace GLPI_USE_CSRF_CHECK: 1 GLPI_CSRF_EXPIRES: 7200 GLPI_CSRF_MAX_TOKENS: 100 GLPI_USE_IDOR_CHECK: 1 GLPI_IDOR_EXPIRES: 7200 GLPI_ALLOW_IFRAME_IN_RICH_TEXT: GLPI_TELEMETRY_URI: https://telemetry.glpi-project.org GLPI_INSTALL_MODE: TARBALL GLPI_NETWORK_MAIL: [email protected] GLPI_NETWORK_SERVICES: https://services.glpi-network.com GLPI_MARKETPLACE_PRERELEASES: GLPI_MARKETPLACE_ALLOW_OVERRIDE: 1 GLPI_MARKETPLACE_MANUAL_DOWNLOADS: 1 GLPI_USER_AGENT_EXTRA_COMMENTS: GLPI_AJAX_DASHBOARD: 1 GLPI_CALDAV_IMPORT_STATE: 0 GLPI_DEMO_MODE: 0 GLPI_FORCE_EMPTY_SQL_MODE: 1 GLPI_DOC_DIR: /home/glpi/glpi-9.5.n/files GLPI_CACHE_DIR: /home/glpi/glpi-9.5.n/files/_cache GLPI_CRON_DIR: /home/glpi/glpi-9.5.n/files/_cron GLPI_DUMP_DIR: /home/glpi/glpi-9.5.n/files/_dumps GLPI_GRAPH_DIR: /home/glpi/glpi-9.5.n/files/_graphs GLPI_LOCAL_I18N_DIR: /home/glpi/glpi-9.5.n/files/_locales GLPI_LOCK_DIR: /home/glpi/glpi-9.5.n/files/_lock GLPI_LOG_DIR: /home/glpi/glpi-9.5.n/files/_log GLPI_PICTURE_DIR: /home/glpi/glpi-9.5.n/files/_pictures GLPI_PLUGIN_DOC_DIR: /home/glpi/glpi-9.5.n/files/_plugins GLPI_RSS_DIR: /home/glpi/glpi-9.5.n/files/_rss GLPI_SESSION_DIR: /home/glpi/glpi-9.5.n/files/_sessions GLPI_TMP_DIR: /home/glpi/glpi-9.5.n/files/_tmp GLPI_UPLOAD_DIR: /home/glpi/glpi-9.5.n/files/_uploads GLPI_NETWORK_REGISTRATION_API_URL: https://services.glpi-network.com/api/registration/ GLPI_MARKETPLACE_PLUGINS_API_URI: https://services.glpi-network.com/api/glpi-plugins/ GLPI_I18N_DIR: /home/glpi/glpi-9.5.n/locales GLPI_VERSION: 9.5.6 GLPI_SCHEMA_VERSION: 9.5.6 GLPI_MIN_PHP: 7.2.0 GLPI_YEAR: 2021

htmlawed/htmlawed version 1.2.5 in (/home/glpi/glpi-9.5.n/vendor/htmlawed/htmlawed) phpmailer/phpmailer version 6.1.6 in (/home/glpi/glpi-9.5.n/vendor/phpmailer/phpmailer/src) simplepie/simplepie version 1.5.6 in (/home/glpi/glpi-9.5.n/vendor/simplepie/simplepie/library) tecnickcom/tcpdf version 6.3.5 in (/home/glpi/glpi-9.5.n/vendor/tecnickcom/tcpdf) michelf/php-markdown in (/home/glpi/glpi-9.5.n/vendor/michelf/php-markdown/Michelf) true/punycode in (/home/glpi/glpi-9.5.n/vendor/true/punycode/src) iamcal/lib_autolink in (/home/glpi/glpi-9.5.n/vendor/iamcal/lib_autolink) sabre/dav in (/home/glpi/glpi-9.5.n/vendor/sabre/dav/lib/DAV) sabre/http in (/home/glpi/glpi-9.5.n/vendor/sabre/http/lib) sabre/uri in (/home/glpi/glpi-9.5.n/vendor/sabre/uri/lib) sabre/vobject in (/home/glpi/glpi-9.5.n/vendor/sabre/vobject/lib) laminas/laminas-cache in (/home/glpi/glpi-9.5.n/vendor/laminas/laminas-cache/src) laminas/laminas-i18n in (/home/glpi/glpi-9.5.n/vendor/laminas/laminas-i18n/src) laminas/laminas-serializer in (/home/glpi/glpi-9.5.n/vendor/laminas/laminas-serializer/src) monolog/monolog in (/home/glpi/glpi-9.5.n/vendor/monolog/monolog/src/Monolog) sebastian/diff in (/home/glpi/glpi-9.5.n/vendor/sebastian/diff/src) elvanto/litemoji in (/home/glpi/glpi-9.5.n/vendor/elvanto/litemoji/src) symfony/console in (/home/glpi/glpi-9.5.n/vendor/symfony/console) scssphp/scssphp in (/home/glpi/glpi-9.5.n/vendor/scssphp/scssphp/src) laminas/laminas-mail in (/home/glpi/glpi-9.5.n/vendor/laminas/laminas-mail/src/Protocol) laminas/laminas-mime in (/home/glpi/glpi-9.5.n/vendor/laminas/laminas-mime/src) rlanvin/php-rrule in (/home/glpi/glpi-9.5.n/vendor/rlanvin/php-rrule/src) blueimp/jquery-file-upload in (/home/glpi/glpi-9.5.n/vendor/blueimp/jquery-file-upload/server/php) ramsey/uuid in (/home/glpi/glpi-9.5.n/vendor/ramsey/uuid/src) psr/log in (/home/glpi/glpi-9.5.n/vendor/psr/log/Psr/Log) psr/simple-cache in (/home/glpi/glpi-9.5.n/vendor/psr/simple-cache/src) mexitek/phpcolors in (/home/glpi/glpi-9.5.n/vendor/mexitek/phpcolors/src/Mexitek/PHPColors) guzzlehttp/guzzle in (/home/glpi/glpi-9.5.n/vendor/guzzlehttp/guzzle/src) guzzlehttp/psr7 in (/home/glpi/glpi-9.5.n/vendor/guzzlehttp/psr7/src) wapmorgan/unified-archive in (/home/glpi/glpi-9.5.n/vendor/wapmorgan/unified-archive/src) paragonie/sodium_compat in (/home/glpi/glpi-9.5.n/vendor/paragonie/sodium_compat/src) phpCas version 1.3.6 in (/usr/share/php/CAS/source)

Way of sending emails: SMTP+TLS (SUPPORT-IT@[email protected])

Name: '[email protected]' Active: Yes Server: '{outlook.office365.com:993/imap/ssl/notls}INBOX' Login: '[email protected]' Password: Yes Name: '[email protected]' Active: No Server: '{webmail2.ratpdev.com:993/imap/ssl/validate-cert}' Login: 'ratpdev\glpi.test' Password: Yes Name: '[email protected]' Active: No Server: '{outlook.office365.com:993/imap/ssl/notls}' Login: '[email protected]' Password: Yes

news Name: Alertes Version: 1.9.0 State: Enabled webapplications Name: Applications Web Version: 3.0.0 State: Enabled behaviors Name: Comportements Version: 2.5.0 State: Enabled formcreator Name: Form Creator Version: 2.12.2 State: Enabled mailanalyzer Name: Mail Analyzer Version: 2.0.2 State: Not installed ocsinventoryng Name: OCS Inventory NG Version: 1.7.3 State: Enabled dashboard Name: Tableau de bord Version: 1.0.2 State: Enabled

Host: 172.16.1.24Connection: OkUse the OCSNG software dictionary: No

/home/glpi/glpi-9.5.n/files/_locales/formcreator/form_7_fr_FR.php /home/glpi/glpi-9.5.n/files/_locales/formcreator/form_8_fr_FR.php
[/code]

Anything else?

No response

@cedric-anne
Copy link
Member

Hi,

PHP User Notice (1024): Invalid configuration for accepted folder in receiver [email protected]

You should check your mail collector configuration. This message appears when connector is not able access the configured folder.

Regards

@TylerVD
Copy link
Author

TylerVD commented Nov 19, 2021

Hi @cedric-anne ,
We switched to OAuth Azure, however, we had the same error messages.

We restarted the whole server (debian) to make them disappear. (We didn't try to restart apache and php, which might have been enough).
Maybe some cache or traces of the old protocol used (IMAP).
Maybe you should check this behavior and communicate it in the documentation if it is confirmed. As you wish.

Sorry for the false alarm, this issue can be closed.

@cedric-anne
Copy link
Member

OK,

I will try to investigate on this.

Regards

@ftoledo
Copy link

ftoledo commented Feb 6, 2023

hi @TylerVD !

I found same issue recently on 10.0.6 with Azure+ouath2 account.
The accepted and rejected folders was created via imap.. I can access and copy/move messages via imap
I Test using mutt and email-outh2-proxy (https://github.com/simonrob/email-oauth2-proxy)

Enabling debug mode I found that error al php-log:

[2023-02-06 22:35:23] glpiphplog.CRITICAL:   *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: unique id not found in /var/www/html/vendor/laminas/laminas-mail/src/Storage/Imap.php at line 314
  Backtrace :
  src/MailCollector.php:1834                         Laminas\Mail\Storage\Imap->getNumberByUniqueId()
  src/MailCollector.php:645                          MailCollector->deleteMails()
  src/NotImportedEmail.php:127                       MailCollector->deleteOrImportSeveralEmails()
  src/MassiveAction.php:1408                         NotImportedEmail::processMassiveActionsForOneItemtype()
  src/MassiveAction.php:1386                         MassiveAction->processForSeveralItemtypes()
  front/massiveaction.php:59                         MassiveAction->process()

Our setup have up to 6 receivers and each have you "glpi-aceptados" and "glpi-rechazados" folders.

Has this problem happened to you again?

@ftoledo
Copy link

ftoledo commented Feb 24, 2024

Hi people!
I can reproduce again on 10.0.10, in that instance I use the oauth2 plugin directly to 365 (without proxy).
The problem started again yesterday
I already restart services apache + php-fpm
I haven't rebooted the server yet, but restarting the production server doesn't seem like the best solution to me.

My environment:

OS is centos 9
PHP 8.0.30 (cli) (built: Aug  3 2023 17:13:08) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.30, Copyright (c), by Zend Technologies

[PHP Modules]
apcu
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
sockets
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
php.x86_64                           8.0.30-1.el9              @appstream            
php-cli.x86_64                       8.0.30-1.el9              @appstream            
php-common.x86_64                    8.0.30-1.el9              @appstream            
php-fpm.x86_64                       8.0.30-1.el9              @appstream            
php-gd.x86_64                        8.0.30-1.el9              @appstream            
php-intl.x86_64                      8.0.30-1.el9              @appstream            
php-ldap.x86_64                      8.0.30-1.el9              @appstream            
php-mbstring.x86_64                  8.0.30-1.el9              @appstream            
php-mysqlnd.x86_64                   8.0.30-1.el9              @appstream            
php-opcache.x86_64                   8.0.30-1.el9              @appstream            
php-pdo.x86_64                       8.0.30-1.el9              @appstream            
php-pecl-apcu.x86_64                 5.1.20-5.el9              @appstream            
php-pecl-zip.x86_64                  1.19.2-6.el9              @appstream            
php-sodium.x86_64                    8.0.30-1.el9              @epel                 
php-xml.x86_64                       8.0.30-1.el9              @appstream  

	oauthimap            Name: Oauth IMAP                     Version: 1.4.3      State: Enabled                                 
		Install Method: Marketplace

Authetication seem to be ok.. because it login a get the messages.

The folders are seen and I can selected from the configuration

imagen

If you have any other ideas to try, it would be appreciated.

@ftoledo
Copy link

ftoledo commented Feb 26, 2024

rebooting server wont solve this. I solve only the GLPIKEY warning when recreating the collector configuraction.
but the messages still at inbox
can be a 365 server side problem?

@ftoledo
Copy link

ftoledo commented Mar 8, 2024

hi @TylerVD restarting server is not the solution, please read the reference ticket from laminas:
laminas/laminas-mail#260 from @poojaajudia comments section.

@glpi-project glpi-project locked as resolved and limited conversation to collaborators Mar 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants