Hi all,

We have an application that generates messages and sends them to our users.
Our mail system is configures so that anyone that replies to these emails, a 
ticket is created in one of our queues.

My problem is that auto replies (ie. out of office messages) are creating 
tickets.
I've found a function in ../lib/RT/Interface/Email.pm that is checking the 
headers of the emails but the value returned from the function is always the 
same (as I understand from my limited perl skills).

sub CheckForAutoGenerated {
my $head = shift;

my $Precedence = $head->get("Precedence") || "";
if ( $Precedence =~ /^(bulk|junk)/i ) {
return (1);
}

# Per RFC3834, any Auto-Submitted header which is not "no" means
# it is auto-generated.
my $AutoSubmitted = $head->get("Auto-Submitted") || "";
if ( length $AutoSubmitted and $AutoSubmitted ne "no" ) {
return (1);
}

# First Class mailer uses this as a clue.
my $FCJunk = $head->get("X-FC-Machinegenerated") || "";
if ( $FCJunk =~ /^true/i ) {
return (1);
}

return (0);
}


Does the above function always return "0"? If so, is this correct? I modified 
the function on my test system so that if one of the conditions are met the 
returned value is "1" and it seems that RT is now filtering out any auto 
replies. 
Am I missing something here, maybe a dependency? Is the function above right?

The strange thing I noticed is that if RT sends an email (ie. from a ticket 
comment/reply) and it gets an auto reply, then it is filtered by the system and 
the auto reply does not get recorded in any ticket or even create a new one.



Thanks in advance

Nik 
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [email protected]

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26

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

Reply via email to