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

Replace use of Horde with Roundcube

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • MDL-80207-main
    • Hide

      Note for tester
      Using a secondary Google account or creating a new one for testing is recommended instead of a personal/work account. Otherwise, the scheduled task will go through all the emails in the personal/work account, which can take a long time.

      Suite 1 - Using username and app password

      Setup

      1. Follow Sign in with app passwords to get the app password.
      2. Navigate to Site Administrator > Server > Email > Incoming Mail Configuration.
      3. Set the following value:
        1. Enable incoming mail processing: Checked
        2. Mailbox name: the name before @ sign of your email address (Ex: Your email is abc@gmail.com, the Mailbox name will be: abc)
        3. Email domain: the name after @ sign of your email address. In this case, it will be: gmail.com
        4. Incoming Mail Server: imap.gmail.com:993
        5. OAuth 2 Service: None
        6. Username: Your email address.
        7. Password: The app password you have created.
      4. Save changes.
      5. Navigate to Site Administrator > Server > Email > Message handlers.
      6. Enable the Email to Private files.

      Suite 2 - Using XOAUTH2

      Setup

      1. Follow OAuth 2 Google service to get the Client Id and Client secret.
      2. Enable Gmail API in the Google Developer console.
      3. Login as admin.
      4. Navigate to Site Administrator > Server >  OAuth 2 services
      5. Create a new Google service called: Gmail - OAUTH2.
      6. Set the Client id and Client secret.
      7. Set the Scopes included in a login request value to: "openid profile email https://mail.google.com" (Without the quote).
      8. Set the Scopes included in a login request for offline access value to: "openid profile email https://mail.google.com" (Without the quote).
      9. Save changes.
      10. Click Connect to a system account and finish it.
      11. Navigate to Site Administrator > Server > Email > Incoming Mail Configuration.
      12. Set the following value:
        1. Enable incoming mail processing: Checked
        2. Mailbox name: the name before @ sign of your email address (Ex: Your email is abc@gmail.com, the Mailbox name will be: abc)
        3. Email domain: the name after @ sign of your email address. In this case, it will be: gmail.com
        4. Incoming Mail Server: imap.gmail.com
        5. OAuth 2 Service: Gmail - OAUTH2
        6. Username: The username that was used to connect to the Google Developer Console.
      13. Save changes.
      14. Navigate to Site Administrator > Server > Email > Message handlers.
      15. Enable the Email to Private files.

      Testing steps

      1. Setup the environment using Suite 1.
      2. Create a new tab on your browser called Tab 1.
      3. On Tab 1, click on the User Profile menu > Profile.
      4. Observe the Email address of the admin user. (Example: xyz@gmail.com)
      5. Create a new tab on your browser called Tab 2.
      6. On Tab 2, open the webmail of the Admin's email (Example: https://mail.google.com)
      7. On Tab 1, click on the User Profile menu > Private files.
      8. Verify that you will see: You can also e-mail files as attachments straight to your private files space. 
      9. Copy the email address.
      10. On Tab 2, compose a new email with the following value:
        1. To: The copied email address.
        2. Subject: Test attachment
        3. Content: Attached
        4. Attachment: Attach a zip file on your machine.
      11. Send the email.
      12. Run command: php admin/cli/scheduled_task.php --execute='tool_messageinbound\task\pickup_task'
      13. On Tab 1, click on the User Profile menu > Private files.
      14. Verify that you will see the zip file that you have sent via email.
      15. Re-run all testing steps with Suite 2.

      Library testing

      1. Navigate to Site Administrator > Development > Third party libraries.
      2. Verify that you will not see a Library called Horde.
      3. Verify that you will see a new Library called Roundcube Framework with version is 1.6.6.
      Show
      Note for tester Using a secondary Google account or creating a new one for testing is recommended instead of a personal/work account. Otherwise, the scheduled task will go through all the emails in the personal/work account, which can take a long time. Suite 1 - Using username and app password Setup Follow Sign in with app passwords to get the app password . Navigate to Site Administrator > Server > Email > Incoming Mail Configuration. Set the following value: Enable incoming mail processing: Checked Mailbox name: the name  before  @ sign of your email address (Ex: Your email is abc@gmail.com, the Mailbox name will be: abc) Email domain: the name  after  @ sign of your email address. In this case, it will be: gmail.com Incoming Mail Server: imap.gmail.com:993 OAuth 2 Service: None Username: Your email address. Password: The app password you have created. Save changes. Navigate to Site Administrator > Server > Email > Message handlers. Enable the Email to Private files. Suite 2 - Using XOAUTH2 Setup Follow  OAuth 2 Google service  to get the  Client Id  and  Client secret . Enable  Gmail API  in the Google Developer console. Login as admin. Navigate to Site Administrator > Server >  OAuth 2 services Create a new Google service called:  Gmail - OAUTH2 . Set the  Client id  and  Client secret . Set the  Scopes included in a login request  value to: "openid profile email  https://mail.google.com " ( Without the quote ). Set the  Scopes included in a login request for offline access  value to: "openid profile email  https://mail.google.com " ( Without the quote ). Save changes. Click Connect to a system account and finish it. Navigate to Site Administrator > Server > Email > Incoming Mail Configuration. Set the following value: Enable incoming mail processing: Checked Mailbox name: the name  before  @ sign of your email address (Ex: Your email is abc@gmail.com, the Mailbox name will be: abc) Email domain: the name  after  @ sign of your email address. In this case, it will be: gmail.com Incoming Mail Server: imap.gmail.com OAuth 2 Service: Gmail - OAUTH2 Username: The username that was used to connect to the Google Developer Console. Save changes. Navigate to Site Administrator > Server > Email > Message handlers. Enable the Email to Private files. Testing steps Setup the environment using Suite 1. Create a new tab on your browser called  Tab 1 . On  Tab 1,  click on the User Profile menu > Profile. Observe  the Email address of the admin user. (Example: xyz@gmail.com) Create a new tab on your browser called  Tab 2 . On  Tab 2 , open the webmail of the Admin's email (Example:  https://mail.google.com) On  Tab 1 , click on the User Profile menu > Private files. Verify  that you will see: You can also e-mail files as attachments straight to your private files space.  Copy the email address. On  Tab 2 , compose a new email with the following value: To: The copied email address. Subject: Test attachment Content: Attached Attachment: Attach a zip file on your machine. Send the email. Run command: php admin/cli/scheduled_task.php --execute='tool_messageinbound\task\pickup_task' On Tab 1 , click on the User Profile menu > Private files. Verify that you will see the zip file that you have sent via email. Re-run all testing steps with Suite 2. Library testing Navigate to Site Administrator > Development > Third party libraries. Verify that you will not see a Library called Horde . Verify that you will see a new Library called Roundcube Framework with version is 1.6.6 .
    • 6
    • Team Hedgehog 2023 Sprint 4.2, Team Hedgehog 2023 Sprint 4.3, Team Hedgehog 2023 Review 4, Team Hedgehog 2024 Sprint 1.1

      Based on the latest discussion from MDL-75958, we will replace Horde with RoundCube as below

      1. Integrate Roundcube library to Moodle LMS, but only the Client's part, not the whole library. The suitable place for this library is inside tool_messageinbound, because it's not PSR-4 autoloadable and it's used for tool_messageinbound only. (Location should be admin/tool/messageinbound/roundcube)
      2. Create readme_moodle.txt to describe how to import this library and for tracking upstream - library upgrade.
      3. Create thirdpartylibs.xml
      4. Modify tool_messageinbound to switch from Horde to Roundcube API.

            huongn@moodle.com Huong Nguyen
            huongn@moodle.com Huong Nguyen
            Raquel Ortega Raquel Ortega
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 2 days, 4 hours, 19 minutes
                1w 2d 4h 19m

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