[rt-users] Automating mail alias on queue creation

Tom Lanyon tom at netspot.com.au
Thu Jul 3 19:14:30 EDT 2008

On 04/07/2008, at 1:59 AM, Damon Miller wrote:

> 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.).
> <snip>
> 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...

We do something similar on our dev environment.

All our developers have their own Queues to play with named after them  
"Fred", "Bob", "Sally", etc. I didn't want to keep creating new mail  
aliases for each of these so I have one address:
	devrt at domain.com

By default, this dumps tickets into the "General" queue, but uses mail  
extensions (devrt+user at domain.com) to assign tickets to users' own  
queues if supplied.

The devrt alias on my MTA (I prefer Postfix / qmail) just calls an  
external script (if the +user extension is present):

	use strict;
	use warnings;
	my $extension = lc $ENV{EXT2};
	open(my $mailgate, '|-', "/bin/rt-mailgate --queue '\u 
$extension' ....") or die...;

	print $mailgate $_ while <>;

This seems to work well and I believe it creates tickets in the  
General queue if an unknown Queue extension is given. Also, I haven't  
had to touch the MTA setup since the development environment was  
setup :).


More information about the rt-users mailing list