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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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:

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12