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

Incoming email pickup (tool_messageinboundtaskpickup_task) should indicate to admins when its not working

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup inbound message processing badly with different types of errors:

      $CFG->messageinbound_host is a broken host
      $CFG->messageinbound_hostuser / pass is wrong

      eg add this to config.php

      $CFG->messageinbound_enabled = 1;
      $CFG->messageinbound_mailbox = 'moodle';
      $CFG->messageinbound_domain = 'moodle.edu';
      $CFG->messageinbound_host = 'mail.nowhere.com';
      $CFG->messageinbound_hostuser = 'moodle@moodle.edu';
      $CFG->messageinbound_hostpass = 'thiswillneverwork';
      

      and run

      php admin/tool/task/cli/schedule_task.php --execute='\tool_messageinbound\task\pickup_task'

      1. Check that the faildelay is correctly increased when it fails.
      2. Check that the faildelay is reset when it is configured correctly.
      3. Check that the faildelay is zero when the inbound messaging is not enabled
      Show
      Setup inbound message processing badly with different types of errors: $CFG->messageinbound_host is a broken host $CFG->messageinbound_hostuser / pass is wrong eg add this to config.php $CFG->messageinbound_enabled = 1; $CFG->messageinbound_mailbox = 'moodle'; $CFG->messageinbound_domain = 'moodle.edu'; $CFG->messageinbound_host = 'mail.nowhere.com'; $CFG->messageinbound_hostuser = 'moodle@moodle.edu'; $CFG->messageinbound_hostpass = 'thiswillneverwork'; and run php admin/tool/task/cli/schedule_task.php --execute='\tool_messageinbound\task\pickup_task' Check that the faildelay is correctly increased when it fails. Check that the faildelay is reset when it is configured correctly. Check that the faildelay is zero when the inbound messaging is not enabled
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-52199-incoming-nice-fail

      Description

      The problem is that its incredibly difficult for an admin to work out why incoming email configuration is not working unless they constantly look at cron output. Things look like they are working, but in the logs:

      [28061 | 18/11/2015 16:46:41] Unable to connect to IMAP server. Failed with 'Error connecting to mail server.'
      [28061 | 18/11/2015 16:46:41] ... used 0 dbqueries
      [28061 | 18/11/2015 16:46:41] ... used 30.111247062683 seconds
      [28061 | 18/11/2015 16:46:41] Scheduled task complete: Incoming email pickup (tool_messageinboundtaskpickup_task)
      

      The scheduled task does not exit with failure - which at least would give an indication of failure to the scheduled tasks system (although is quite a blunt instrument)

        Attachments

          Activity

            People

            Assignee:
            brendanheywood Brendan Heywood
            Reporter:
            poltawski Dan Poltawski
            Peer reviewer:
            Ankit Agarwal
            Integrator:
            Dan Poltawski
            Tester:
            Adrian Greeve
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Jan/17