tomolimo / mailanalyzer

Mail Analyzer GLPI Plugin may be used to combine CC mails into one Ticket
25 stars 10 forks source link

GLPi 9.1.1: will create followups in wrong tickets #7

Closed sebfun closed 7 years ago

sebfun commented 7 years ago

Hi

Users who sends mails to helpdesk collector are mixed to existing mails (followups are added to existing tickets) I deactivated the plugin

Here's my configuration

[code]

GLPI 9.1.1 (/glpi => D:\xampp\htdocs\glpi)

Server

Operating system: Windows NT xxxxxxxxxx 5.2 build 3790 (Windows Server 2003 Standard Edition Service Pack 2) i586 PHP 5.4.31 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, apache2handler, bcmath, bz2, calendar, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, odbc, openssl, pcre, pdo_mysql, pdo_sqlite, session, soap, sockets, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib) Setup: max_execution_time="60" memory_limit="512M" post_max_size="16M" safe_mode="" session.save_handler="files" upload_max_filesize="15M" Software: Apache/2.4.10 (Win32) mod_authnz_sspi/0.1.0 OpenSSL/1.0.1h PHP/5.4.31 (Apache/2.4.10 (Win32) mod_authnz_sspi/0.1.0 OpenSSL/1.0.1h PHP/5.4.31 Server at xxxxxxxxxxxxxx Port 80) Mozilla/5.0 (Windows NT 6.1; rv:49.0) Gecko/20100101 Firefox/49.0 Server Software: MySQL Community Server (GPL) Server Version: 5.5.39 Server SQL Mode: Parameters: root@localhost/glpi Host info: localhost via TCP/IP

OKD:\xampp\htdocs\glpi/config : OK OKD:\xampp\htdocs\glpi/files : OK OKD:\xampp\htdocs\glpi/files/_dumps : OK OKD:\xampp\htdocs\glpi/files/_sessions : OK OKD:\xampp\htdocs\glpi/files/_cron : OK OKD:\xampp\htdocs\glpi/files/_graphs : OK OKD:\xampp\htdocs\glpi/files/_lock : OK OKD:\xampp\htdocs\glpi/files/_plugins : OK OKD:\xampp\htdocs\glpi/files/_tmp : OK OKD:\xampp\htdocs\glpi/files/_rss : OK OKD:\xampp\htdocs\glpi/files/_uploads : OK OKD:\xampp\htdocs\glpi/files/_pictures : OK OKD:\xampp\htdocs\glpi/files/_log : OK

Libraries

htmLawed version 1.1.21 in (D:\xampp\htdocs\glpi\lib\htmlawed) phpCas version 1.3.4 in (D:\xampp\htdocs\glpi\vendor\jasig\phpcas\source) PHPMailer version 5.2.16 in (D:\xampp\htdocs\glpi\vendor\phpmailer\phpmailer) Zend Framework in (D:\xampp\htdocs\glpi\vendor\zendframework\zend-loader\src) zetacomponents/graph in (D:\xampp\htdocs\glpi\vendor\zetacomponents\graph\src) SimplePie version 1.4.1 in (D:\xampp\htdocs\glpi\vendor\simplepie\simplepie\library) TCPDF version 6.2.12 in (D:\xampp\htdocs\glpi\vendor\tecnickcom\tcpdf) ircmaxell/password-compat in (D:\xampp\htdocs\glpi\vendor\ircmaxell\password-compat\lib) ramsey/array_column in (D:\xampp\htdocs\glpi\vendor\ramsey\array_column\src) michelf/php-markdown in (D:\xampp\htdocs\glpi\vendor\michelf\php-markdown\Michelf) true/punycode in (D:\xampp\htdocs\glpi\vendor\true\punycode\src) iacaml/autolink in (D:\xampp\htdocs\glpi\vendor\iamcal\lib_autolink) sabre/vobject in (D:\xampp\htdocs\glpi\vendor\sabre\vobject\lib)

LDAP directories

Server: 'ldap://xxxxxxxx', Port: '389', BaseDN: 'OU=Utilisateurs & Groupes,OU=xwxxxxxx', Connection filter: none, RootDN: 'xxxxxxxxxxxxxx', Use TLS: none

SQL replicas

Not active

Notifications

Way of sending emails: SMTP (anonymous@xxxxxxx)

Mails receivers

Name: 'xxxxxxxxxxxx' Active: Yes Server: '{xxxxxxxxx/pop}' Login: '' Password: Yes

Plugins list

addressing Name: Adressage IP Version: 2.3.0 State: Not installed financialreports Name: Arrêté du parc Version: 2.3.0 State: Enabled badges Name: Badges Version: 2.2.0 State: Enabled databases Name: Bases de données Version: 1.9.0 State: Enabled accounts Name: Comptes Version: 2.2.0 State: Enabled airwatch Name: Connecteur Airwatch pour GLPi Version: 0.90+1.1 State: Not activated consumables Name: Demande de consommables Version: 1.2.0 State: Enabled domains Name: Domaines Version: 1.8.0 State: Enabled escalade Name: Escalades Version: 2.1.0 State: Enabled fusioninventory Name: FusionInventory Version: 9.1+1.0 State: Enabled genericobject Name: Gestion d'objets Version: 2.4.0 State: Enabled racks Name: Gestion de baies Version: 1.7.0 State: Enabled simcard Name: Gestion de cartes SIM Version: 1.4.2 State: Enabled manufacturersimports Name: Imports fabricants Version: 1.9.0 State: Enabled mailanalyzer Name: Mail Analyzer Version: 1.2.4 State: Not activated moreticket Name: More ticket Version: 1.2.3 State: Enabled mreporting Name: Plus de rapports Version: 1.3.1 State: Enabled[/code]

I see in sender's mail that she was responding to another ticket number and the plugin has merged to another ticket number

tomolimo commented 7 years ago

Hello, To explain internal email mechanism: each email client/server is sending an internal guid to identify the sent email in a unique way. When a person answers to an email, it is normally using the same internal guid (but it depends on the email client). and the mailanalyser plugin is collecting and using these internal guid to merge the emails into existing tickets (it will create followups).

The only way to reproduce the behavior you descrided is: Could you check if, she had used an existing notification email to send back information to GLPi, but changing the ticket number?

Thank you, Tomolimo

sebfun commented 7 years ago

désolé je réponds en français (plus pratique pour moi) alors oui elle a fait un transfert d'un mail déjà reçu contenant un ticket résolu

Sauf que sa réponse s'est mise dans un ticket n° 1565. Je peux vous l'envoyer en mp si vous voulez ?

Dans le helpdesk cela apparaît ainsi (j'ai masqué les noms) :

``-----Transféré par V. le 25/11/2016 08:16 ----- A : V. De : Helpdesk Date : 21/11/2016 09:20 Objet : [helpdeksk #0001515] Nouveau ticket : Tr : Re: [helpdesk #0001489] Ticket résolu :

=-=-=-= Pour répondre par courriel, écrivez au dessus de cette ligne =-=-=-=

Nouveau ticket : Tr : Re: [helpdesk #0001489] Ticket résolu : Demande : Bonjour, ``

tomolimo commented 7 years ago

oui, stp, merci

sebfun commented 7 years ago

Message envoyé via GLPI mais je ne sais pas si c'est passé pas de message de confirmation.

Sinon voici la copie d'écran où j'ai enlevé les noms : http://www.cjoint.com/c/FKzlnPBac7k

tomolimo commented 7 years ago

Hello, To investigate deeper this bug, could you search into the database in the glpi_plugin_mailanalyzer_message_idif there is an empty record like following:

image

if yes, could you try to delete this line it may be the root cause for the bug. thank you Regards, Tomolimo

sebfun commented 7 years ago

alors il y a effectivement une ligne vide portant le ticket_id n° 1565 et dont l'id est 3 Ligne supprimée

Après suppression il reste 4 lignes ayant l'id 1, 2, 4 et 5 Je réactive le plugin ?

tomolimo commented 7 years ago

Yes, please, I believe there is a bug, as no empty lines should have been created, so I'll check that and provide a fix for it.

sebfun commented 7 years ago

Done

sebfun commented 7 years ago

You must not reactivate the plugin cause it's continuing to mix tickets.....

tomolimo commented 7 years ago

Hello One more explanation: using an existing email and changing the subject will reset the internal guid used to follow the conversation, the plugin mailanalyzer in this case has no way to identify correctly the initial email and such the initial ticket. In this case, the plugin will let GLPi decides what to do with this email, and in this case GLPi may create a new ticket if the one referenced by the number in the subject is closed, or add a followup if ticket is not closed. regards, Tomolimo

tomolimo commented 7 years ago

Seems fixed by 227eb647dacab1be4b7cf6ab680165be82fae6ca

tomolimo commented 7 years ago

Hello, Latest release really fixes this issue, and don't forget to delete empty lines in table Regards, Tomolimo