[rt-users] Prevent ticket creation when RT is not "To:" addressee

Gene LeDuc gleduc at mail.sdsu.edu
Mon Sep 14 14:50:18 EDT 2009


Hi All,

I'd like to prevent ticket creation when an incoming e-mail does not 
have one of RT's addresses as a To: address.  In other words, if a 
ticket gets to RT only because of a Cc: or Bcc:, I don't want a ticket 
to be created.  The problem this solves for me is I get a lot of 
spurious tickets created by Reply-All e-mails.  What I've done in the 
past is use an OnCreate scrip to determine whether the ticket should 
have been created, and then delete it if it's bogus.  This approach gets 
rid of the ticket, but it still clutters the database and increments the 
ticket ID with each bad ticket.

I've looked at the wiki and searched a couple years of rt-users 
messages, but haven't found an answer.  So I'm ready to roll my own. 
Before I do, though, I have some questions:

1.  Has this already been done and is the code out there somewhere?
2.  Does RT know what addresses are assigned to it?  (Since incoming 
mail is handled by the MTA and only the queue name is passed to 
rt-mailgate, my guess is No, but it's worth asking anyway.  I do know I 
can get the queue addresses RT uses for outgoing mail.)
3.  Am I overlooking some reason I should not do this?  (I've been a 
victim of the Law of Unintended Consequences before and would prefer to 
avoid it if possible.)

Thanks for your insights.
Gene



More information about the rt-users mailing list