Assigning tickets to queue based on where it was sent


I am trying to set it up so that an end user can send an email to, and another end user can send a mail to, and each ticket goes to a separate queue, for client A and B respectively.

Based on the “to” field, I want to sort the tickets into queues, to later set up the SLA feature per queue. I am no perl/python master, and need help figuring this out. I doubt I am the only one looking for this.

Any help appreciated, even if its just links to stuff that might help me.

You can do this easily with rt-mailgate, which is a script included with RT (in the RT bin directory) that takes an email and passes it into RT via HTTP. How you call it depends on what Mail Transfer Agent (MTA) or mail fetching/filtering system you are using - there’s a handy document detailing lots of possible options on the RT wiki. Witha bit of luck, no coding required if I’m understanding your needs correctly!

For example if your MTA server is using /etc/aliases (eg postfix, sendmail, etc) you could add these two lines to that file and restart your MTA:

support_client_A: "|/opt/rt4/bin/rt-mailgate --queue queueA --action correspond --url"
support_client_B: "|/opt/rt4/bin/rt-mailgate --queue queueB --action correspond --url"

You’ll also want to make sure that your web server is configured to only allow access to the mail gateway from which ever machine(s) are running your MTA (possibly just localhost if the MTA service is running on the same machine as the RT instance).