I used the code from the wiki page at http://wiki.bestpractical.com/view/OnCreateAutoReplyException to stop Auto Replies from a list of addresses. This works great as it stops autoreplies to certain requestors.
Now, I'd like to do something something similar, but checking the To: address instead of the Requestor (From: or Reply-To:) address. The reason being, there are a number of email groups already set up that blast messages to entire groups, departments and even the dreaded 'All Email Users' list. This ends up creating half a dozen new tickets for a single message sent to a group which includes the RT queue addresses. Ideally, I'd like to catch a message being sent to [email protected] and delete the ticket right from the Autoreply scrip, but for now I'm just trying to get it to not reply. I borrowed some code from another wiki page ( http://wiki.bestpractical.com/view/AutomaticCustomFieldValue) that looks like it does something similar (under CF values based on incoming To: address), but it doesn't seem to work for me: On Create Autoreply to Requestors: use template autoreply Custom condition: ### my @exceptionList = ('[email protected]', '[email protected]', '[email protected]'); my $transactionType = $self->TransactionObj->Type; my $ticketRequestor = lc($self->TicketObj->RequestorAddresses); my $to = lc($self->TicketObj->Transactions->First->Attachments->First->GetHeader("To")); if ($transactionType eq 'Create') { return if grep { $ticketRequestor eq lc($_) } @exceptionList; return if grep { $to eq lc($_) } @exceptionList; return 1; } return; ### If anyone has any ideas on how to go about this, it would be much appreciated. - Adam
_______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [email protected] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
