[rt-users] Disable Auto reply message for a group

Gene LeDuc gleduc at mail.sdsu.edu
Wed Jan 16 11:50:46 EST 2008


Hi Sean,

Are the addresses you want to exclude members of an RT group, or is there 
some other way of identifying them (like bob at helpdesk.mycompany.com)?

If they are members of an RT group, it's not difficult to check to see if 
an address is a group member. You can use the group's 
MemberEmailAddresses() or MemberEmailAddressesAsString() methods to grab 
the members of the group and then check to see if your address is in 
there.  The first returns an array of addresses and the second returns a 
string.

Regards,
Gene

At 06:49 AM 1/16/2008, Sean McCreadie wrote:
>Stephen,
>
>Thank you for getting back to me on this, yes I did set the condition to
>user defined and I was able to get the scrip to work in that it will not
>Autoreply to the the one email address I specify.  I would like to be
>able to have it not send the Autoreply to an entire group but I don't
>know how to write the code for that.  I tried to list all the email
>addresses in my helpdesk group individually and wasn't able to get that
>going either, I know its just a syntax error. Thanks for the debugging
>bit also.
>
>Sean
>
>-----Original Message-----
>From: rt-users-bounces at lists.bestpractical.com
>[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Stephen
>Turner
>Sent: Wednesday, January 16, 2008 6:41 AM
>To: Sean McCreadie; rt-users at lists.bestpractical.com
>Subject: Re: [rt-users] Disable Auto reply message for a group
>
>At Wednesday 1/16/2008 02:05 AM, Sean McCreadie wrote:
> >Hello,
> >
> >I've been looking through the wiki and mailing lists trying to find
> >a solution to this with no success.  I'm sure it's very simple, I'm
> >just new to this.  I need to disable the default Auto reply scrip
> >for only my Helpdesk team, that way all the unprivileged users will
> >still receive the Auto reply, but not the HelpDesk team when they
> >create a ticket.  I tried adding this custom condition to the
> >default scrip and was able to disable it for one email address, but
> >im hoping there is an easy way to check group membership.  Thanks in
> >advance for all the help.
> >
> >if ( $self->TransactionObj->Type eq "Create" &&
> >      $self->TicketObj->RequestorAddresses() =~
>/MyName\@MyCompany\.com/
> >{
> >   return undef;
> >} else {
> >   return 1;
> >
>
>
>Sean,
>
>1. Did you also set the Condition drop-down entry to 'User defined' ?
>
>2. Check the RT log for error messages.
>
>3. Also, to help debug, you can put this kind of thing in the code:
>
>$RT::Logger->debug("Email is from Help Desk" );
>
>these messages show up in the log.
>
>Steve
>
>_______________________________________________
>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
>Community help: http://wiki.bestpractical.com
>Commercial support: sales at bestpractical.com
>
>
>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>Buy a copy at http://rtbook.bestpractical.com
>_______________________________________________
>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
>Community help: http://wiki.bestpractical.com
>Commercial support: sales at bestpractical.com
>
>
>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 




More information about the rt-users mailing list