SMTP source keeps throwing exceptions

Bug #343784 reported by Jonathan Hitchcock
2
Affects Status Importance Assigned to Milestone
Ibid
Fix Released
Medium
Michael Gorven

Bug Description

The SMTP source keeps throwing exceptions, causing the mail server to log errors such as the following:

Mar 15 06:50:38 salt postfix/smtp[23063]: C2A6D2DE191: to=<email address hidden>, relay=pepper.omnia.za.net[196.1.57.18]:10025, delay=411019, delays=411017/0.05/0.78/1, dsn=4.4.2, status=deferred (lost co
nnection with pepper.omnia.za.net[196.1.57.18] while sending end of data -- message may be sent more than once)

The traceback is as follows:

Unhandled exception
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line 48, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line 33, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 37, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python2.5/site-packages/twisted/internet/selectreactor.py", line 139, in _doReadOrWrite
    why = getattr(selectable, method)()
  File "/usr/lib/python2.5/site-packages/twisted/internet/tcp.py", line 362, in doRead
    return self.protocol.dataReceived(data)
  File "/usr/lib/python2.5/site-packages/twisted/protocols/basic.py", line 149, in dataReceived
    self.lineReceived(line)
  File "/usr/lib/python2.5/site-packages/twisted/mail/smtp.py", line 572, in lineReceived
    return getattr(self, 'state_' + self.mode)(line)
  File "/usr/lib/python2.5/site-packages/twisted/mail/smtp.py", line 799, in dataLineReceived
    m.eomReceived() for m in self.__messages
  File "/home/spinach/ibid/ibid/source/smtp.py", line 65, in eomReceived
    event.message = stripsig.sub('', message).strip().replace('\n', ' ')
exceptions.TypeError: expected string or buffer

Related branches

Revision history for this message
Michael Gorven (mgorven) wrote :

I've added some logging to see what the email message actually is.

Changed in ibid:
importance: Undecided → Medium
milestone: none → 0.1
status: New → Confirmed
Revision history for this message
Michael Gorven (mgorven) wrote : Re: [Bug 343784] [NEW] SMTP source keeps throwing exceptions

 status inprogress
 assignee mgorven
 milestone 0.1
 importance medium

Changed in ibid:
assignee: nobody → mgorven
status: Confirmed → In Progress
Changed in ibid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.