Closed JordanReich closed 7 months ago
I think I am facing the same as problem (1), but slightly different: Mailcollector is obtaining a mail via IMAP, a few mails have no body, others from the same sender do have a body, the only difference I see betweeen these mails are a few Header-lines. I am adding some files for clarification, this is a Ticket where the Mail-Body was somehow removed: This is a ticket from the same sender, it has a Body: And here are the Mail-Source files for reference: Mail with missing body: mailnobody.txt Mail with the body correctly displayed mailwithbody.txt
I think I am facing the same as problem (1), but slightly different
If you aren't seeing the same error in files/_log/php-errors.log as seen in the original bug report, you should open a separate bug report.
As of 10.0.12 i can not reproduce the "omitted body" behavior anymore
I have the same problem when my automatic collector collects the emails it creates the ticket without description just the title
php_error.log :
Warning: Undefined variable $data in E:\wamp64\www\glpi\vendor\laminas\laminas-mail\src\Protocol\Imap.php on line 598 PHP Stack trace: PHP 1. {main}() E:\wamp64\www\glpi\front\cron.php:0 PHP 2. CronTask::launch($mode = 2, $max = '10', $name = uninitialized) E:\wamp64\www\glpi\front\cron.php:84 PHP 3. MailCollector::cronMailgate($task = class CronTask { public $dohistory = TRUE; private $timer = 1709024373.1832; private $startlog = 16391571; private $volume = 0; public $fields = ['id' => 9, 'itemtype' => 'MailCollector', 'name' => 'mailgate', 'frequency' => 60, 'param' => 10, 'state' => 1, 'mode' => 2, 'allowmode' => 3, 'hourmin' => 0, 'hourmax' => 24, 'logs_lifetime' => 10, 'lastrun' => '2024-02-27 09:58:00', 'lastcode' => NULL, 'comment' => '', 'date_mod' => '2024-02-26 12:54:47', 'date_creation' => NULL, 'ISPLUGIN' => 0]; public $input = []; public $updates = []; public $oldvalues = []; public $history_blacklist = []; public $auto_message_on_action = TRUE; public $no_form_page = FALSE; public $additional_fields_for_dictionnary = []; protected $fkfield = ''; protected $searchopt = FALSE; public $taborientation = 'vertical'; public $get_item_to_display_tab = TRUE; protected $usenotepad = FALSE; public $deduplicate_queued_notifications = TRUE; public $right = NULL; protected $type = -1; protected $displaylist = TRUE; public $showdebug = FALSE }) E:\wamp64\www\glpi\src\CronTask.php:1018 PHP 4. MailCollector->collect($mailgateID = 6, $display = uninitialized) E:\wamp64\www\glpi\src\MailCollector.php:1852 PHP 5. MailCollector->buildTicket($uid = 30858, $message = class Laminas\Mail\Storage\Message { protected $flags = ['\Recent' => '\Recent']; protected $headers = class Laminas\Mail\Headers { private $headerLocator = class Laminas\Mail\Header\HeaderLocator { ... }; protected $pluginClassLoader = NULL; protected $headersKeys = [...]; protected $headers = [...]; protected $encoding = 'ASCII' }; protected $content = NULL; protected $topLines = ''; protected $parts = []; protected $countParts = 0; protected $iterationPos = 1; protected $mail = class Laminas\Mail\Storage\Imap { protected $protocol = class Laminas\Mail\Protocol\Imap { ... }; protected $currentFolder = 'INBOX'; protected $delimiter = NULL; protected $has = [...]; protected $iterationPos = 2; protected $iterationMax = 1; protected $messageClass = 'Laminas\Mail\Storage\Message' }; protected $messageNum = 1 }, $options = ['mailgates_id' => 6, 'play_rules' => TRUE]) E:\wamp64\www\glpi\src\MailCollector.php:767 PHP 6. MailCollector->getBody($message = class Laminas\Mail\Storage\Message { protected $flags = ['\Recent' => '\Recent']; protected $headers = class Laminas\Mail\Headers { private $headerLocator = class Laminas\Mail\Header\HeaderLocator { ... }; protected $pluginClassLoader = NULL; protected $headersKeys = [...]; protected $headers = [...]; protected $encoding = 'ASCII' }; protected $content = NULL; protected $topLines = ''; protected $parts = []; protected $countParts = 0; protected $iterationPos = 1; protected $mail = class Laminas\Mail\Storage\Imap { protected $protocol = class Laminas\Mail\Protocol\Imap { ... }; protected $currentFolder = 'INBOX'; protected $delimiter = NULL; protected $has = [...]; protected $iterationPos = 2; protected $iterationMax = 1; protected $messageClass = 'Laminas\Mail\Storage\Message' }; protected $messageNum = 1 }) E:\wamp64\www\glpi\src\MailCollector.php:1092 PHP 7. Laminas\Mail\Storage\Part->rewind() E:\wamp64\www\glpi\src\MailCollector.php:1742 PHP 8. Laminas\Mail\Storage\Part->countParts() E:\wamp64\www\glpi\vendor\laminas\laminas-mail\src\Storage\Part.php:471 PHP 9. Laminas\Mail\Storage\Part->cacheContent() E:\wamp64\www\glpi\vendor\laminas\laminas-mail\src\Storage\Part.php:249 PHP 10. Laminas\Mail\Storage\Imap->getRawContent($id = 1, $part = uninitialized) E:\wamp64\www\glpi\vendor\laminas\laminas-mail\src\Storage\Part.php:175 PHP 11. Laminas\Mail\Protocol\Imap->fetch($items = 'RFC822.TEXT', $from = 1, $to = uninitialized, $uid = uninitialized) E:\wamp64\www\glpi\vendor\laminas\laminas-mail\src\Storage\Imap.php:162
@zzouhair10
Could you attach here an eml file that contains the email raw contents?
=-=-=-= Pour répondre par courriel, écrivez au dessus de cette ligne =-=-=-=
URL : https://partage/glpi/index.php?redirect=ticket_7438&noAUTO=1 Ticket : Description
Titre :Test Demandeurs : ZEBTA Zouhair Date d'ouverture :2024-02-27 09:16 Date de clôture : Source de la demande :E-Mail
Élément rattaché :
Statut : Nouveau
Urgence : Moyenne Impact : Moyen Priorité : Moyenne
Pas de catégorie attribuée Description :
Nombre de suivis : 0 Nombre de tâches : 0
--
Généré automatiquement par GLPI
==== Pour répondre par courriel, écrivez en dessous de cette ligne ====
Répondre
Transférer Volet des participants fermé
We need the source email into eml format to be able to inject it in the mail collector.
I am not able to reproduce the issue.
As @JordanReich stated that he was able to fix its initial issue and as @brlx74 stated that his issue was resolved in GLPI 10.0.12, I consider the initial issue fixed.
@zzouhair10 If you still reproduce the issue in GLPI 10.0.12, please open a new issue with all requested details, including the source email that can be used to reproduce your issue (the email corresponding to the notification generated by GLPI does not really help).
Code of Conduct
Is there an existing issue for this?
Version
10.0.10
Bug description
I have (2) issues in GLPI that I believe are related. We ingest most tickets through email and a minority through the Service Catalog (form) offerings.
If we receive an email initiating a NEW ticket, the mail receiver will process the ticket, but the ticket's body is wholly omitted. Rules that are setup fire correctly, and I have attempted to disable the rules and adjust all of the attachment and creation sizes for email, and the problem remains unchanged. The subject carriers into the ticket, and the requester is set accurately, but absolutely no details from the ticket's body.
If we receive an email responding to an EXISTING ticket, the email remains in the inbox and is never collected by the email receiver. Checking the logs, it does, in fact, see the email and also reports an error on the email it sees. No action is taken.
Relevant log output
Page URL
N.A.
Steps To reproduce
Setup an IMAP email receiver IMAP, -----, NO-TLS, NO-VALIDATE-CERT, -----, -----, DEBUG
Your GLPI setup information
Information about system installation & configuration
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?
This problem was RESOLVED by switching the email protocol port from IMAP to POP. So, I'm unsure if this is a bug with the IMAP component or specific to my environment. Either way, it might be helpful to report the issue.