Moodle
  1. Moodle
  2. MDL-34153

Message-ID generated in forum posts are not valid RFC-2822 -> marked as SPAM

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.2
    • Component/s: Forum
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable email on your moodle (you may find divertallemailsto header useful for this)
      2. In a course with at least one student
      3. Create a news forum post as admin, check the mail now box
      4. Run admin/cron.php
      5. You should see the email being sent in log, e.g.:
        Processing module function forum_cron ...Processing user 3
        Sending post 1: Test topic
        Processing user 2
        Sending post 1: Test topic
        2 users were sent post 1, 'Test topic'
        
      6. Check your email and examine the headers, ensure they are well formed message id (ending with @yourmoodle) (NOTE: I found google mail rewrote the old message id, which was broken)
      Show
      Enable email on your moodle (you may find divertallemailsto header useful for this) In a course with at least one student Create a news forum post as admin, check the mail now box Run admin/cron.php You should see the email being sent in log, e.g.: Processing module function forum_cron ...Processing user 3 Sending post 1: Test topic Processing user 2 Sending post 1: Test topic 2 users were sent post 1, 'Test topic' Check your email and examine the headers, ensure they are well formed message id (ending with @yourmoodle) (NOTE: I found google mail rewrote the old message id, which was broken)
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
    • Rank:
      42487

      Description

      Forum posts have a message-ID, that does not comply with RFC-2822 and are therefore marked as SPAM messages. The message-Id now looks like this:

      18543f025334017e9c1714c1515ece93c1c34efa8633de38535522f916a6eebe

      should look like:

      18543f025334017e9c1714c1515ece93c1c34efa8633de38535522f916a6eebe@example.com

      detailed SPAM analysis (last line is the important line):

      -0.5 EH_f_whitelist5 Whitelist5 at (eduhi)
      0.2 EH_s_llwords Subject most used spammail words w(eduhi)
      0.4 EH_u_ulnumber URI: unliked number in uri (eduhi)
      0.5 EH_u_shortdir2 URI: URI with short dirs (eduhi)
      0.6 EH_u_shortdir URI: URI with short dirs (eduhi)
      0.0 HTML_MESSAGE BODY: Nachricht enth=C3=A4lt HTML
      1.7 MIME_QP_LONG_LINE RAW: "quoted-printable"-kodierte Zeile l=C3=A4n=
      ger als
      76 Zeichen
      0.7 SARE_MSGID_LONG50 Exceedingly long message id
      0.1 RDNS_NONE Delivered to trusted network by a host with no =
      rDNS
      0.9 SARE_MSGID_LONG45 Message ID has suspicious length
      2.6 INVALID_MSGID "Message-ID"-Zeile ist ung=C3=BCltig gem=C3=A4=
      =C3=9F RFC-2822

      To reproduce you have to use SpamAssassin 3.2.5

      Message-Id: <18543f025334017e9c1714c1515ece93c1c34efa8633de38535522f916a6eebe>
      X-Spam-Flag: YES
      X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mailgate3.eduhi.at
      X-Spam-Level: *******
      X-Spam-Status: Yes, score=7.3 required=5.8 tests=EH_f_whitelist5,EH_s_llwords,
      EH_u_shortdir,EH_u_shortdir2,EH_u_ulnumber,HTML_MESSAGE,INVALID_MSGID,
      MIME_QP_LONG_LINE,RDNS_NONE,SARE_MSGID_LONG45,SARE_MSGID_LONG50 autolearn=no
      version=3.2.5

      Another thing is, that also the long message ID increases the SPAM-level, but not that much as the invalid messageID

      Solution: add @wwwroot (without http) to the message ID, or the SMTP-server address, also possible generate a little shorter message IDs

        Issue Links

          Activity

          David Bogner created issue -
          David Bogner made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Major [ 3 ]
          Dan Poltawski made changes -
          Assignee moodle.com [ moodle.com ] Dan Poltawski [ poltawski ]
          Dan Poltawski made changes -
          Status Open [ 1 ] Development in progress [ 3 ]
          Dan Poltawski made changes -
          Labels triaged
          Dan Poltawski made changes -
          Fix Version/s STABLE backlog [ 10463 ]
          Dan Poltawski made changes -
          Dan Poltawski made changes -
          Link This issue is a regression caused by MDL-30698 [ MDL-30698 ]
          Dan Poltawski made changes -
          Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
          Pull 2.3 Diff URL https://github.com/danpoltawski/moodle/compare/moodle:MOODLE_23_STABLE...MDL-34153-23
          Testing Instructions # Enable email on your moodle (you may find divertallemailsto header useful for this)
          # In a course with at least one student
          # Create a news forum post as admin, check the mail now box
          # Run admin/cron.php
          # You should see the email being sent in log, e.g.:
          {code}
          Processing module function forum_cron ...Processing user 3
          Sending post 1: Test topic
          Processing user 2
          Sending post 1: Test topic
          2 users were sent post 1, 'Test topic'
          {code}
          # Check your email and examine the headers, ensure they are well formed message id (ending with @yourmoodle) (NOTE: I found google mail rewrote the old message id, which was broken)
          Pull 2.3 Branch MDL-34153-23
          Hide
          Dan Poltawski added a comment -

          Thanks for the report, David. I've submitted a patch for itnegration.

          Show
          Dan Poltawski added a comment - Thanks for the report, David. I've submitted a patch for itnegration.
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Sam Hemelryk made changes -
          Currently in integration Yes [ 10041 ]
          Sam Hemelryk made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator samhemelryk
          Hide
          Sam Hemelryk added a comment -

          Good spotting thanks David, changes looked good Dan, has been integrated now

          Show
          Sam Hemelryk added a comment - Good spotting thanks David, changes looked good Dan, has been integrated now
          Sam Hemelryk made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Fix Version/s 2.3.2 [ 12353 ]
          Fix Version/s STABLE backlog [ 10463 ]
          Tim Barker made changes -
          Tester rajeshtaneja
          Rajesh Taneja made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Hide
          Rajesh Taneja added a comment -

          Works Grt.

          Thanks for fixing this Dan.

          Show
          Rajesh Taneja added a comment - Works Grt. Thanks for fixing this Dan.
          Rajesh Taneja made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Hide
          Dan Poltawski added a comment -

          *Notice*: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26

          Congratulations

          {tracker.user.name}

          !

          You've made into Moodle

          {tracker.fixversion-1}

          +

          I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world.

          cheers!

          {tracker.friendlyintegrator}
          Show
          Dan Poltawski added a comment - * Notice *: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26 Congratulations {tracker.user.name} ! You've made into Moodle {tracker.fixversion-1} + I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world. cheers! {tracker.friendlyintegrator}
          Dan Poltawski made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes [ 10041 ]
          Integration date 19/Jul/12

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: