Mail gateway failure

It looks like some combination of characters in the ticket message can
crash rt-mailgate. One of the tickets was stuck in the sendmail queue
with sendmail failing to deliver it to the rt-mailgate alias. Each time
the sendmail ran the queue a comment was added to the ticket.
I looked at the ticket and somebody pasted a part of the PDF file into
the message with a bunch of postscript like text.
I took the mail message off the sendmail queue and ran it by hand and I
see the following error:

cat dfh59K26gU022638 | /usr/local/rt3/bin/rt-mailgate --debug --queue

Incoming --action comment --url http://ticket.foo.com/

Connecting to http://ticket.foo.com//REST/1.0/NoAuth/mail-gateway at
/usr/local/rt3/bin/rt-mailgate line 406, <> chunk 1.
An Error Occurred

500 read timeout
This is /usr/local/rt3/bin/rt-mailgate exiting because of an undefined
server error at /usr/local/rt3/bin/rt-mailgate line 448, <> chunk 1.

I use rt-3.0.2 on redhat 8, with mysql-4.0.13, apache 1.3.27, with both
SSL and perl modules
Peter Ziobrzynski, mailto:pzi@pzi.net