glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.24k stars 1.29k forks source link

Mail receiver error #12574

Closed Mcmania1 closed 2 years ago

Mcmania1 commented 2 years ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.2 and older

Bug description

Mail import error, how to include .eml

Relevant log output

glpiphplog.CRITICAL:   *** Uncaught Exception Laminas\Mail\Header\Exception\InvalidArgumentException: Invalid header value detected in  /public_html/vendor/laminas/laminas-mail/src/Header/GenericHeader.php at line 59
  Backtrace :
  vendor/laminas/laminas-mail/src/Headers.php:545    Laminas\Mail\Header\GenericHeader::splitHeaderLine()
  vendor/laminas/laminas-mail/src/Headers.php:281    Laminas\Mail\Headers->loadHeader()
  vendor/laminas/laminas-mail/src/Headers.php:122    Laminas\Mail\Headers->addHeaderLine()
  vendor/laminas/laminas-mime/src/Decode.php:162     Laminas\Mail\Headers::fromString()
  ...r/laminas/laminas-mail/src/Storage/Part.php:106 Laminas\Mime\Decode::splitMessage()
  ...laminas/laminas-mail/src/Storage/Message.php:47 Laminas\Mail\Storage\Part->__construct()
  ...r/laminas/laminas-mail/src/Storage/Imap.php:121 Laminas\Mail\Storage\Message->__construct()
  ...aminas-mail/src/Storage/AbstractStorage.php:270 Laminas\Mail\Storage\Imap->getMessage()
  src/MailCollector.php:725                          Laminas\Mail\Storage\AbstractStorage->current()
  front/mailcollector.form.php:103                   MailCollector->collect()

#############eml##############
Return-path: <d.vinnik@alterragroup.com.ua>
Envelope-to: office@smart-city.com.ua
Delivery-date: Wed, 31 Aug 2022 20:06:46 +0300
Received: from mail-ej1-f41.google.com ([209.85.218.41])
    by www01-mail.smart-city.com.ua with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
    (Exim 4.93)
    (envelope-from <d.vinnik@alterragroup.com.ua>)
    id 1oTRAr-00265S-PL
    for office@smart-city.com.ua; Wed, 31 Aug 2022 20:06:46 +0300
Received: by mail-ej1-f41.google.com with SMTP id cu2so29771194ejb.0
        for <office@smart-city.com.ua>; Wed, 31 Aug 2022 10:06:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=alterragroup.com.ua; s=google;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:from:to:cc;
        bh=VIY20Oykw4xw21JDvAgNlqSpoPoU0jpt3TBb5Ti/RrI=;
        b=NMM7qsNDEd/B7FzPQWTYXO8ZOYDTnJiOVA8ezGPADiQQgBVVjb8UDn+hiU7VN4yF8z
         Hr0w0EJdyoA2ju65xNpPq4VzFsv6WhnUfzJeNUNZLCs7wONIuBdoogAH/jQH06t/9b8C
         iBxzzy6ZyWnr2mEInsMMpWZyyzgQ+whD9b4UywXMameuCv1Z8D/5bFmUw3aWBXFM/otK
         R5lDHHnpC0Rng723CLF3g77l4DI+/P9SKd5e2+AYLrz/NYnKnWaGWTQmbjvfsqZTVDLk
         gEV1RltvlyM+GmJ32LzTZBuzYDG/WtAxPc8Y0t9pEPtmhUbT6MT+PGSWyED2aU8F2fdH
         KBvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:x-gm-message-state:from:to:cc;
        bh=VIY20Oykw4xw21JDvAgNlqSpoPoU0jpt3TBb5Ti/RrI=;
        b=7KVQ8QRzV3wTbpqr08GaEiHU3elHumGFniSevXwPULu68Gjw3ET6FGJW3r9MIl8bvg
         67bYLNtGmV4wEQeFfcFYNlZupd97112JeYz4cCsMRHOxOzpCejv24cCyLW1CSlPQXYJC
         7XrmmcpcR3sel1/dvbB7Hbk0e+qznPPi+U3SDz/TmZSIFgQjKQUP4NT9E6DsWTWXyqpr
         Rcwl8UJApr+vRwfYsP+qt9SM8c+x9GqBfjTO+4dwWvnrfUbFN6s3QNY/+gLRdxbia7xF
         xVnWLja5DXgsLitGsy5ymBN5sg+txVosnYoShLya8M3xuvV8PAVTXHb3tp2l4gpSTqyf
         UYfA==
X-Gm-Message-State: ACgBeo2SRTyUDjERhNdsUI/t7mRWR5l0NZ7o+9wKLQgq9jcT2BVPLgrH
    TeCPzYUpy+F8LhWd9dw/oRnPmJUJDFJc5rMRYKsHW4FF33vDgg==
X-Google-Smtp-Source: AA6agR4HecuH7RUR/TywikjOVLZBM4I2pBqr/unjpHRf/hZJEniT89l/d0r7fxS64XCdqSMJ+kO8fXJ9I+sNvMU9QHQ=
X-Received: by 2002:a17:907:2c4f:b0:741:5b68:e2dd with SMTP id
 hf15-20020a1709072c4f00b007415b68e2ddmr5761582ejc.513.1661965604487; Wed, 31
 Aug 2022 10:06:44 -0700 (PDT)
MIME-Version: 1.0
References: <CAN=5=fWuHS_3Ma5C2bjQx2A30spKOR8yFWNt-GAmO0PZNqKybA@mail.gmail.com>
 <CAN=5=fXMFTN6kh=0aBvncdNpud_V0wvoc59RYg=qhX1Zf4U7cQ@mail.gmail.com>
In-Reply-To: <CAN=5=fXMFTN6kh=0aBvncdNpud_V0wvoc59RYg=qhX1Zf4U7cQ@mail.gmail.com>
From: Daria Vinnik <d.vinnik@alterragroup.com.ua>
Date: Wed, 31 Aug 2022 20:06:33 +0300
Message-ID: <CAN=5=fVC8teXCXmZoG3n=OneqT-1DLmCfuOwRUebMJtYanWW0w@mail.gmail.com>
Subject: =?UTF-8?B?UmU6INCf0LXRgNC10LnQvNC10L3Rg9Cy0LDQvdC90LAg0LDQutC60LDRg9C90YLRgw==?=
To: Smart City <office@smart-city.com.ua>
Cc: Viktoriiya Nikitina <hr@alterragroup.com.ua>
Content-Type: multipart/alternative; boundary="0000000000007c1ba405e78c851a"
X-Spam-Score: 8
X-Spam-Bar: /
X-Spam-Report: Spam detection software, running on the system "www01-mail.smart-city.com.ua",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.

 Content preview:  Тепер можемо перейменовувати Дякую
    ср, 31 серп. 2022 р. о 18:41 Daria Vinnik <d.vinnik@alterragroup.com.ua>
    пише: > Прохання поки не перейменовувати
    > Напишу > Необхыдно спочатку переменувати
    аккаунт в Асані. Гали це вже роб� [...] 

 Content analysis details:   (0.8 points, 1.0 required)

  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: docs.google.com]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [209.85.218.41 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [209.85.218.41 listed in wl.mailspike.net]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 HTML_MESSAGE           BODY: HTML included in message
  0.0 HTML_FONT_FACE_BAD     BODY: HTML font face is not a word
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from
                             envelope-from domain
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
  1.0 MIXED_ES               Too many es are not es

--0000000000007c1ba405e78c851a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

No response

cedric-anne commented 2 years ago

Hi,

This is due to usage of illegal encoding in the anti-spam report included in mail headers. This problem will be fixed in GLPI 10.0.3 (see #12232). https://github.com/cedric-anne/glpi/blob/2964bf2db91542c0d7a2101781b73efa16fd4c85/tools/patches/laminas-mail-invalid-header-ignore.patch patch have to be applied in vendor/laminas/laminas-mail/ to get this fix right now.

Regards