Searching for the To: field within RT?

Hello,

Is there an easy way to search for an email address that has a specific To:
address?

Here’s why I want to do this:

I have RT set up so that isRTAddress() recognizes some of our legacy support
addresses that we’ve been required to keep for non-technical reasons. I’m
trying to find out which of our customers is still using these old addresses,
so I’d like to search for any tickets that came into that address.

Is there any way to use RT’s search interface to do this or am I going to
have to grovel through the Attachments table and work my way backwards to
find this information?

Travis
Travis Campbell - Unix Systems Administrator = travis@mpdtxmail.amd.com
5900 E. Ben White Blvd, Austin, TX 78741 = travis.campbell@amd.com
TEL: (512) 602-1888 PAG: (512) 604-0341 = webmaster@mpdtxmail.amd.com
“Does anything work as expected?” Yes. An axe through the CPU.

Why not have sendmail/postfix log which mails come to those address?

Travis Campbell wrote:

Hello,

Is there an easy way to search for an email address that has a
specific To:
address?

Here’s why I want to do this:

I have RT set up so that isRTAddress() recognizes some of our legacy
support
addresses that we’ve been required to keep for non-technical reasons.
I’m
trying to find out which of our customers is still using these old
addresses,
so I’d like to search for any tickets that came into that address.

Is there any way to use RT’s search interface to do this or am I going to
have to grovel through the Attachments table and work my way backwards to
find this information?

Travis

Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati

Why not have sendmail/postfix log which mails come to those address?

Travis Campbell wrote:

Hello,

Is there an easy way to search for an email address that has a
specific To:
address?

Here’s why I want to do this:

I have RT set up so that isRTAddress() recognizes some of
our legacy
support
addresses that we’ve been required to keep for
non-technical reasons.
I’m
trying to find out which of our customers is still using these old
addresses,
so I’d like to search for any tickets that came into that address.

Is there any way to use RT’s search interface to do this or
am I going to
have to grovel through the Attachments table and work my
way backwards to
find this information?

Travis


Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati

Or have a scrip that changes the subject, sets a custom field, moves it
to a “legacy” queue, or emails you when you get an email sent to such an
address?

Eric Schultz
United Online

Schultz, Eric wrote:

Why not have sendmail/postfix log which mails come to those address?

Or have a scrip that changes the subject, sets a custom field, moves it
to a “legacy” queue, or emails you when you get an email sent to such an
address?

Because I’m just looking for the tickets. This particular configuration
has been in place for six months and I’ve been asked to find out which
tickets already match this condition.

Travis

Travis Campbell - Unix Systems Administrator = travis@mpdtxmail.amd.com
5900 E. Ben White Blvd, Austin, TX 78741 = travis.campbell@amd.com
TEL: (512) 602-1888 PAG: (512) 604-0341 = webmaster@mpdtxmail.amd.com
“Does anything work as expected?” Yes. An axe through the CPU.

-----Original Message-----
From: Travis Campbell [mailto:travis.campbell@amd.com]
Sent: Monday, April 10, 2006 1:18 PM
To: Schultz, Eric
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Searching for the To: field within RT?

Schultz, Eric wrote:

Why not have sendmail/postfix log which mails come to
those address?

Or have a scrip that changes the subject, sets a custom
field, moves it
to a “legacy” queue, or emails you when you get an email
sent to such an
address?

Because I’m just looking for the tickets. This particular
configuration
has been in place for six months and I’ve been asked to find out which
tickets already match this condition.

Travis

In that case, you would have to do a SQL query:

SELECT Headers FROM Attachments WHERE Headers LIKE ‘%To:
legacyqueuename@yourdomain.com%’;

If you only want this for when a new ticket was created via email
(rather than for responses to those tickets), add:

AND Headers NOT LIKE ‘%Thread-Topic: [<yourdomainname.com>%’

Or whatever you have set as $rtname in RT_SiteConfig.pm. And then have
a Perl script that just greps out the From: line from all of those
headers.

Eric Schultz
United Online

In that case, you would have to do a SQL query:

SELECT Headers FROM Attachments WHERE Headers LIKE ‘%To:
legacyqueuename@yourdomain.com%’;

If you only want this for when a new ticket was created via email
(rather than for responses to those tickets), add:

AND Headers NOT LIKE ‘%Thread-Topic: [<yourdomainname.com>%’

Or whatever you have set as $rtname in RT_SiteConfig.pm. And then have
a Perl script that just greps out the From: line from all of those
headers.

Thanks. That’s what I was leaning towards if RT didn’t have an explicit
way to do it via the search API.

Travis

Travis Campbell - Unix Systems Administrator = travis@mpdtxmail.amd.com
5900 E. Ben White Blvd, Austin, TX 78741 = travis.campbell@amd.com
TEL: (512) 602-1888 PAG: (512) 604-0341 = webmaster@mpdtxmail.amd.com
“Does anything work as expected?” Yes. An axe through the CPU.