UnSquelch scrip


I have a queue where an automated system delivers responses (via email), the from-address (requestor) get squelched (as they should). However, with this particular system, the from-address is actually not from the automated system, but rather from a personal account, as such, I want to UnSquelch e-mails in this queue, from this system.

I have the following custom action which runs on create:
my $req = $self->TicketObj->Requestor->MemberEmailAddressesAsString;
my @requestors = split(’,’, $req);

foreach my $address (@requestors) {

I have tested with logging that the scrip is actually started and completed, however, it does not seem like the $address is actually Unsquelched. I have never used perl before so you have to bear with me here, but I tried to do the following:

my @squelched = $self->TicketObj->SquelchMailTo;

foreach my $attributte (@squelched) {
my $att = $attributte->Content;
$RT::Logger->debug( β€œ${att}” );

I only do this for debug purposes, to check that no e-mails end up squelched, as I can not find any way to check this in the user interface, other than sending a correspondence (which does not work - therefore I assume that the first part of the scrip does not work). This second part of the scrip makes the whole thing not run at all, so I guess there is a syntax error somewhere, but I can’t seem to find out what it is.

Do you see any issue with either part of my scrip or do you have another suggestion for how I could do this (automatically)?

Hard to say, but I believe this is a syntax error, you can do β€œ$att” without the {} for printing a variable


Thanks for the suggestion. However, this does not make any difference. I tried to add a logging statement at the end of the scrip, to check whether the scrip is actually executed, or if something is wrong with the loops. The scip is executed and I get the logging statement when I comment out the
my @squelched = $self->TicketObj->SquelchMailTo;
line. So I guess that there is a syntax error here. Tried with () at the end aswell, without any difference. We run 4.4.2, and as per the documentation I think that this is the correct syntax for what I am trying to do here.

When you do the UnsquelchMailTo() call in your top scrip, it should return a tuple with ($status,$mesg) in it. You might want to grab those and output them to the log, as that might tell you why the unsquelching isn’t working (which is what I think you’re actually after here, right?).

Thank you for the suggestion, it lead me to understand that the squelch (in our case) is actually placed on the transaction and not on the ticket. As such it made no sense to unsquelch requestor from the ticket.

For future reference:
I got it working by clearing the headers RT-Squelch-Replies-To and X-Auto-Response-Suppress from the transaction object attachments, and letting this scrip run before our autoreply scrip.

1 Like