Skip to content

Instantly share code, notes, and snippets.

@sts
Created May 4, 2014 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sts/4e664295d662a487bff5 to your computer and use it in GitHub Desktop.
Save sts/4e664295d662a487bff5 to your computer and use it in GitHub Desktop.
RT Scrip: Autoreply to Whitelisted Domains + Mail Create
my @autoreplyDomains = qw(
example.com
);
my $transactionType = $self->TransactionObj->Type;
my $transactionContent = $self->TransactionOnj->Message->First;
my $ticketRequestor = lc($self->TicketObj->RequestorAddresses);
if ($transactionType eq 'Create' && $transactionContent) {
if ($transactionContent->GetHeader('Received')) {
return 1 if grep { $ticketRequestor eq lc($_) } @autoreplyDomains;
}
}
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment