[rt-users] Using RT to track system changes..

darren chamberlain darren at boston.com
Mon Nov 4 11:29:21 EST 2002


* Dustin Puryear <dpuryear at usa.net> [2002-11-03 00:28]:
> One thing I would like to see is a way for one of us to send an email 
> through rt-mailgate that creates a closed ticket item. Say, a tech. sends 
> mail to clientname-change at example.com and then rt adds this item to the 
> queue clientname-changes as a closed ticket. (Alternatively, we could just 
> periodically go through all tickets for queue clientname-changes and 
> resolve them.) Does this sound viable? I'm thinking we would then have a 
> nice, searchable database of changes made to systems that can be added to 
> via a webpage or email.

The enhanced mailgate (look at
<http://www.fsck.com/pub/rt/contrib/2.0/rt-addons/enhanced-mailgate>)
allows you to do things like modify the status of tickets.

I've often considered creating function-specific mail aliases, like you
allude to above, that perform certain actions, i.e., mail to
rt-1234-status=closed at foo.com would change the status of ticket 1234 to
closed (after checking that the user sending the message has the right
to do so, of course), with the body of the message as a comment.  This
would be pretty simple to do with procmail:

:0
* ^RT-Ticket:
| /opt/rt2/bin/do-stuff.pl

Where do-stuff.pl does something like:

  #!/usr/bin/perl

  use Mail::Internet;

  my $mail = Mail::Internet->new(\*STDIN);

  # validate_user does RT authentication
  # This doesn't yet exist, of course
  validate_user($mail->head->get("From"));

  my $to = $mail->head->get("To");
  my ($ticket, $action, $value) = $to =~ /rt-(\d+)-(\w+)=(.+)@/;

  # Now perform $action with argument $value to ticket $ticket

And so on.

-- 
I have discovered that all human evil comes from this, man's being
unable to sit still in a room.
    -- Blaise Pascal



More information about the rt-users mailing list