[Rt-devel] [script] Automatic removal of bounce-generating
addresses from ticket
Ruslan Zakirov
ruslan.zakirov at gmail.com
Fri Jan 13 14:27:18 EST 2006
On 1/13/06, Petter Reinholdtsen <pere at hungry.com> wrote:
> [Ruslan Zakirov]
> > You didn't configure your RT, see $RTAddressRegexp in config. I
> > don't remember if with this option RT addresses wouldbe in Cc,
> > AdminCc... lists, but I'm sure that notify scrip would skip them.
>
> I see your point, but we have a rather complex setup so keeping the
> regex in sync with all the mail addresses being forwarded into RT seem
> like the wrong solution to me. The people creating the queues using
> the web interface are not the people capable of (with access to)
> editing the config file. And the problematic addresses are typically
> foo at somewhere.uio.no, while the RT instance (and addresses for new RT
> queues) have the form bar at rt.uio.no. The regex would be a nice
> solution if we didn't migrate from existing mailing lists and had a
> simpler setup, but do not quite work for us.
>
> Any idea why the group operations in the script is so slow?
Yes. Use next *algorithm*:
for my $address( @addresses ) {
my $tickets = new ...;
$tickets->FromSQL( "Watcher.EmailAddress = '$address'" );
while( my $ticket = $tickets->Next ) {
$ticket->DeleteWatcher(Email => $address, Type => $_ ) for( qw(Cc
AdminCc Requestor) );
}
}
I think this should speedup things
--
Best regards, Ruslan.
More information about the Rt-devel
mailing list