Email client integration

I have been using 3.6 for about a year fairly successfully, and I
have more recently setup the CommandByMail extension to help in
closing tickets as part of my email work process. I use mutt for
email, and I wrote a perl script that takes an email on stdin and
sends an email with the same subject as to the comment address of
the queue, with Status: resolved. Then, I have
macro pager S "~/bin/"
in my muttrc so I just press a key while viewing the message to
close the ticket. However, I still don’t have a good way of
seeing the status of tickets in mutt or another mail program. Has
anyone done anything like this, or have suggestions for my ticket
closing script?


use warnings;
use strict;

use Mail::Sendmail;

my ($replyto, $replyfrom, $subject, $queue, $rthost, $isaticket);

#it must be from the address RT thinks you have

while () {
chomp $_;
if (/^Reply-To: (.@.)$/) {$replyto=$1;}
if (/^RT-Ticket:/) {$isaticket=“true”;}
if (/^Subject: (.*)$/) {$subject=$1;}

if($isaticket) {
if ($replyto=~/^(.)(-comment){0}@(.)$/) {
else {
print “Not a ticket.\n”;

my %mail=(
server => ‘localhost’,
from => $replyfrom,
to => “$queue-comment@$rthost”,
subject => $subject,
body => ‘Status: resolved’,

sendmail(%mail) or die $Mail::Sendmail::error;

Nick Schmalenberger