The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to disable Horde's Mobile Mail (MIMP)

Discussion in 'E-mail Discussions' started by ggouweloos, Nov 16, 2010.

  1. ggouweloos

    ggouweloos Member

    Joined:
    Nov 26, 2008
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Since the upgrade to 11.28 I would like to disable MIMP for at least one account/domain. Disable it serverwide is also an option.

    Can anyone tell me how I can do this?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    All of the discussions and patches I've seen so far were before MIMP was the default. The best way I can see to avoid the detection would simply be to change this setting in /usr/local/cpanel/base/horde/config/conf.php file:

    Code:
     $conf['auth']['checkbrowser'] = true;
    To false instead. If you aren't checking the browser, then you cannot detect if it is a mobile device or not. This change will be a global change, which you cannot restrict to just one account. Additionally, it will not save on Horde updates, so you'd need to change the setting each time you run an update. Otherwise, you can exclude the file from cPanel update syncs, but then you run the risk of having an outdated version of the file with a newer version of Horde. If you want to exclude the file from updates, you can do it this way:

    Code:
    echo "/usr/local/cpanel/base/horde/config/conf.php" >> /etc/cpanelsync.exclude
    Unfortunately, I cannot get my mobile phone to work to test out my theory on removing browser detection to remove MIMP detection, so I am only speculating above that this would result in the behavior you'd prefer (no MIMP redirection upon Mobile phone detection).

    Otherwise, you might post on the horde mailing list with the question to see any other possible suggestions:

    horde Info Page
     
  3. ggouweloos

    ggouweloos Member

    Joined:
    Nov 26, 2008
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Just tried but it does not work.
    It keeps me directing to a simple page on the phone showing a 'Mobile Mail' link.
    Which redirects me to MIMP.

    Maybe MIMP is a nice product for 128 x 96 screens, but it looks horrible on a High-Res device.
     
  4. ggouweloos

    ggouweloos Member

    Joined:
    Nov 26, 2008
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    The code that acts on the browser and view-types on login:

    Code:
    /* If DIMP/MIMP are available, show selection of alternate views. */
    $views = array();
    if (!empty($conf['user']['select_view'])) {
        $apps = $registry->listApps(null, true);
        $view_cookie = isset($_COOKIE['default_imp_view'])
            ? $_COOKIE['default_imp_view']
            : ($browser->isMobile() && isset($apps['mimp']) ? 'mimp' : 'imp');
        if (isset($apps['dimp']) || isset($apps['mimp'])) {
            $views[] = array('sel' => $view_cookie == 'imp',
                             'val' => 'imp', 'name' => _("Traditional"));
            if (isset($apps['dimp'])) {
                $views[] = array('sel' => $view_cookie == 'dimp',
                                 'val' => 'dimp', 'name' => _("Dynamic"));
            }
            if (isset($apps['mimp'])) {
                $views[] = array('sel' => $view_cookie == 'mimp',
                                 'val' => 'mimp', 'name' => _("Minimalist"));
            }
        }
    }
    
    Not sure where it sets the $apps['mimp'] variable.... Looks like a config-setting though.
     
  5. ggouweloos

    ggouweloos Member

    Joined:
    Nov 26, 2008
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    OK here a simple hack in one of the Horde core files to disable MIMP:

    Edit:
    usr\local\cpanel\base\horde\lib\Horde\Browser.php

    Find function ismobile:

    Code:
        function isMobile()
        {
            return $this->_mobile;
        }
    
    Replace with:
    Code:
        function isMobile()
        {
    	return false;
        }
    
     
Loading...

Share This Page