Re: [rt-users] Auto replies create tickets

2010-02-23 Thread Nikolas Chrysandreas
Hi Brian,

 You can see on your headers that rt added an RT-DetectedAutoGenerated
 header, but still accepted it... So I'd look at that other code.

I've been looking to find the code that is responsible for this but can't find 
it.
Can you please point out the modules that are responsible for this so I can 
investigate?

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

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


Re: [rt-users] Auto replies create tickets

2010-02-22 Thread Luis E.
On Mon, 2010-02-22 at 06:39 +, n.chrysandr...@albourne.com wrote:
 Hi all,
 
 I need some feedback on this before I push any changes out to our live system.
 I need to fix this relatively soon as I have 10-12 tickets created from auto 
 replies every day. 
 I would appreciate any thoughts as it would be very helpful for me.
 [...]
 - n chrysandreas n.chrysandr...@albourne.com wrote:
 
  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).
   [...]
  Does the above function always return 0? [...]

No. The function returns 1 when it matches a header that is known to
mark some kind of auto-generated message. Now, I have observed that
there are automated messages that don't trigger the rule, but never
enough to have me actually go up and improve the function to catch
those. Looks like you're luckier than me.

Start by isolating a few samples of those auto-reply messages that are
indeed showing up in your queues and possibly put them somewhere where
people in the list can take a look at them (including the headers, of
course). Then post the URL here.

Regards.

-lem

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

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


Re: [rt-users] Auto replies create tickets

2010-02-22 Thread n . chrysandreas
Hi Lem,

Thanks for the reply.

The headers of the auto reply emails that pass through to RT are as below 

-
Received: XXX
Received: YYY
Received: ZZZ
MIME-Version: 1.0
Subject: Re: SOME TITLE
In-Reply-To: 78e4706e7c8637f1c0db00ad40035...@mydomain.com
Date: Wed, 17 Feb 2010 09:08:04 + (GMT)
Auto-Submitted: auto-replied (zimbra; vacation)
Precedence: bulk
Content-Type: text/plain; charset=utf-8
X-Virus-Scanned: amavisd-new at server.mydomain.com
Message-ID: 464307537.2782761266397684254.javamail.r...@server
To: thequ...@mydomain.com
Content-Transfer-Encoding: 7bit
From: USER u...@mydomain.com
X-RT-Original-Encoding: utf-8
RT-Squelch-Replies-To: u...@mydomain.com
RT-DetectedAutoGenerated: true
Content-Length: 196

[Message body]
-


Why would the function not detect 
-Precedence: bulk
-Auto-Submitted: auto-replied
in the header?


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

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


Re: [rt-users] Auto replies create tickets

2010-02-22 Thread Brian D
I am not near a pc at the moment to check on this again, but I recall when I
had looked at this same issue, I found that where CheckForAutoGenerated was
called from was not always reacting how you'd expect.  We ended up
pre-filtering auto gen email in postfix... just had to be careful not to
filter rt's own autoresponses :)

You can see on your headers that rt added an RT-DetectedAutoGenerated
header, but still accepted it...  So I'd look at that other code.

On Feb 22, 2010 10:10 AM, n.chrysandr...@albourne.com wrote:

Hi Lem,

Thanks for the reply.

The headers of the auto reply emails that pass through to RT are as below

-
Received: XXX
Received: YYY
Received: ZZZ
MIME-Version: 1.0
Subject: Re: SOME TITLE
In-Reply-To: 78e4706e7c8637f1c0db00ad40035...@mydomain.com
Date: Wed, 17 Feb 2010 09:08:04 + (GMT)
Auto-Submitted: auto-replied (zimbra; vacation)
Precedence: bulk
Content-Type: text/plain; charset=utf-8
X-Virus-Scanned: amavisd-new at server.mydomain.com
Message-ID: 464307537.2782761266397684254.javamail.r...@server
To: thequ...@mydomain.com
Content-Transfer-Encoding: 7bit
From: USER u...@mydomain.com
X-RT-Original-Encoding: utf-8
RT-Squelch-Replies-To: u...@mydomain.com
RT-DetectedAutoGenerated: true
Content-Length: 196

[Message body]
-


Why would the function not detect
-Precedence: bulk
-Auto-Submitted: auto-replied
in the header?


Thanks
Nik

___
http://lists.bestpractical.com/cgi-bin/mailman/listi...
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

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

Re: [rt-users] Auto replies create tickets

2010-02-21 Thread n . chrysandreas
Hi all,

I need some feedback on this before I push any changes out to our live system.
I need to fix this relatively soon as I have 10-12 tickets created from auto 
replies every day. 
I would appreciate any thoughts as it would be very helpful for me.

Thanks again

Nik


- n chrysandreas n.chrysandr...@albourne.com wrote:

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

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


[rt-users] Auto replies create tickets

2010-02-18 Thread n . chrysandreas
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: sa...@bestpractical.com

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