Trigger not working for changing group based on email

Infos:

  • Used Zammad version: 6.2.0-1704877727.2bda00c4.bookworm
  • Used Zammad installation type: package
  • Operating system: Debian 12
  • Browser + version: latest chrome or FF

Expected behavior:

  • to change the group of the ticket

Actual behavior:

  • sometimes it does sometimes it wont

Steps to reproduce the behavior:

  • if i do a very simple email through sendmail it works, but if i use any email client it wont

i have put my email twice to match both cases (either simple email, or as usual from most email clients)

pic-selected-240725-1954-43

the first ticket is send through sendmail the second from Kopano web app.
when i send it through sendmail the email conent looks like this:

Subject: Testing
From: hekuran.gashi@kikxxl-evrotarget.com
To: it-support@kikxxl-evrotarget.com
BCC: hekuran.gashi@kikxxl-evrotarget.com
Date: Thu, 25 Jul 2024 19:50:10 +0200

I'd just like to interject for a moment. What you're refering to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called Linux, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called Linux distributions are really distributions of GNU/Linux!

Then i have downloaded the two tickets and compared them. they mostly look the same. While the onw send from Kopano contains extra stuff, html stuff for better looks, they differ in these key areas:

[hegashi ~D]
$ grep -i from ticket-triggered.eml
Received: from ucs-kopano.kikxxl.ko (127.0.0.1:55910)
Received: from localhost (localhost [127.0.0.1])
Received: from ucs-kopano.kikxxl.ko ([127.0.0.1])
Received: from hegashi (hegashi.kikxxl.ko [172.29.97.64])
From: hekuran.gashi@kikxxl-evrotarget.com
[hegashi ~D]
$ grep -i from ticket-UNtriggered.eml
Received: from ucs-kopano.kikxxl.ko (127.0.0.1:58288)
Received: from localhost (localhost [127.0.0.1])
Received: from ucs-kopano.kikxxl.ko ([127.0.0.1])
Received: from ucs-kopano (localhost [127.0.0.1])
From: "Hekuran Gashi" <hekuran.gashi@kikxxl-evrotarget.com>
[hegashi ~D]
$ grep From ticket-triggered.eml | od -a
0000000   F   r   o   m   :  sp   h   e   k   u   r   a   n   .   g   a
0000020   s   h   i   @   k   i   k   x   x   l   -   e   v   r   o   t
0000040   a   r   g   e   t   .   c   o   m  cr  nl
0000053
[hegashi ~D]
$ grep From ticket-UNtriggered.eml | od -a
0000000   F   r   o   m   :  sp   "   H   e   k   u   r   a   n  sp   G
0000020   a   s   h   i   "  sp   <   h   e   k   u   r   a   n   .   g
0000040   a   s   h   i   @   k   i   k   x   x   l   -   e   v   r   o
0000060   t   a   r   g   e   t   .   c   o   m   >  cr  nl
0000075

As of right now i have tried everything, every combination, but when send from Kopano it just wont filter…

I can’t tell you why your trigger doesn’t work but maybe you will have more success with a filter on your e-mail channel? This is a great example of what these filters can be used for, and we use them for stuff like this successfully.

Using a Email->Filter is not feasible. I have 20 groups(triggers), each have about a hundred email.
Using Email->Filter, i can specify only one “from” sender per Filter. So i will have to use Triggers…

In the example of the screenshot, i only left my own email, but there should be about ten just for our team, other departments have ~100 members

here is a rough estimate of how my triggers look:
4IT - Proj1 100 emails
4IT - Proj2 100 emails
4IT - Proj3 100 emails
4IT - Proj4 70 emails
4IT - Proj5 50 emails
4IT - Proj6 30 emails
4IT - Proj7 15 emails
4IT - Proj8 10 emails
4IT - IT 10 emails (when we open tickets to ourselves)
4OtherDepartment - Proj1 100 emails
4OtherDepartment - Proj2 100 emails
4OtherDepartment - Proj3 100 emails
4OtherDepartment - Proj4 70 emails
4OtherDepartment - Proj5 50 emails
4OtherDepartment - Proj6 30 emails
4OtherDepartment - Proj7 15 emails
4OtherDepartment - Proj8 10 emails
4OtherDepartment - IT 10 emails

That is not exactly true. Filters do support regular expressions.

Regexs are not really logical for our usecase, since everybody has the same domain name. This is for internal stuff. So we cant really use regex…

In Triggers i use “From” and “any of”… i will try to do everything i did in Triggers , now in Filters and wil let you know how it goes…

well… the exact same result…it wont filter…

i think it has to do with something how the “From:” line is formatted, but it is just my guess…anyway im all out of guesses now :sweat_smile: any idea is appreciated…

i think i have tried all combinations now:
only email: hekuran.gashi@kikxxl-evrotarget.com
full “string”: "Hekuran Gashi" <hekuran.gashi@kikxxl-evrotarget.com>
and both of them at the same time like in the first screenshot…

BUT, at first when i was tesing filters, i did only like a few of them, and for each user i made a filter:


and then it did filter:

here is the history of the ticket:
pic-selected-240726-1705-30
(then there are a few lines with notification Ticket…which i cut out)

But we have about a looot of users, and i cant really do a filter for each of them, and we constantly get new ones, and old one leave…
that is not feasible…what i do with the “any of” drop-down, i get the list of users in a .txt file and just copy paste all of them…
and using the “contains” drop-down it does not work when i add a lot of email separated with a space…

here again as a demonstration, when i use a single user using “any of”:

it will not filter it:

the ticket history:
pic-selected-240726-1713-54

i suppose i either dont understand the “any of” drop-down, or it isnt working as it should…idk…:person_shrugging: im at a loss :smiling_face_with_tear:

Please use the edit button instead of posting several answers after another. It does not help the overview of the thread. Thank you.

@MrGeneration okaaay…will do in the future…:person_shrugging::person_shrugging::person_shrugging:

anyway i solved the problem myself, just want to post the solution for others in the future…i wasted two full days on this, others shouldnt…

it is was very confusing/(unintuitive i guess), this is what youll want to do:

Do not actually chose “From”, but choose “Email” under the Customer chapter in the dropdown.
Then it actually filters stuff, also from any email client be it Outlook or Kopano…

1 Like

That sounds oddly specific to be honest. Are you certain that the FROM header does contain the expected value or do you, by any chance, have a reply-to header set Zammad might react to? The from should be visible in the article in question if you click on its background. Zammad will then display Meta information (like the FROM).

I’m just asking, because I haven’t seen this kind of behavior unless the from is something else than the expactation.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.