Disabling autoreplies for just one queue

Is it possible to completely disable autoreplies for a specific queue?
Doing so would make RT suitable for use to check the postmaster@ mailbox
without causing inadvertent spam backscatter with RT autoreplies going to
forged From: addresses.

You have to replace the default autoreply scrip with a new scrip with a
custom condition like so:

my $Ticket = $self->TicketObj;
my $Transaction = $self->TransactionObj;

if ( ($Transaction -> Type eq ‘Create’)
&& !($Ticket->Queue eq ‘55’)
&& !($Ticket->Queue eq ‘65’)
&& !($Ticket->Queue eq ‘67’)
&& !($Ticket->Queue eq ‘68’)
&& !($Ticket->Queue eq ‘70’)
&& !($Ticket->Queue eq ‘77’)
&& !($Ticket->Queue eq ‘78’) )
{ return (1); }
else
{return (undef); }

As you can see, I’ve got a whole bunch of exceptions in there. If you
prefer to match by name, I suppose you could use

$Ticket->QueueObj->Name eq ‘Whatever’

instead.

Rick R.

Paul Johnson wrote:

http://wiki.ursine.ca/Top_posting

Rick Russell wrote:

You have to replace the default autoreply scrip with a new scrip with a
custom condition like so:

OK, I think I follow now. I take it I was correct in thinking that scrips
can only be set universally and not overridden on a per-queue basis?

Hello,

–Am 27. Dezember 2006 11:49:15 -0800 schrieb Paul Johnson
baloo@ursine.ca:

OK, I think I follow now. I take it I was correct in thinking that scrips
can only be set universally and not overridden on a per-queue basis?

you can use my addition/patch shown at
http://page.mi.fu-berlin.de/~pape/rt3screenshots/ to add this ability to
rt. (Bottom of the page, [download]), see the README in the download
directory to know how to proceed with either version of rt.

regards, Dirk.

Rick Russell wrote:

You have to replace the default autoreply scrip with a new scrip with a
custom condition like so:

my $Ticket = $self->TicketObj;
my $Transaction = $self->TransactionObj;

if ( ($Transaction -> Type eq ‘Create’)
&& !($Ticket->Queue eq ‘55’)
&& !($Ticket->Queue eq ‘65’)
&& !($Ticket->Queue eq ‘67’)
&& !($Ticket->Queue eq ‘68’)
&& !($Ticket->Queue eq ‘70’)
&& !($Ticket->Queue eq ‘77’)
&& !($Ticket->Queue eq ‘78’) )
{ return (1); }
else
{return (undef); }

As you can see, I’ve got a whole bunch of exceptions in there. If you
prefer to match by name, I suppose you could use

$Ticket->QueueObj->Name eq ‘Whatever’

instead.

OK, I’m not sure this works as advertised, as I get lines like this in my
log…

Dec 27 23:02:45 ursine RT: Scrip 3 IsApplicable failed: Global
symbol “$Transaction” requires explicit package name at (eval 1086) line 2.
Global symbol “$Ticket” requires explicit package name at (eval 1086) line
3. (/usr/share/request-tracker3.6/lib/RT/Condition/UserDefined.pm:67)
Dec 27 23:56:33 ursine RT: Scrip 3 IsApplicable failed: Global
symbol “$Transaction” requires explicit package name at (eval 1108) line 2.
Global symbol “$Ticket” requires explicit package name at (eval 1108) line
3. (/usr/share/request-tracker3.6/lib/RT/Condition/UserDefined.pm:67)

http://wiki.ursine.ca/Top_posting

Rick Russell wrote:

You have to replace the default autoreply scrip with a new scrip
with a
custom condition like so:

OK, I think I follow now. I take it I was correct in thinking that
scrips
can only be set universally and not overridden on a per-queue basis?

Disable the global scrip, and add an auto-reply per queue for the
queues which need it. We use a custom template per queue so it was
natural to do this anyhow.

The other global scrips are all sensible for all queues the way we
use them.

smime.p7s (2.47 KB)

Vivek Khera wrote:> On Dec 27, 2006, at 2:49 PM, Paul Johnson wrote:

Rick Russell wrote:

You have to replace the default autoreply scrip with a new scrip
with a
custom condition like so:

OK, I think I follow now. I take it I was correct in thinking that
scrips can only be set universally and not overridden on a per-queue
basis?

Disable the global scrip, and add an auto-reply per queue for the
queues which need it.

Is this documented in a straightforward manner somewhere? I seem to be
getting hung up on this.

I do this all the time. Disabling a response or changing a response
for a specific queue.
You simply have to assign a specific autoreply for each queue and then
you can change or modify or disable them as you wish.

If you do not know how to do this let me know and I can helpOn 1/13/07, Paul Johnson baloo@ursine.ca wrote:

Vivek Khera wrote:

On Dec 27, 2006, at 2:49 PM, Paul Johnson wrote:

Rick Russell wrote:

You have to replace the default autoreply scrip with a new scrip
with a
custom condition like so:

OK, I think I follow now. I take it I was correct in thinking that
scrips can only be set universally and not overridden on a per-queue
basis?

Disable the global scrip, and add an auto-reply per queue for the
queues which need it.

Is this documented in a straightforward manner somewhere? I seem to be
getting hung up on this.


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com