What is the best way to have the incoming mail requests automatically
route to specific queue based on the e-mail address of the requestor?
Regards,
Francois
PS. I have ordered the book just didn’t received yet…
Random Thought:
Everybody, my friend, everybody lives for something better to come. That’s why we want to be considerate of every man - Who knows what’s in him, why he was born and what he can do? - Maxim Gorky, 1868 - 1936
What is the best way to have the incoming mail requests automatically
route to specific queue based on the e-mail address of the requestor?
With scrips, read http://wiki.bestpractical.com/
Regards,
Francois
PS. I have ordered the book just didn’t received yet…
Random Thought:
Everybody, my friend, everybody lives for something better to come. That’s why we want to be considerate of every man - Who knows what’s in him, why he was born and what he can do? - Maxim Gorky, 1868 - 1936
I trying to create scrips, but seems that I am missing some info.
I have created a test scrips to transfer a ticket to another queue, I use
the mail gateway and see the following error message in the logs:
Sep 21 10:44:14 localhost RT: Scrip 15 Commit failed: Global symbol
"%session" requires explicit package name at (eval 492) line 2.
(/opt/rt3/lib/RT/Action/UserDefined.pm:81)
Here is my scrips Custom action cleanup code:
init empty instance of RT::Ticket class
my $TicketObj = RT::Ticket->new( $session{‘CurrentUser’} );
my $TargetQueueName = ‘nagios’;
my ($status, $msg) = $TicketObj->SetQueue( $TargetQueueName );
unless( $status ) {
die “Error: $msg”;
}
What am I doing wrong?
Regards,
Francois
Random Thought:
Winning isn’t everything. Wanting to win is. - Catfish Hunter
There are very few variables that are available to you in a Scrip.
%session is not one of them.
Francois Meehan wrote:
init empty instance of RT::Ticket class
my $TicketObj = RT::Ticket->new( $session{‘CurrentUser’} );
This doesn’t select the current Ticket. If it worked (which it doesn’t
in a scrip) it would create a new Ticket object – from there you would
have to load a ticket number. In a Scrip you can easily get the current
ticket:
my $TicketObj = $self->TicketObj;
my $TargetQueueName = ‘nagios’;
my ($status, $msg) = $TicketObj->SetQueue( $TargetQueueName );
unless( $status ) {
die “Error: $msg”;
}
Got it to work now. pls humbly excuse my perl-RT newbiness…
Best regards,
Francois
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
There are very few variables that are available to you in a Scrip.
%session is not one of them.
Francois Meehan wrote:
init empty instance of RT::Ticket class
my $TicketObj = RT::Ticket->new( $session{‘CurrentUser’} );
This doesn’t select the current Ticket. If it worked (which it doesn’t
in a scrip) it would create a new Ticket object – from there you would
have to load a ticket number. In a Scrip you can easily get the current
ticket:
my $TicketObj = $self->TicketObj;
my $TargetQueueName = ‘nagios’;
my ($status, $msg) = $TicketObj->SetQueue( $TargetQueueName );
unless( $status ) {
die “Error: $msg”;
}
Random Thought:
Life is real! Life is earnest!And the grave is not its goal;Dust thou art, to dust returnest,Was not spoken of the soul. - Henry Wadsworth Longfellow, 1807 - 1882