Generic Agent vs Postmaster Filter in Znuny & OTRS

You get deeper into the automation of Znuny, OTRS or OTOBO and you will identify at a point in time that there are two options to automate your tasks.

First you have to understand at what situation are the both features working. This is

  • Postmaster Filter
    As the name says it is a man or service, who is in charge for the post (e-mail) processing
  • Generic Agent
    A user in OTRS, Znuny or OTOBO is typically named an Agent working on Service Management tasks

The often recommended Postmaster Filter

Now if you want to process automation as soon as a mail reaches the Ticket-System (Znuny, OTRS, OTOBO) you shall use Postmaster Filters.
At this level you work on String and RegEx basis only! And you can only set values in the E-Mail headers, which get processed later in the next steps of the Ticket-System.
E.g. you have a E-Mail and you want to match all e-Mails which are from to send them into the queue Amazon underneath the queue Shopping. Now you have to define a Postmaster with following settings:

Filter Conditions

  • Search Header Field:
  • for value:

Set E-Mail Headers

  • Set E-Mail Header:
  • with value:

Drawbacks of Postmaster Filters

As you can see, the Postmaster Filter enhances the E-Mail headers with additional data only and a later process in the Ticket System is processing the tickets accordingly. It is a possible solution, but in our opinion an “ass-backwards” approach.

How can you debug this Postmaster Filter? If you do more complicated things, you could ask Amazon to resend to you the same e-mail over and over again. Good luck 😉
Alternatively you dump the natively transmitted e-mail into a file and you provide this e-mail over and over to your Mailserver. You can ask Microsoft, your hoster of Office 365 to process a e-mail from Amazon in your account. Good luck, and welcome as spammer!
Alternatively if you use a POP3, IMAP or similar way, you can try to provide the e-mail to the mailboxes manually.

This are all tasks, which an experienced admin could be able to do. But do your PowerUsers of OTRS, Znuny or OTOBO can do this? And who should maintain the automation. An overloaded Admin, or your selected PowerUsers, who are directly in the business and know what processes could be easily automated?

Also what happens if you rename your Queue “Amazon” to “AmazonOrders”?
You are right your Postmaster Filter will fail
and how to fix it? You are again right fully manually for all tickets …
With the Generic Agent this case will never happen!

Now imagine you have done a mistake on your PostmasterFilter, but the initial test worked well.
So you published it on production, and you get a angry call from your Agents, that the tickets are somehow messed up. You can search for multiple forum posts about this fact. We faced such issues already multiple times and the cleanup of the mess is always a big sh.. of work. Be aware you will have as an admin multiple days of anger discussions with your Agents and Power Users…

More reliable and easy to test: Generic Agent

As the name says the Generic Agent shall be able to do the same steps as an human Agent. So the Generic Agent is also built like this. It has:

  • a time based trigger
    e.g. every 10 minutes,
    which could contain 0..n tickets during execution
  • a event based trigger
    e.g. on receiving a new ticket, or replying a ticket, and many many more,
    which contains exactly 1 ticket, which is processing the selected event(s)
  • a combined trigger time based and event based
  • Search criteria / Select tickets
  • Update/Add Ticket Attributes
  • Add Note
  • execute custom code for more specific

As you can see, this automation option is build more like a human does the work and therefore also for PowerUsers to maintain it easily.
Generic Agents have also search criteria, like a human would search for tickets.

  • From:

Under Update/Add ticket attributes you can now set

  • Set new queue:
    here you can select your queue from a drop down UI element

And the most important thing, even if you rename your queue, your Generic Agent will still work properly!

Drawback with Generic Agents

The major pain on Generic Agents is the lack of using logical operations.

  • match A except B
    you want to match all except
  • As of August 2022, this is not possible nor on the agenda of Znuny

E.g. this features are long awaited but not implemented by Znuny since years, Hopefully this will be history with the planned integration of elasticsearch in a maybe 7.x version.
Here are regEx solutions, which are possible to use in Postmaster Filters, clear benefit.


Do use Postmaster Filters very very carefully and also only if you do not have another solution via Generic Agent. Also check this page for the provided modules, which are built in mind to make the world of Znuny / OTOBO PowerUsers more easier.

Do you need help with Znuny / OTRS?
We have lot of experiences with OTRS and Znuny and can help you with your issues. Get in touch with us and we will check if and how we can help you.

Leave a Comment

Do you need help with Znuny / OTRS?​

We have lot of experiences with OTRS and Znuny.
We can help you with your issues to solve them.

From giving you support up to implementing integrations to your existing systems.

Get in touch with us and we will check if and how we can help you.​