duplicate Message-Id in issue comment notification mails (BB-8498)

Issue #7315 resolved
Jakub Wilk
created an issue

These two comments:

generated notification mails with the message msg-id:

Message-ID: <issues-964630acc7914a0d4881b8f43f753ded/updated@bitbucket.org>

But RFC 5322, §3.6.4 reads “The message identifier (msg-id) itself MUST be a globally unique identifier for a message. The generator of the message identifier MUST guarantee that the msg-id is unique.”

Comments (24)

  1. Martin Eden

    As I noted in #9028, this is not just a matter of good compliance with the RFC - there is at least one real world problem caused by this, namely "many mail servers have a filter on them which prevents messages with the same id being delivered multiple times to an individual." So we only receive one email notification about a given issue, before the rest are swallowed up through having the same ID.

  2. James Dempster

    I'm shocked to see how old this issue is. It took some time to trace the problem of emails not arriving to this. But without a doubt this is the issue. A big issue too. Come on bitbucket emails are not arriving due to breaking the RFC!

    Any ideas on an ETA to fix this?

  3. Zachary Davis

    Hi James,

    Sorry this is causing you problems. I can't give you an ETA, but I am actively looking into the best way to fix this. I'll update this ticket when I have more information.

    Cheers, Zach

  4. Abhin Chhabra staff

    Hi James,

    I have a fix out for review, but I'm going to spend some time writing more tests to avoid breaking related features like mail-pickup (responding to comments by replying to the email). This shouldn't take much more time. I'll keep you posted.

  5. Kevin D. Keck

    I suspect is the source of the puzzling behaviour I've been seeing in Thunderbird: every notification I receive of a new comment on a particular issue/commit/PR has the same message body, reporting (again) the first comment added after I began watching the issue/comment/PR. Apparently Thunderbird pulls up the message body based on that message ID, so it keeps showing the body of the same message, no matter which notification message I try to open.

  6. James Dempster

    Thanks @Abhin Chhabra for deploying a fix. I now see a Message-ID header which doesn't clash with previous comments.

    It might be worth checking the References header, it seems the content of the header is being output twice separated by a newline.

  7. Abhin Chhabra staff

    The second occurrence of the References header is the In-Reply-To header, which we're choosing to keep the same as the References header in this instance. Is that what you're referring to?

  8. Martin Eden

    Sorry, you're right, this has been fixed for issue related emails. The gap of a year had muddled my memory. I can't confirm for PRs right now - don't have access to the mail server that exhibited the problem.

  9. Zachary Davis

    I just meant can you confirm for issue emails, so thanks for doing that. I'm closing this out again, but I'll raise an internal issue (if one doesn't already exist) for the rest of the emails.

  10. Log in to comment