Opened 17 years ago

Last modified 17 years ago

#1153 closed defect

Overly large attachment doesn't bounce — at Version 2

Reported by: anonymous Owned by: Bas van der Vlies
Priority: normal Component: EmailtoTracScript
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (last modified by Noah Kantrowitz)

I have a message that has generated a ton of duplicate bugs. The problem is that it has an attachment that is overly large. The upload throws an error that email2trac doesn't catch and so the mail goes back to the queue for delivery again. The thing is the ticket actually gets created with the attachment (cut short) and so there are duplicate tickets now. It would be better if the error were caught and it generated a bounce to the sender. I will look to upgrade trac and see if that fixes the problem as well but really it looks from my read of the code for email2trac that an error should be caught there and dealt with.

Here is the traceback from my logs.

Jan 28 12:19:08 elwing email2trac: Traceback (most recent call last):
Jan 28 12:19:08 elwing email2trac:   File "/usr/local/sbin//email2trac", line 890, in ?     tktparser.parse(sys.stdin)
Jan 28 12:19:08 elwing email2trac:   File "/usr/local/sbin//email2trac", line 520, in parse     self.new_ticket(m)
Jan 28 12:19:08 elwing email2trac:   File "/usr/local/sbin//email2trac", line 478, in new_ticket     n =  self.attachments(msg, tkt)
Jan 28 12:19:08 elwing email2trac:   File "/usr/local/sbin//email2trac", line 749, in attachments     att.insert(url_filename, fd, filesize)
Jan 28 12:19:08 elwing email2trac:   File "/usr/lib/python2.3/site-packages/trac/attachment.py", line 130, in insert     'Upload failed')
Jan 28 12:19:08 elwing email2trac: TracError: Maximum attachment size: 262144 bytes

Change History (2)

comment:1 Changed 17 years ago by Bas van der Vlies

Status: newassigned
Trac Release: 0.90.10

This is an error and i will fix it. Thanks for the report. You can set the Maximun Attachment size in trac.ini:

[attachment]
max_size = -1

unlimited ;-)

comment:2 Changed 17 years ago by Noah Kantrowitz

Description: modified (diff)

Fixing formatting.

Note: See TracTickets for help on using tickets.