How to sort incoming mail request by sender email address?

Hi all,

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 :slight_smile: 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

Hi all,

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 :slight_smile: 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


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Buy your copy of our new book, RT Essentials, today!

Download a free sample chapter from http://rtbook.bestpractical.com

Best regards, Ruslan.

Hi all,

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

-----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”;
}

Look at some of the examples at:

http://wiki.bestpractical.com/index.cgi?Contributions

jbw
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDMX5LgA0gpghkf88RAkPEAJsGcLiobMlyAFSOBIuphMPNL/PeRACguvGm
c1LTy1ggh/EoTAZkmMMhjtE=
=RsDe
-----END PGP SIGNATURE-----

Thanks Joby,

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”;
}

Look at some of the examples at:

Request Tracker Wiki

jbw
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDMX5LgA0gpghkf88RAkPEAJsGcLiobMlyAFSOBIuphMPNL/PeRACguvGm
c1LTy1ggh/EoTAZkmMMhjtE=
=RsDe
-----END PGP SIGNATURE-----

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