[rt-users] Filter by requestor email domain

Bart bart at pleh.info
Mon Jan 30 05:41:54 EST 2012


Hi,

We had a similar requirement for a bunch of e-mail addresses.

This can be achieved by editing the autoreply scrip to look something like
this:

   - Condition: User Defined
   - Action: Auto Reply To Requestors
   - Template: Your AutoReply template
   - Stage: TransactionCreate
   - Custom Condition:


my @exceptionList = ('name1 at example.com',
                     'name2 at example.com',
                     'name3 at example.com');

my $transactionType = $self->TransactionObj->Type;
my $ticketRequestor = lc($self->TicketObj->RequestorAddresses);
my $trans = $self->TransactionObj;

if ($transactionType eq 'Create') {
  return if grep { $ticketRequestor eq lc($_) } @exceptionList;
  my $msgattr = $trans->Message->First;
  return 0 unless $msgattr;
  return 1 if $msgattr->GetHeader('Received');
}
return 0;

In addition the above only sends an autoreply when someone sends an e-mail,
in our case we don't like the autoreply mails when we manually create a
ticket (e.g. via quick create).

Hope this helps.

-- Bart


Op 25 januari 2012 21:02 schreef Ram Moskovitz <ram0502 at gmail.com> het
volgende:

> Hey there,
> I'm looking to not auto-reply on create to inbound emails from a certain
> domain ( anything at example.com and even anything at sd.example.com). I
> suppose the right way to go about this is via user defined condition in the
> global scrip for autoreply on create. I have steps 1 and 3.. what's step 2?
>
> 1 return 0 unless $self->TransactionObj->Type eq "Create";
> 2 return 0 if #self->TicketObj->????
> 3 return 1
>
> thanks
> ram
>
>
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Boston — March 5 & 6, 2012
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120130/131fed2c/attachment.htm>


More information about the rt-users mailing list