Hi all,
I'm having an issue with email tickets. When an email comes in, it doesn't seem to process the Postmaster Filters I set up in the GUI or the Filter I set in Kernel/Config.pm as per the documentation (https://otrs.github.io/doc/manual/admin ... ing-filter).
All of my customer users are synced via LDAP. My test user has "TEST" in the CustomerID field. In the Postmaster filter I set filters that look for "TEST" in X-OTRS-CustomerNo and then sets X-OTRS-Queue to a queue I set up named "TEST", but the ticket stays in the Raw Queue.
Thanks!
Postmaster filter not matching X-OTRS-CustomerNo
Moderator: crythias
Re: Postmaster filter not matching X-OTRS-CustomerNo
The filter I set up in case anyone is curious:
Code: Select all
$Self->{'PostMaster::PreFilterModule'}->{'TEST'} = {
Module => 'Kernel::System::PostMaster::Filter::Match',
Match => {
'X-OTRS-CustomerNo' => 'TEST',
},
Set => {
'X-OTRS-Queue' => 'TEST',
},
};
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Postmaster filter not matching X-OTRS-CustomerNo
Are you sure the mail has the X-OTRS-CustomerNo header? If it is a mail from a customer I doubt that...
So you have to write your own postmaster filter module that checks the customer id from the ticket. A sample Postmaster filter is available at https://gist.github.com/reneeb/7308b1cb390a26c1bfe5
So you have to write your own postmaster filter module that checks the customer id from the ticket. A sample Postmaster filter is available at https://gist.github.com/reneeb/7308b1cb390a26c1bfe5
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Postmaster filter not matching X-OTRS-CustomerNo
I've applied your sample postmaster filter. When an email comes in, I see the following in the log:
When I try to dump the TicketID with I get
My Config.PM has
I'm on version 5. Is there a way to find out what's changed RE: postmaster filters since the version you're on?
Code: Select all
OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-44[17679]: [Error][Kernel::System::PostMaster::Filter::CESDSetQueue::Run][Line:38]: Need TicketID!
Code: Select all
$LogObject->Log(Priority => 'error', Message => "Ticket ID: $Param{TicketID}");
Code: Select all
OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-44[17679]: [Error][Kernel::System::PostMaster::Filter::CESDSetQueue::Run][Line:36]: Ticket ID:
Code: Select all
$Self->{'PostMaster::PreFilterModule'}->{'TEST'} = {
Module => 'Kernel::System::PostMaster::Filter::CESDSetQueue',
};
I'm on version 5. Is there a way to find out what's changed RE: postmaster filters since the version you're on?
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Postmaster filter not matching X-OTRS-CustomerNo
On a "Pre" filter the ticket id is not available. You have to configure it as a "Post" filter (as shown in the sample gist)
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Postmaster filter not matching X-OTRS-CustomerNo
Hah! Sorry about that.