~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/mail/incoming.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-05-31 00:00:38 UTC
  • mfrom: (13139.1.1 rollback-13139)
  • Revision ID: launchpad@pqm.canonical.com-20110531000038-s0tqzkfwiymxeez0
[rs=wgrant][rollback=13139] Revert r13139. Messages are not unique
 over all of LP.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    )
51
51
from canonical.launchpad.webapp.interfaces import IPlacelessAuthUtility
52
52
from canonical.librarian.interfaces import UploadFailed
53
 
from lp.app.errors import NotFoundError
54
53
from lp.registry.interfaces.person import IPerson
55
54
from lp.services.features import getFeatureFlag
56
55
from lp.services.mail.handlers import mail_handlers
57
56
from lp.services.mail.sendmail import do_paranoid_envelope_to_validation
58
57
from lp.services.mail.signedmessage import signed_message_from_string
59
 
from lp.services.messages.interfaces.message import IMessageSet
60
58
 
61
59
# Match '\n' and '\r' line endings. That is, all '\r' that are not
62
60
# followed by a '\n', and all '\n' that are not preceded by a '\r'.
426
424
 
427
425
    log.debug('processing mail from %r message-id %r' %
428
426
        (mail['from'], mail['message-id']))
429
 
    msg_set = getUtility(IMessageSet)
430
 
    try:
431
 
        msg_set.get(mail['message-id'])
432
 
    except NotFoundError:
433
 
        pass
434
 
    else:
435
 
        log.warning(
436
 
            'Message with id %s already stored.  Skipping.',
437
 
            mail['message-id'])
438
 
        return None
439
427
 
440
428
    # If the Return-Path header is '<>', it probably means
441
429
    # that it's a bounce from a message we sent.