#23032 closed defect (fixed)

BridgeDB's email server stopped working upon upgrade to Debian 9

Reported by: isis Owned by: isis
Priority: Very High Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Major Keywords: bridgedb-email
Cc: Actual Points:
Parent ID: Points: 1
Reviewer: Sponsor: SponsorM


At least one of the problems stems from changes to Twisted made somewhere between 14.0.2 and 16.6.0, including that some classes/modules are missing/moved:

 Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 103, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 86, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 597, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 208, in doRead
    return self._dataReceived(data)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 214, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 454, in dataReceived
  File "/usr/lib/python2.7/dist-packages/twisted/mail/smtp.py", line 389, in lineReceived
    return getattr(self, 'state_' + self.mode)(line)
  File "/usr/lib/python2.7/dist-packages/twisted/mail/smtp.py", line 630, in dataLineReceived
    m.eomReceived() for m in self.__messages
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.4.0+0.g62b17e8.dirty-py2.7.egg/bridgedb/email/server.py", line 238, in eomReceived
    self.message = self.getIncomingMessage()
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.4.0+0.g62b17e8.dirty-py2.7.egg/bridgedb/email/server.py", line 257, in getIncomingMessage
    return smtp.rfc822.Message(rawMessage)
exceptions.AttributeError: 'module' object has no attribute 'rfc822'      

Child Tickets

#23033closedisisBridgeDB's tests are failing due to Twisted Trial changing the way modules are calledCircumvention/BridgeDB

Change History (1)

comment:1 Changed 22 months ago by isis

Points: 1
Resolution: fixed
Status: newclosed

A temporary fix for this was to downgrade to Twisted==16.1.1. I've done this in my fix/22998 branch which has been merged to develop for 0.5.x. I also hotpatched polyanthum, since without the emergency fix the email distributor would be broken.

We'll eventually need to sort out the differences and rewrite a bunch of stuff if we want to ever use anything newer than Twisted==16.1.1. (Or once Hyphae is done, IMHO we should just kill the email distributor entirely, because it sees like 99.99999% spam/bots.)

Note: See TracTickets for help on using tickets.