Blacklist

From Request Tracker Wiki
Jump to navigation Jump to search

To provide the ability to add a list of "blacklist" email addresses that will always be removed.

Add the following code to $RT_HOME/lib/RT/Action/SendEmail.pm

# Add the configured blacklist addresses
 my $site_blacklist = $RT::Blacklist;
 if( $site_blacklist ) {
     @blacklist = split( /,/, $site_blacklist );
 }
 
 

These lines of code should go immediately after:

# Let's grab the SquelchMailTo attribue and push those entries into the @blacklist
 my @non_recipients = $self->TicketObj->SquelchMailTo;
 foreach my $attribute (@non_recipients) {
     push @blacklist, $attribute->Content;
 }
 
 

In the "RemoveInappropriateRecipients" sub.

Add the following property to the $RT_HOME/etc/RT_Config.pm

Set( $Blacklist, '<comma seperated list of addresses here>' );