Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53102

Message-ID email headers not consistent or using correct domain

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Send emails from a box where the box hostname is different to the moodle hostname, ensure that the message id's use the correct domain.

      Do this for non-forum emails.

      Also do this for forum emails which were unaffected but have been refactored to use the same function.

      Also test for the case where moodle is installed into / vs the case where it is installed into /somedirectory - in the latter the path should be part of the message ID so that you can tell apart emails coming from two different moodles on the same domain and also avoid messageid clashes.

      Show
      Send emails from a box where the box hostname is different to the moodle hostname, ensure that the message id's use the correct domain. Do this for non-forum emails. Also do this for forum emails which were unaffected but have been refactored to use the same function. Also test for the case where moodle is installed into / vs the case where it is installed into /somedirectory - in the latter the path should be part of the message ID so that you can tell apart emails coming from two different moodles on the same domain and also avoid messageid clashes.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-53102-messageid

      Description

      The Message-ID sent by the forums looks like this:

      Message-ID: <4bbdaa38e103be58480dec51fb53776b007b2e41917d6e1be74a1e5d5245e475@moodle.local>

      All other emails though don't have a message id set in moodle so it gets autogenerated somewhere up the chain which defaults to the OS hostname box which is often different to the moodle domain, eg so from my dev box with the same moodle but an email message from somewhere other than the forum:

      Message-ID: <c6c95b91d0859cca25bb324a6649fc46@silverbirch>

      So proposing to detect missing message id's and auto generate them in email_to_user() to make sure they exist with the right domain, and also refactoring some of the generation logic in mod/forum so it can be used from all plugins / core, and also consistent everywhere.

      This is blocking MDL-53023 which will enable postfix or another MTA to communicate SMTP results back to moodle, but it needs to know which moodle the email came from in the first place. The only reliable place to get this is MessageID, all other fields could be indistinguishable across multiple moodle instances all using the same MTA.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16