Does anyone have any way to make RT fail noisily when someone attaches
a file that is too large to a ticket?

I’m running RT 3.6.3 with MySQL as the back end. I’ve set my
max_packet size to be 2MB (a reasonable size IMO). I also set
MaxAttachmentSize to be 2097152

I would like my users (whether they are using the web interface or
email) to get notified that their attachment will not be part of the
ticket they are creating.

If I need to create an overlay to trap this condition, Any
suggestions as to where to start? I took a look at but I don’t see any easy way to get an error back
out to the user.
Robert G. Werner (Network Systems Administrator)


You know you’re a little fat if you have stretch marks on your car.
– Cyrus, Chicago Reader 1/22/82

We’ve added code that creates a DropAttach transaction if the attachment
size exceeds what is allowed. Our code-base differs somewhat
significantly from the latest stable release, but I’ve thrown together a
quick patch that should contain the differences between the code
snippets and the 3.6 files from the 3.6-RELEASE branch, attached.

If an agent attempts to attach a file that is too large, a transaction
will be created on the ticket similar to -

mdgilb - Attachment testlarge.txt too large to include with ticket (Max
size is 1048576 bytes)
Thu Mar 22 09:59:08 2007

Michael Gilbert
Software Support Group, Computing and Communications
University of Washington

Robert G. Werner wrote:

Attachment.patch (2.7 KB)

Transaction.patch (663 Bytes)