> -----Original Message-----
> From: Travis Campbell [mailto:[EMAIL PROTECTED] 
> Sent: Monday, April 10, 2006 1:18 PM
> To: Schultz, Eric
> Cc: [email protected]
> 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:
<[EMAIL PROTECTED]>%';

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
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


We're hiring! Come hack Perl for Best Practical: 
http://bestpractical.com/about/jobs.html

Reply via email to