[Solved] X-Otrs Headers from outside not recognized

Moderator: crythias

Post Reply
SUns86
Znuny newbie
Posts: 5
Joined: 25 Apr 2017, 15:58
Znuny Version: 5.0.18

[Solved] X-Otrs Headers from outside not recognized

Post by SUns86 »

I would like to set the OTRS queue from outside by specifying it the X-OTRS-Queue header in the mail. It is the same with DynamicFields. I sent an email with X-OTRS-Queue: testqueue but it always lands in the Raw Queue. The Queue "testqueue" does exist.

Is there a hidden switch or something for allowing to pass the X-OTRS headers?

My OTRS installation version is 5.0.18.
Selection_103_x.png
Selection_104.png
Selection_105.png
You do not have the required permissions to view the files attached to this post.
Last edited by SUns86 on 25 Apr 2017, 20:27, edited 1 time in total.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: X-Otrs Headers from outside not recognized

Post by jojo »

the header is misspelled (take care of capitalization)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
root
Administrator
Posts: 3961
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: X-Otrs Headers from outside not recognized

Post by root »

OTRS changes the capitalization on e-mails while reading them.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
SUns86
Znuny newbie
Posts: 5
Joined: 25 Apr 2017, 15:58
Znuny Version: 5.0.18

Re: X-Otrs Headers from outside not recognized

Post by SUns86 »

Thank you for your fast reply. I double checked the headers and indeed there was a difference. Thunderbird converted them also to camel-case. So I tried it on the shell. Inside the mailbox (where OTRS fetches the mails) the headers are now exactly as I sent them. But it still is not recognized by OTRS. Is it possible, that it is an OTRS bug. Does it work in your installation?

Shell:

Code: Select all

(
  echo "To: otrs2@example.com"
  echo "From: www@example.com"
  echo "X-OTRS-Queue: testqueue"
  echo "X-OTRS-DynamicField-ServerId: 1"
  echo "Content-Type: text/plain;"
  echo "Subject: a test"
  echo
  echo this is a test
) | sendmail -t
SUns86
Znuny newbie
Posts: 5
Joined: 25 Apr 2017, 15:58
Znuny Version: 5.0.18

Re: X-Otrs Headers from outside not recognized

Post by SUns86 »

Ok, I got it. The trusted flag was not set at "Mail Account Management".

File: Kernel/System/PostMaster.pm

Code: Select all

sub GetEmailParams {
[...]
        # do not scan x-otrs headers if mailbox is not marked as trusted
        next HEADER if ( !$Self->{Trusted} && $Param =~ /^x-otrs/i );
[...]
Sometimes it can be so simple ;-)
You do not have the required permissions to view the files attached to this post.
Post Reply