User Tools

Site Tools


software:requesttracker:autoqueue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:requesttracker:autoqueue [2024/08/29 19:27] rodolicosoftware:requesttracker:autoqueue [2024/08/30 01:29] (current) rodolico
Line 1: Line 1:
 ====== Auto-Queue scrips ====== ====== Auto-Queue scrips ======
  
-===== Based on sender e-mail =====+===== Auto Queue based on sender e-mail =====
  
 This scrip (not a typo, a scrip is an RT Script) can be added in the global scrip section and will automatically put a ticket in the proper queue based on the sender's e-mail address. In this case, we have senders coming from different domains (@example.net and @example2.com), and we want to put them into the queue's **Example** and **Example 2 Queue** when a new ticket arrives. Note: the queues must exist before this. This scrip (not a typo, a scrip is an RT Script) can be added in the global scrip section and will automatically put a ticket in the proper queue based on the sender's e-mail address. In this case, we have senders coming from different domains (@example.net and @example2.com), and we want to put them into the queue's **Example** and **Example 2 Queue** when a new ticket arrives. Note: the queues must exist before this.
Line 8: Line 8:
  
 Note: A handy regex tester I use quite a bit is located at [[https://regex101.com/]] Note: A handy regex tester I use quite a bit is located at [[https://regex101.com/]]
 +
 +  * Description: Place all new tickets in correct queue, where possible
 +  * Condition: On Create
 +  * Action: User Defined
 +  * Template: Blank
 +  * Enabled: check
 +  * Custom Condition: empty
 +  * Custom action preparation code: <code perl>return 1;</code>
 +  * Custom action commit code: code which follows
  
 <code perl> <code perl>
Line 29: Line 38:
 return 1; return 1;
 </code> </code>
 +
 +===== Placing mail to different addresses in different queues =====
 +
 +This is easy to do in RT, if you are using aliases to route them. For example, if you have //support@example.com// set up as a forwarder to your RT server, you would create an entry like this in your aliases file on the RT server.
 +<code bash>
 +support: "|/opt/rt5/bin/rt-mailgate --queue general --action correspond --url https://rt.example.com/rt/"
 +support-comment: "|/opt/rt5/bin/rt-mailgate --queue general --action comment --url https://rt.example.com/rt/"
 +</code>
 +which will redirect the incoming mail to Request Tracker's interface on the machine.
 +
 +In order to add new clients, you can create different aliases for each to correspond with; in this case, client1 and client2, which would go into the queue's Client1 and Client 2 respectively.
 +<code bash>
 +support: "|/opt/rt5/bin/rt-mailgate --queue general --action correspond --url https://rt.example.com/rt/"
 +support-comment: "|/opt/rt5/bin/rt-mailgate --queue general --action comment --url https://rt.example.com/rt/"
 +client1: "|/opt/rt5/bin/rt-mailgate --queue client1 --action correspond --url https://rt.example.com/rt/"
 +client1-comment: "|/opt/rt5/bin/rt-mailgate --queue client1 --action comment --url https://rt.example.com/rt/"
 +client2: "|/opt/rt5/bin/rt-mailgate --queue 'Client 2' --action correspond --url https://rt.example.com/rt/"
 +client2-comment: "|/opt/rt5/bin/rt-mailgate --queue 'Client 2' --action comment --url https://rt.example.com/rt/"
 +</code>
 +
 +Now, mail sent to client1@example.com would be forwarded to client1@rt.example.com, which would be picked up by line 3 above and sent to RT, placing the ticket into the queue Client1. e-mail to client2@example.com would be sent to client2@rt.example.com which would go into RT, and place the new ticket in the queue Client 2.
software/requesttracker/autoqueue.1724977644.txt.gz · Last modified: 2024/08/29 19:27 by rodolico