Email CC function and subject line modification

Question is why if I change these $rtname and $CorrespondAddress

Why do they still appear as what was originally assigned ?

  • Do you have to restart the Web ?, RT? or wot to get it to reload these values.

and Likewise also in initildata:
why don’t changes get reflected in the emails:
ie adding “BLAH BLAH BLAH”

See very bottom for returned email :

These Codes comes from

~rt-3.2.1/etc/RT_SiteConfig.pm

$rtname the string that RT will look for in mail messages to

figure out what ticket a new piece of mail belongs to

Your domain name is recommended, so as not to pollute the namespace.

once you start using a given tag, you should probably never change it.

(otherwise, mail for existing tickets won’t get put in the right place

#Set($rtname , “adl.ap.freescale.net”);
Set($rtname , “RT”);

RT is designed such that any mail which already has a ticket-id associated

with it will get to the right place automatically.

$CorrespondAddress and $CommentAddress are the default addresses

that will be listed in From: and Reply-To: headers of correspondence

and comment mail tracked by RT, unless overridden by a queue-specific

address.

#Set($CorrespondAddress , ‘RT_CorrespondAddressNotSet’);
Set($CorrespondAddress , ‘rtadmin’);

~rt-3.2.1/etc/initialdata

Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding:
"{$Ticket->Subject()}",
a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been
assigned an ID of [{$rtname} #{$Ticket->id()}].

BLAH BLAH BLAH

Please include the string:

     [{$rtname} #{$Ticket->id}]

in the subject line of all future correspondence about this issue. To do so,
you may reply to this message.

                    Thank you,
                    {$Ticket->QueueObj->CorrespondAddress()}

RETURNED EMAIL:From: “The default queue via RT” <RT_CorrespondAddressNotSet@adl.ap.freescale.net mailto:RT_CorrespondAddressNotSet@adl.ap.freescale.net >
Subject: [adl.ap.freescale.net #87] AutoReply: dsd
Reply-To: RT_CorrespondAddressNotSet@adl.ap.freescale.net mailto:RT_CorrespondAddressNotSet@adl.ap.freescale.net => should be Reply-To: mailto:rtadmin@adl.ap.freescale.net rtadmin@adl.ap.freescale.net
In-Reply-To: <rt-87@adl.ap.freescale.net mailto:rt-87@adl.ap.freescale.net >
Message-ID: <rt-3.2.1-87-226-3.2.7464608038121@adl.ap.freeescale.net mailto:rt-3.2.1-87-226-3.2.7464608038121@adl.ap.freeescale.net >

Greetings,

This message has been automatically generated in response to the creation of a trouble ticket regarding:

“dsd”,

a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been assigned an ID of [adl.ap.freescale.net #87].

Please include the string:

[adl.ap.freescale.net #87] => should be [RT #87]

in the subject line of all future correspondence about this issue. To do so,

you may reply to this message.

Thank you,

Question is why if I change these $rtname and $CorrespondAddress

Why do they still appear as what was originally assigned ?

  • Do you have to restart the Web ?, RT? or wot to get it to reload these
    values.

Correct, you need to reload the web server when you make config changes.

Andy Harrison

Question is why if I change these $rtname and $CorrespondAddress

Why do they still appear as what was originally assigned ?

  • Do you have to restart the Web ?, RT? or wot to get it to reload these values.

and Likewise also in initildata:
why don’t changes get reflected in the emails:
ie adding “BLAH BLAH BLAH”

See very bottom for returned email :

These Codes comes from

~rt-3.2.1/etc/RT_SiteConfig.pm

$rtname the string that RT will look for in mail messages to

figure out what ticket a new piece of mail belongs to

Your domain name is recommended, so as not to pollute the namespace.

once you start using a given tag, you should probably never change it.

(otherwise, mail for existing tickets won’t get put in the right place

#Set($rtname , “adl.ap.freescale.net”);
Set($rtname , “RT”);

RT is designed such that any mail which already has a ticket-id associated

with it will get to the right place automatically.

$CorrespondAddress and $CommentAddress are the default addresses

that will be listed in From: and Reply-To: headers of correspondence

and comment mail tracked by RT, unless overridden by a queue-specific

address.

#Set($CorrespondAddress , ‘RT_CorrespondAddressNotSet’);
Set($CorrespondAddress , ‘rtadmin’);

~rt-3.2.1/etc/initialdata

Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding:
"{$Ticket->Subject()}",
a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been
assigned an ID of [{$rtname} #{$Ticket->id()}].

BLAH BLAH BLAH

Please include the string:

     [{$rtname} #{$Ticket->id}]

in the subject line of all future correspondence about this issue. To do so,
you may reply to this message.

                    Thank you,
                    {$Ticket->QueueObj->CorrespondAddress()}

RETURNED EMAIL:From: “The default queue via RT” <RT_CorrespondAddressNotSet@adl.ap.freescale.net mailto:RT_CorrespondAddressNotSet@adl.ap.freescale.net >
Subject: [adl.ap.freescale.net #87] AutoReply: dsd
Reply-To: RT_CorrespondAddressNotSet@adl.ap.freescale.net mailto:RT_CorrespondAddressNotSet@adl.ap.freescale.net => should be Reply-To: mailto:rtadmin@adl.ap.freescale.net rtadmin@adl.ap.freescale.net
In-Reply-To: <rt-87@adl.ap.freescale.net mailto:rt-87@adl.ap.freescale.net >
Message-ID: <rt-3.2.1-87-226-3.2.7464608038121@adl.ap.freeescale.net mailto:rt-3.2.1-87-226-3.2.7464608038121@adl.ap.freeescale.net >

Greetings,

This message has been automatically generated in response to the creation of a trouble ticket regarding:

“dsd”,

a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been assigned an ID of [adl.ap.freescale.net #87].

Please include the string:

[adl.ap.freescale.net #87] => should be [RT #87]

in the subject line of all future correspondence about this issue. To do so,

you may reply to this message.

Thank you,

#Set($rtname , “adl.ap.freescale.net”);
Set($rtname , “RT”);

Please don’t do this. Use a tag unique to your organization so that you
don’t run into ticket id conflicts with some other organization out
there.

I did some searching and hopefully I didn’t re-invent the wheel here. I
wanted to disable autoreplies for any email addresses matching a list of
regular expressions. This works on my dev environment, and I’m about to
take it to the live environment. I hope it helps someone.
Feedback/improvement is welcome, too.

$RTHOME/local/lib/RT/Action/Autoreply_Local.pm:

use strict;
no warnings qw(redefine);

{{{ sub SetRecipients

sub SetRecipients {
my $self=shift;

my @recipients = $self->TicketObj->Requestors->MemberEmailAddresses;
open (FH, $RT::NoAutoreply);
while (<FH>) {
    chomp;
    my $line = $_;
    next if ($line =~ /^#/);
    @recipients = grep (!/^$line$/is, @recipients);
}
close (FH);

push(@{$self->{'To'}}, @recipients);

return(1);

}

}}}

1;

Append this to $RTHOME/etc/RT_SiteConfig.pm:

Set($NoAutoreply, ‘/usr/local/rt3/etc/noautoreply’);

And then add stuff like this to the file pointed to by $NoAutoreply:

root@.*.domain.com
someemail@otherdomain.com

This was built and lightly tested under RT 3.0.10 (perl 5.6.1).

-=| Ben