Modify

Opened 8 years ago

Closed 8 years ago

#1153 closed defect (fixed)

Overly large attachment doesn't bounce

Reported by: anonymous Owned by: bas
Priority: normal Component: EmailtoTracScript
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (last modified by coderanger)

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

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by bas

  • Status changed from new to assigned
  • Trac Release changed from 0.9 to 0.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 8 years ago by coderanger

  • Description modified (diff)

Fixing formatting.

comment:3 Changed 8 years ago by bas

I have to think about reporting the error back to the user of list the error in the ticket field. If i exit and have syslog enabled the error will only be reported in the logs.

comment:4 Changed 8 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

I will no be in the ticket change log if attachment is too large. The MTA can also configured to bounce message that are greater then a specified size.

Add Comment

Modify Ticket

Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.