[rt-devel] [BUG] Email bounces when subject > 200 bytes

Kouprie, Robbert R.Kouprie at DTO.TUDelft.NL
Tue Feb 17 10:24:26 EST 2004


Hi,

I'm running RT 3.0.8 on Debian Linux. DBMS is Postgres. Recently i received
this error:

Feb 15 22:27:17 nero postgres[25682]: [3] ERROR:  value too long for type
character varying(200)
Feb 15 23:27:17 nero RT: DBD::Pg::st execute failed: ERROR:  value too long
for type character varying(200) at
/usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 410.
(/usr/share/perl5/RT.pm:247)  
Feb 15 23:27:17 nero RT: Create failed: 0 / 0 / Ticket could not be created
due to an internal error  (/usr/share/perl5/RT/Interface/Email.pm:684)  

I traced it down to the subject field of the incoming e-mail being > 200
bytes, and therefore Postgres erroring out. I did a quick hack to fix this
in /usr/share/perl5/RT/Interface/Email.pm (see below patch - against 3.0.8).
I didn't see anything of this kind in 3.0.9, so I assume the bug is still
there. Can this be included, or fixed in an other (better?) way?

Thanks,
- Robbert

--- Email.pm.orig       2004-02-17 15:40:36.000000000 +0100
+++ Email.pm    2004-02-17 15:44:43.000000000 +0100
@@ -667,6 +667,9 @@
             );
         }

+       # fix for subjects that are too long
+       if (length($Subject) > 200) { $Subject = substr($Subject,0,200); }
+
         my ( $id, $Transaction, $ErrStr ) = $Ticket->Create(
             Queue     => $SystemQueueObj->Id,
             Subject   => $Subject,





More information about the Rt-devel mailing list