[rt-users] script to check out if max attachment size is reached

Alex Vandiver alexmv at bestpractical.com
Fri Mar 6 12:10:26 EST 2015


On Fri, 06 Mar 2015 12:42:38 +0100 Loïc Cadoret <lcadoret at keyyo.com>
wrote:
> Greetings rt-users followers,
> 
> I would like to create a script that check out if the max attachment 
> size of a response is reached and if so, send an autoreply to the 
> requestor informing him that his documents are too heavy. Indeed, 
> customers send documents to our customer services but sometimes the 
> transaction is droped by the system because max attachment is reached 
> and neither  the customer service or the client is notified of it.

Starting in RT 4.2.7, RT records explicit transactions when attachments
are dropped or truncated due to hitting $MaxAttachmentSize.  While we
explicitly prevent such transactions from triggering scrips (to prevent
infinite loops), you can likely use them as the basis of your
notifications -- or, at least the signal to the RT users to notify
customers of the drop.

 - Alex



More information about the rt-users mailing list