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

Create an inbound e-mail handling system

XMLWordPrintable

    • MOODLE_28_STABLE
    • MDL-47194-master
    • Hide
      Test Requirements

      For these tests you will need:

      1. outbound mail to be correctly configured and working on your system;
      2. a test e-mail account (Andrew can provide you with details of one, or you can create a new Gmail account)
      Initial setup
      1. Setup VERP handling:
        1. Open Site administration -> Server -> Incoming mail configuration -> Mail settings
          1. Enable incoming mail processing;
          2. Add your inbound mailbox details
          3. Save changes
        2. Open Site administration -> Server -> Incoming mail configuration -> Message Handlers
          1. Enable the private files handler
      2. Reduce the max editing time of your forum messages to preserve testing sanity
        1. Open Site administration -> Security -> Site policies
        2. Set the maxediting time to 1 minute
      3. Create a new course
      4. Enrol a couple of users - you probably only want one; or two
      5. Create a new forum in that course - choose auto subscription
      Forum tests

      The following forum tests are all fairly similar. They differ in some minor details:

      1. The Sender address; and
      2. The setting for the handler on whether to verify this address

      Note: These tests need to be run both with plaintext emails, and HTML e-mails.
      Note: Please try including attachments within your message
      Note: There are two types of e-mail attachment: Inline (typically images inline with text), and attachment (as an attachment to the whole message). Please use both.

      Forum test 1
      1. Create a new post in your forum; wait a minute; run cron to send the forum e-mail
      2. Check your e-mail. You should have received an e-mail for each of the enrolled users.
      3. Reply to the message as your first user
        1. Note: The sender e-mail address must be correct and must match the address in the user profile
        2. Note: If using gmail, you may need to copy/paste the reply-to address from gmail because GMail are sucky
      4. Send your message
      5. Wait a minute, then run cron again. Alternatively, just run the pickup task:

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

        • Confirm the blissful absence of error messages in the cron task
        • Confirm that the message was posted in the forum
      Forum test 2
      1. Reply to the message as your first user again
        1. This time, use a different sender address (e.g. an alias)
        2. Note: If using gmail, you may need to copy/paste the reply-to address from gmail because GMail are sucky
      2. Send your message
      3. Wait a minute, then run pickup task again
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that the message was not posted into the forum
      4. Check your e-mail again and you should have a new message from Moodle
      5. Reply to the message as the correct e-mail address for the user
      6. Run the pickup task again
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that the message was posted in the forum
      Forum test 3
      1. Reply to the message as your first user again
        1. This time, use a different sender address (e.g. an alias)
        2. Note: If using gmail, you may need to copy/paste the reply-to address from gmail because GMail are sucky
      2. Send your message
      3. Wait a minute, then run pickup task again
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that the message was not posted into the forum
      4. Check your e-mail again and you should have a new message from Moodle
      5. Reply to the message as the incorrect e-mail address for the user again
      6. Run the pickup task again
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that the message was posted in the forum
      Forum test 4
      1. Open Site administration -> Server -> Incoming mail configuration -> Message Handlers
      2. Edit the forum handler and set:
        1. Require validation: false
      3. Reply to the message as your first user again
        1. This time, use a different sender address (e.g. an alias)
        2. Note: If using gmail, you may need to copy/paste the reply-to address from gmail because GMail are sucky
      4. Send your message
      5. Wait a minute, then run pickup task again
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that the message was posted in the forum
      Forum test 5
        1. Open Site administration -> Server -> Incoming mail configuration -> Message Handlers
          1. Disable the mod_forum handler
      1. Reply to the message as your first user again
      2. Wait a minute, then run pickup task again
        • Confirm that the message was NOT posted in the forum
        • Confirm that you received a reply informing you that the handler was disabled
      Private Files
      1. Open Navigation -> My profile -> My private files
        • Confirm that no e-mail address is shown on the private files page
        1. Open Site administration -> Server -> Incoming mail configuration -> Message Handlers
          1. Enable the mod_forum handler
      2. Open Navigation -> My profile -> My private files
        • Confirm that an e-mail address is now shown on the private files page
      As the correct user
      1. Send an e-mail to the address provided, using the correct sender address for that moodle user
        • Include attachments, both inline and as attachments
      2. Run pickup task
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that your file was uploaded to private files
      With a different e-mail address
      1. Send an e-mail to the address provided, using a different e-mail address
        • Include attachments, both inline and as attachments
      2. Run pickup task
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that your file was not uploaded to private files
      3. Check your e-mail again and you should have a new message from Moodle
      4. Reply to the message as the incorrect e-mail address for the user again
      5. Run the pickup task again
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that your file was uploaded to private files
      Without requiring validation
      1. Open Site administration -> Server -> Incoming mail configuration -> Message Handlers
      2. Edit the private files handler and set:
        1. Require validation: false
      3. Send an e-mail to the address provided, using the correct sender address for that moodle user
        • Include attachments, both inline and as attachments
      4. Run pickup task
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that your file was uploaded to private files
      5. Send an e-mail to the address provided, using a different e-mail address
        • Include attachments, both inline and as attachments
      6. Run pickup task
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that your file was uploaded to private files
      Disabling handler
      1. Open Site administration -> Server -> Incoming mail configuration -> Message Handlers
      2. Edit the private files handler and set:
        1. Require validation: true
      3. Send an e-mail to the address provided, using a different e-mail address
        • Include attachments, both inline and as attachments
      4. Run pickup task
        • Confirm the blissful absence of error messages in the cron task
        • Confirm that your file was not uploaded to private files
        1. Open Site administration -> Server -> Incoming mail configuration -> Message Handlers
          1. Disable the private files handler
      5. Check your e-mail again and you should have a new message from Moodle
      6. Reply to the message to confirm the authenticity
      7. Run pickup task
        • Confirm that your file was not uploaded to private files
        • Confirm that you received a reply informing you that the handler was disabled
      Show
      Test Requirements For these tests you will need: outbound mail to be correctly configured and working on your system; a test e-mail account (Andrew can provide you with details of one, or you can create a new Gmail account) Initial setup Setup VERP handling: Open Site administration -> Server -> Incoming mail configuration -> Mail settings Enable incoming mail processing; Add your inbound mailbox details Save changes Open Site administration -> Server -> Incoming mail configuration -> Message Handlers Enable the private files handler Reduce the max editing time of your forum messages to preserve testing sanity Open Site administration -> Security -> Site policies Set the maxediting time to 1 minute Create a new course Enrol a couple of users - you probably only want one; or two Create a new forum in that course - choose auto subscription Forum tests The following forum tests are all fairly similar. They differ in some minor details: The Sender address; and The setting for the handler on whether to verify this address Note: These tests need to be run both with plaintext emails, and HTML e-mails. Note: Please try including attachments within your message Note: There are two types of e-mail attachment: Inline (typically images inline with text), and attachment (as an attachment to the whole message). Please use both. Forum test 1 Create a new post in your forum; wait a minute; run cron to send the forum e-mail Check your e-mail. You should have received an e-mail for each of the enrolled users. Reply to the message as your first user Note: The sender e-mail address must be correct and must match the address in the user profile Note: If using gmail, you may need to copy/paste the reply-to address from gmail because GMail are sucky Send your message Wait a minute, then run cron again. Alternatively, just run the pickup task: php ./admin/tool/task/cli/schedule_task.php --execute=\\tool_messageinbound\\task\\pickup_task Confirm the blissful absence of error messages in the cron task Confirm that the message was posted in the forum Forum test 2 Reply to the message as your first user again This time, use a different sender address (e.g. an alias) Note: If using gmail, you may need to copy/paste the reply-to address from gmail because GMail are sucky Send your message Wait a minute, then run pickup task again Confirm the blissful absence of error messages in the cron task Confirm that the message was not posted into the forum Check your e-mail again and you should have a new message from Moodle Reply to the message as the correct e-mail address for the user Run the pickup task again Confirm the blissful absence of error messages in the cron task Confirm that the message was posted in the forum Forum test 3 Reply to the message as your first user again This time, use a different sender address (e.g. an alias) Note: If using gmail, you may need to copy/paste the reply-to address from gmail because GMail are sucky Send your message Wait a minute, then run pickup task again Confirm the blissful absence of error messages in the cron task Confirm that the message was not posted into the forum Check your e-mail again and you should have a new message from Moodle Reply to the message as the incorrect e-mail address for the user again Run the pickup task again Confirm the blissful absence of error messages in the cron task Confirm that the message was posted in the forum Forum test 4 Open Site administration -> Server -> Incoming mail configuration -> Message Handlers Edit the forum handler and set: Require validation: false Reply to the message as your first user again This time, use a different sender address (e.g. an alias) Note: If using gmail, you may need to copy/paste the reply-to address from gmail because GMail are sucky Send your message Wait a minute, then run pickup task again Confirm the blissful absence of error messages in the cron task Confirm that the message was posted in the forum Forum test 5 Open Site administration -> Server -> Incoming mail configuration -> Message Handlers Disable the mod_forum handler Reply to the message as your first user again Wait a minute, then run pickup task again Confirm that the message was NOT posted in the forum Confirm that you received a reply informing you that the handler was disabled Private Files Open Navigation -> My profile -> My private files Confirm that no e-mail address is shown on the private files page Open Site administration -> Server -> Incoming mail configuration -> Message Handlers Enable the mod_forum handler Open Navigation -> My profile -> My private files Confirm that an e-mail address is now shown on the private files page As the correct user Send an e-mail to the address provided, using the correct sender address for that moodle user Include attachments, both inline and as attachments Run pickup task Confirm the blissful absence of error messages in the cron task Confirm that your file was uploaded to private files With a different e-mail address Send an e-mail to the address provided, using a different e-mail address Include attachments, both inline and as attachments Run pickup task Confirm the blissful absence of error messages in the cron task Confirm that your file was not uploaded to private files Check your e-mail again and you should have a new message from Moodle Reply to the message as the incorrect e-mail address for the user again Run the pickup task again Confirm the blissful absence of error messages in the cron task Confirm that your file was uploaded to private files Without requiring validation Open Site administration -> Server -> Incoming mail configuration -> Message Handlers Edit the private files handler and set: Require validation: false Send an e-mail to the address provided, using the correct sender address for that moodle user Include attachments, both inline and as attachments Run pickup task Confirm the blissful absence of error messages in the cron task Confirm that your file was uploaded to private files Send an e-mail to the address provided, using a different e-mail address Include attachments, both inline and as attachments Run pickup task Confirm the blissful absence of error messages in the cron task Confirm that your file was uploaded to private files Disabling handler Open Site administration -> Server -> Incoming mail configuration -> Message Handlers Edit the private files handler and set: Require validation: true Send an e-mail to the address provided, using a different e-mail address Include attachments, both inline and as attachments Run pickup task Confirm the blissful absence of error messages in the cron task Confirm that your file was not uploaded to private files Open Site administration -> Server -> Incoming mail configuration -> Message Handlers Disable the private files handler Check your e-mail again and you should have a new message from Moodle Reply to the message to confirm the authenticity Run pickup task Confirm that your file was not uploaded to private files Confirm that you received a reply informing you that the handler was disabled

      For things like:

      1. replying to forum posts;
      2. adding new files to your private files area;
      3. submitting assignments;
      4. replying to private messages;
      5. ...

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.