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

Port number not removed from host in Horde IMAP with PHP 5.6

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9.1, 3.0.5
    • 3.0.6, 3.1.2
    • Other
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-51242-master
    • Hide
      1. Configure message inbound with server details in each of the following forms:
        1. example.server.fqdn
        2. example.server.fqdn:portno
      2. Run the messageinbound pickup task:

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

        1. Confirm that there were no errors
      Show
      Configure message inbound with server details in each of the following forms: example.server.fqdn example.server.fqdn:portno Run the messageinbound pickup task: php admin/tool/task/cli/schedule_task.php --execute="\tool_messageinbound\task\pickup_task" Confirm that there were no errors

    Description

      I'm unsure if this is a Moodle bug or a Horde bug. I'm just not familiar enough with the call sequence to know where the variable is getting changed.

      Steps to reproduce:

      1. Moodle 2.9.1 running on PHP 5.5.3 with incoming mail functioning. (Gmail, if that matters)
      2. Change PHP version to 5.6 (May also happen on 5.6 install)

      Expected behavior:
      Incoming mail continues to work

      Actual behavior:
      Incoming mail in cron fails with "error connecting to mail server"

      Research
      In 'lib/horde/framework/Horde/Socket/Client.php' the function _connect is receiving the host as "imap.gmail.com:993" and the port as "993", resulting in a final url of ssl://imap.google.com:993:993, which fails. Manually overriding $host and $port corrects the problem.

      Next steps
      I have no idea where _connect is being called from, and honestly I'm not sure how to research it myself. I'd assume it's part of the incoming mail portion, but I don't know the module well enough to know where, and I don't have a stack trace available.

      Attachments

        Activity

          People

            dobedobedoh Andrew Lyons
            wscjohnson Bill Johnson
            Jake Dallimore Jake Dallimore
            David Monllaó David Monllaó
            Jun Pataleta Jun Pataleta
            Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Sep/16