[rt-users] Automating mail alias on queue creation

Damon Miller damon at thinkingphones.com
Thu Jul 3 12:29:45 EDT 2008


Hi all.  I'm trying to automate email alias creation and deletion based
on queue actions in RT and I'm wondering if anyone out there has any
thoughts or suggestions.  Basically the situation is this:  I'm planning
to offer RT instances to a number of user groups and I'd like to avoid
maintaining MTA email aliases each time they change their queue
configuration (create, delete, etc.).

Originally I had hoped to have the MTA handle this but after trying
Postfix, Sendmail, and Exim I've run out of ideas.  (If interested, I
tried regexp-based aliasing to route anything of the form
"customer-queue at helpdesk.domain.tld" to RT's gateway, but I quickly hit
limits in the various mailers' substitution and command execution code.
I then tried a per-message-processing approach a-la Maildrop, but I
really didn't want to be responsible for parsing every single message to
figure out what queue it needs to reach.)

My current thinking is perhaps I can use RT's Scrip functionality to
trigger events on queue creation that will make the necessary MTA email
alias changes.  For example, if a user in instance "abcd" creates a
queue called "hardware", create a new alias called "abcd-hardware" and
pipe it to the appropriate "rt-mailgate".  The actual "rt-mailgate" will
live in a dedicated subdirectly of the form /opt/${customer}, e.g.
/opt/abcd.  The problem is I can't seem to find a way to trigger actions
based on queue creation.

If anyone has any suggestions I'd love to hear them.  If there's a
mechanism better suited to this than using a Scrip, by all means I'd
love to hear about that as well.

Thanks in advance,

Damon

P.S.  I also solicited feedback from an MTA mailing list but so far
there's been no response...

--

Damon T. Miller
Director of Application Services
Thinking Phone Networks
damon at thinkingphones.com 
617-649-1388 (Office)





More information about the rt-users mailing list