[rt-devel] interactive debugging of rt-mailgate?

jim.rowan at starcore-dsp.com jim.rowan at starcore-dsp.com
Thu Jan 8 14:25:27 EST 2004

Hi all,

I'm tweaking rt-mailgate to add some new function, and I've progressed
to the point where I need to run the server part of rt-mailgate under
the perl debugger.  I don't know how to do it.  (The commandline
approach of "cat samplemail | rt-mailgate --debug" is not adequate.)

I have the following script, which comes close to duplicating the
environment, but it isn't close enough.  (My mods work properly under
this environment, but do not work properly when real mail is sent to
the server.)

Can someone outline how to approach this?


#!/usr/local/bin/perl -w

use lib "/usr/local/rt/3.0.9.pre1/lib";
use lib "/usr/local/rt/3.0.9.pre1/local/lib";
use lib "/usr/local/rt/3.0.9.pre1/etc";

use RT;
use MIME::Entity;
use Mail::Internet;
use MIME::Parser;
use RT::User;
use RT::Queue;
use RT::Ticket;
use RT::Transaction;
use RT::Interface::Email; 


%ARGS = (
    queue => 1,
    action => "correspond",
    ticket => undef
$ARGS{'message'} = `cat /tmp/mailsample`;

my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway(\%ARGS);
print "$status\n", $error, "\n";

More information about the Rt-devel mailing list