[rt-users] Auto replies create tickets

n.chrysandreas at albourne.com n.chrysandreas at albourne.com
Thu Feb 18 05:22:44 EST 2010


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 



More information about the rt-users mailing list