Regular expressions in Postmaster filter

Hello list, is there a way to use multiple regex groups in the Email header set section? E.g. I want to create a filter like this: Subject: Host ([^ ]+) is in error state Body: Service ([^ ]+) is not available since ([0-9:.-]+) And set headers like this: TicketValue1: <hostname from the subject filter> TicketValue2: <service name from the body filter> TicketValue3: <down time from the body filter> is it possible somehow? Thanks in advance! Best, Gergely -- "You need to believe in things that aren't true. How else can they become?" - Terry Pratchett

I solved my problem with a PostMaster Filter, but I wonder why this is not possible on the web interface?
Best,
Gergely
On 2011.04.10., at 13:58, Gergely Polonkai
Hello list,
is there a way to use multiple regex groups in the Email header set section? E.g. I want to create a filter like this:
Subject: Host ([^ ]+) is in error state Body: Service ([^ ]+) is not available since ([0-9:.-]+)
And set headers like this:
TicketValue1: <hostname from the subject filter> TicketValue2: <service name from the body filter> TicketValue3: <down time from the body filter>
is it possible somehow?
Thanks in advance!
Best, Gergely -- "You need to believe in things that aren't true. How else can they become?" - Terry Pratchett

Hi Gergely, you can, but you would need to create three different
filters; one for each value you want to capture.
--
Mike
On Thu, Apr 14, 2011 at 8:50 PM, Gergely Polonkai
I solved my problem with a PostMaster Filter, but I wonder why this is not possible on the web interface?
Best, Gergely
On 2011.04.10., at 13:58, Gergely Polonkai
wrote: Hello list,
is there a way to use multiple regex groups in the Email header set section? E.g. I want to create a filter like this:
Subject: Host ([^ ]+) is in error state Body: Service ([^ ]+) is not available since ([0-9:.-]+)
And set headers like this:
TicketValue1: <hostname from the subject filter> TicketValue2: <service name from the body filter> TicketValue3: <down time from the body filter>
is it possible somehow?
Thanks in advance!
Best, Gergely -- "You need to believe in things that aren't true. How else can they become?" - Terry Pratchett
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
participants (2)
-
Gergely Polonkai
-
Michiel Beijen