Am I the only one that cares about this?
No, but I think you’re the only one who cares as much as you do.
I think you’re gonna have to go into the code.
Ucky. It’s not that I mind digging in the code. I just don’t have
the time.
http://www.amsterdamned.org/~bc/rt/BC_SendEmail.pm
And as Derek has pointed out in private mail, I’m being unnecessarily
obscure
Attached is BC_SendEmail, BC_Notify.pm and a script to insert a new
ScripAction into the database called ‘BC_NotifyAdminCcs’. Note that I can
only warrent that BC_SendEmail works with sendmailpipe as the MailCommand
in config.pm .
BC_Notify checks for a config.pm frob named ‘SendBackToOriginator’, where
a value of ‘0’ gives the RT default behaviour, and a value of ‘1’ gives
the requested behaviour (if you use BC_NotifyAdminCcs below).
To use, copy BC_SendEmail.pm and BC_Notify.pm into your lib/RT/Action
directory. Change the ‘use lib’ lines in BC_NotifyAdminCcs.pl to reflect
your own installation and run it to add a ScripAction to your database
named ‘BC_NotifyAdminCcs’.
( what, you ran it without checking it? sheesh )
Then, you can go through the WebUI and replace the Scrip for your queue
reading:
OnCorrespond NotifyAdminCcs with Template Correspondence
and
OnCreate NotifyAdminCcs with Template Correspondence
with
OnCorrespond BC_NotifyAdminCcs with template OrigCorrespondence
and
OnCreate BC_NotifyAdminCcs with template OrigCorrespondence
Note that you will need to create the template named ‘OrigCorrespondence’
first. Mine reads somewhat like:
{ $Transaction->Message->First->NiceHeaders() }
{ $Transaction->Content() }
{ my $have_first = 0; my $retval= undef; my $Attachments =
$Transaction->Attachments; while( my $Attachment = $Attachments->Next ){
next if( $Attachment->id == $Transaction->Message->First->id); if(
$Attachment->Content eq $Transaction->Content ){ $have_first = 1 if(
$have_first == 0 ); next if( $have_first <= 1 ); } $retval = “\nURLs to
Attached parts:\n” if( ! defined( $retval ) ); $retval .= " " .
$RT::WebURL . “Ticket/Attachment/” . $Transaction->id . “/” .
$Attachment->id . “\n”; } $retval; }
This results in mails like:Date: Tue, 21 May 2002 21:24:10 +0200 (CEST)
From: Bruce Campbell bruce_campbell@ripe.net
Reply-To: myqueue@ripe.net
To: myqueue@ripe.net
Subject: [ripe.net #46104] testing attachments
some text
URLs to Attached parts:
http://rt2.ripe.net/Ticket/Attachment/176966/131187
( The last two lines only appear if an attachment was present )
Even if I send it to the queue (wait, I just did ), I get it back as
part of being an AdminCc on that queue. Other aspects is that I see the
original email address
If you like, you could change the insert script to be other than a
replacement for NotifyAdminCcs, however I personally haven’t done that (we
present a certain interface to the outside, and easily exposing our direct
email addresses isn’t included), but it should work.
Hopefully all of the above helps, and I’m heading home
Bruce Campbell RIPE
Systems/Network Engineer NCC
www.ripe.net - PGP562C8B1B Operations
BC_Notify.pm (2.63 KB)
BC_SendEmail.pm (21.2 KB)
insert_action_BC_NotifyAdminCcs.pl (1.47 KB)