You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2025-03-27 14:36:25

xaviglpi
Member
Registered: 2023-07-17
Posts: 3

Bug in "from email header" (not the "label bug")

Hello,

✅ I've just setup OAUTH to connect to a 365 mailbox. That's working
✅ If I set a rule to accept all tickets it works (ie, a rule which says "if email header is *, open a ticket in root entity").
✅ My 365 account is glpi@mydomain.tld
⚠️ That same account has 2 aliases: entity1@mydomain.tld and entity2@mydomain.tld

If my only accept rule is said to open a ticket if the "email to header" is glpi@mydomain.tld, it works, even if the email is sent to entity1 or entity2 aliases.
If my only accept rule checks for entity1 or entity2 emails in the "email to header", the email gets refused.

It seems that GLPI is reading wrong the property, even through the email was sent to "entity1@mydomain.tld", it reads as it was sent to "glpi@mydomain.tld".

I've checked the email properties and it actually shows entity1 email in the "To" header, but GLPI is only able to read glpi@mydomain.tld.

Is there any fix for this (perhaps i'm assigning the aliases the wrong way in exchange?) or even a workarround to move tickets from one entity to another based on the email?

Thank you.

EDIT:
To provide more information, we were working with an external POP3 email inbox before in this same way and it was working, except that your exchange did retrieve those emails and redirected them to the external pop3 server, then GLPI was retrieving the emails there and the rules with the different entities were working.

I've yet to test if using the same redirection but internally this works.

Last edited by xaviglpi (2025-03-27 14:39:49)

Offline

#2 2025-03-27 14:45:36

cconard96
Moderator
Registered: 2018-07-31
Posts: 3,226
Website

Re: Bug in "from email header" (not the "label bug")

Can you provide the full (redacted if needed) headers from the email as it was received by your "glpi@mydomain.tld" mailbox? The mail collector should be reading the "To" header for this.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2025-03-28 15:33:53

xaviglpi
Member
Registered: 2023-07-17
Posts: 3

Re: Bug in "from email header" (not the "label bug")

Hello,

Find the emails in the following pastebin:
An email sent to the email in which i wanted to receive the root entity tickets:
pastebin.pl/view/4258a482

An Email sent to the email in which i wanted to receive "entity1" tickets:
pastebin.pl/view/4c7d955f

I've eddited the emails from the "To" field, but the core part differentiating them is still there.

This is currently working on a Business Basic 365 account, the issue through, was the following:
- Inbox real email was "inbox@domain.tld"
- Helpdesk email "support@domain.tld" was set as an alias of "inbox@domain.tld" -> Rule was set so emails to support@domain.tld were opened to root entity
- INFRA email "infra@domain.tld" was set as an alias of "inbox@domain.tld" -> Rule was set so emails to Infra@domain.tld were opened to infra entity (a root sub-entity)

The above configuration was not working. Furthermore, if I set a rule which raised tickets without looking for emails matches, it worked (i guess because it was detecting them as inbox@domain.tld)

Once i changed the inbox real email to support@domain.tld and configured infra@domain.tld as a redirect to that inbox (not as an alias), without modifiying any rules, it started worked as intended (and was working before our migration to 365 in a pop3 account). I had the rules working with an external pop3 inbox (redirected from those same emails through our Exchange Online), they stopped working just after migrating the inbox to 365 with the Alias approach (Oauth was done properly and GLPI was reading the emails, just rejecting them)

Offline

Board footer

Powered by FluxBB