Why isn't the script setting the header?

On Mon, Oct 31, 2011 at 11:23 AM, Danny Froberg <danny@hackix.com> wrote:

Did anyone have any idea about the below mentioned conundrum?

 

 

From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of Danny Froberg
Sent: den 26 oktober 2011 13:53
To: otrs@otrs.org
Subject: [otrs] How to use the return value from an external script in a PostMaster filter?

 

Hi folks,

 

Been scratching my head for a while now so thought i’d ask you guys.

 

I have a little script that basically looks up a numeric CustomerNo from a database and returns it to stdout, and if it’s can’t find one it will spit out the domain part of the senders email address.

So far so good, I’ve been googling like mad to find a reference to using return values other than true/false when setting a header;

 

# Job Name: 6-FindCustomerNo

    $Self->{'PostMaster::PreFilterModule'}->{'6-FindCustomerNo'} = {

        Module => 'Kernel::System::PostMaster::Filter::CMD',

        CMD => '/opt/otrs/contrib/find_customer',

        Set => {

            'X-OTRS-CustomerNo' => '???',

        },

    };

 

What would the proper syntax be?

 

Best regards

Danny Froberg

 

 


---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs