Changing Queue based on Incoming Email address

I can¹t seem to get the syntax correct for a User Defined scrip to change
queue on an existing ticket, based on which email address they send to. I
have two queues, post@mydomain and review@mydomain. We have an external
database that sends emails based on where a project is in our workflow, so
we need the tickets to drift thru the queues based on emails from the db.

Any existing scrips or extensions I might be able to look at?

Robert Smith | Post Production Manager
(:: +1.800.929.0737 x55 | +1.310.882.5584 fax
8:: fixer@livenation.com | AIM:: bigdaddyfix
*:: 6255 Sunset Blvd, 17th Floor, | Hollywood, CA, | 90028
::: http://www.livenation.com http://www.livenation.com/

I create all tickets in our general queue and move them based on domain
name. Here’s the scrip I use:

Domains we want to move

my $domains = {};

my %domain_map = (
‘@..?comcast.com’ => “comcast-server”,
'@.
.?cox.com’ => “cox-server”
);

#Check each of our defined domains for a match
foreach my $domainKey (keys %domain_map ){
if($self->TicketObj->RequestorAddresses =~ /^.*?${domainKey}/) {
# Domain matches - move to the right queue
$self->TicketObj->SetQueue($domain_map{$domainKey});
}
}From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Fixer
(Robert Smith)
Sent: Tuesday, February 05, 2008 4:48 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Changing Queue based on Incoming Email address

I can’t seem to get the syntax correct for a User Defined scrip to
change queue on an existing ticket, based on which email address they
send to. I have two queues, post@mydomain and review@mydomain. We have
an external database that sends emails based on where a project is in
our workflow, so we need the tickets to drift thru the queues based on
emails from the db.

Any existing scrips or extensions I might be able to look at?

Robert Smith | Post Production Manager
*:: +1.800.929.0737 x55 | +1.310.882.5584 fax
*:: fixer@livenation.com | AIM:: bigdaddyfix
*:: 6255 Sunset Blvd, 17th Floor, | Hollywood, CA, | 90028
*:: http://www.livenation.com http://www.livenation.com/

Whoops. I misread your email… you said sending to, not from.

Which syntax is giving you difficulty? I use the following to determine
the To: header:

my $to = $self->TransactionObj->Attachments->First->GetHeader(‘To’);From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Fixer
(Robert Smith)
Sent: Tuesday, February 05, 2008 4:48 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Changing Queue based on Incoming Email address

I can’t seem to get the syntax correct for a User Defined scrip to
change queue on an existing ticket, based on which email address they
send to. I have two queues, post@mydomain and review@mydomain. We have
an external database that sends emails based on where a project is in
our workflow, so we need the tickets to drift thru the queues based on
emails from the db.

Any existing scrips or extensions I might be able to look at?

Robert Smith | Post Production Manager
*:: +1.800.929.0737 x55 | +1.310.882.5584 fax
*:: fixer@livenation.com | AIM:: bigdaddyfix
*:: 6255 Sunset Blvd, 17th Floor, | Hollywood, CA, | 90028
*:: http://www.livenation.com http://www.livenation.com/

I can’t seem to get the syntax correct for a User Defined scrip to
change queue on an existing ticket, based on which email address
they send to. I have two queues, post@mydomain and
review@mydomain. We have an external database that sends emails
based on where a project is in our workflow, so we need the tickets
to drift thru the queues based on emails from the db.

Any existing scrips or extensions I might be able to look at?

I might be misunderstanding your intent, but can’t you use two
different mailgate lines in your alias file?

post: “|/opt/rt3/bin/rt-mailgate --queue post --action
correspond --url http://rt.example.com/
review: “|/opt/rt3/bin/rt-mailgate --queue review --action
correspond --url http://rt.example.com/

That should start the ticket in the correct queue

-kevin

He wants an existing ticket to change queues based on the To address in new
correspondence.

Fixer, did you figure it out yet?

Now playing: Bob Marley & the Wailers - One Love / People Get
Readyhttp://www.foxytunes.com/artist/bob+marley+%26+the+wailers/track/one+love+++people+get+ready
posted with FoxyTunes http://www.foxytunes.com/signatunes/On 2/6/08, Kevin Falcone falcone@bestpractical.com wrote:

On Feb 5, 2008, at 7:48 PM, Fixer (Robert Smith) wrote:

I can’t seem to get the syntax correct for a User Defined scrip to
change queue on an existing ticket, based on which email address
they send to. I have two queues, post@mydomain and
review@mydomain. We have an external database that sends emails
based on where a project is in our workflow, so we need the tickets
to drift thru the queues based on emails from the db.

Any existing scrips or extensions I might be able to look at?

I might be misunderstanding your intent, but can’t you use two
different mailgate lines in your alias file?

post: “|/opt/rt3/bin/rt-mailgate --queue post --action
correspond --url http://rt.example.com/
review: “|/opt/rt3/bin/rt-mailgate --queue review --action
correspond --url http://rt.example.com/

That should start the ticket in the correct queue

-kevin

How does email get into your RT? We use aliases and the RT mail gateway to
get mail sent to different addresses into different queues. That’s really
standard practice for RT.On 2/5/08, Fixer (Robert Smith) fixer@livenation.com wrote:

I can’t seem to get the syntax correct for a User Defined scrip to change
queue on an existing ticket, based on which email address they send to. I
have two queues, post@mydomain and review@mydomain. We have an external
database that sends emails based on where a project is in our workflow, so
we need the tickets to drift thru the queues based on emails from the db.

Any existing scrips or extensions I might be able to look at?


Robert Smith
| Post Production Manager
(:: +1.800.929.0737 x55 | +1.310.882.5584 fax
8:: fixer@livenation.com | AIM:: bigdaddyfix
*:: 6255 Sunset Blvd, 17th Floor, | Hollywood, CA, | 90028
::: http://www.livenation.com <http://www.livenation.com/>


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com