Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Horde - when opening a mailbox for the first time, where do you want to start

Discussion in 'E-mail Discussion' started by diracuser, Sep 11, 2018.

Tags:
  1. diracuser

    diracuser Active Member

    Joined:
    Oct 22, 2014
    Messages:
    40
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello.
    I want by default when horde is opened that messages are ordering newest first and the scroll in the top.
    I have change in my server in /usr/local/cpanel/base/horde/imp/config/prefs.php file this value:

    // default sorting direction
    $_prefs['sortdir'] = array(
    'value' => 1,
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'enum' => array(0 => _("Ascending"),
    1 => _("Descending")),
    'desc' => _("Default sorting direction:"));

    but the scroll is at the bottom...

    Where can I change this option: When opening a mailbox for the first time, where do you want to start? (last newest) Unseen Message
    for all mailboxes (option by default)

    Thanks.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,197
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @diracuser,

    The following entry in /usr/local/cpanel/base/horde/imp/config/prefs.php is what you'd need to change:

    Code:
    $_prefs['mailbox_start'] = array(
        'value' => IMP::MAILBOX_START_FIRSTUNSEEN,
        'type' => 'enum',
        'enum' => array(
            IMP::MAILBOX_START_FIRSTUNSEEN => _("First (oldest) Unseen Message"),
            IMP::MAILBOX_START_LASTUNSEEN => _("Last (newest) Unseen Message"),
            IMP::MAILBOX_START_FIRSTPAGE => _("First Page"),
            IMP::MAILBOX_START_LASTPAGE => _("Last Page")
        ),
        'desc' => _("When opening a mailbox for the first time, where do you want to start?")
    );
    Based on the information you provided, you'd want this entry to instead look like this:

    Code:
    $_prefs['mailbox_start'] = array(
        'value' => IMP::MAILBOX_START_LASTUNSEEN,
        'type' => 'enum',
        'enum' => array(
            IMP::MAILBOX_START_FIRSTUNSEEN => _("First (oldest) Unseen Message"),
            IMP::MAILBOX_START_LASTUNSEEN => _("Last (newest) Unseen Message"),
            IMP::MAILBOX_START_FIRSTPAGE => _("First Page"),
            IMP::MAILBOX_START_LASTPAGE => _("Last Page")
        ),
        'desc' => _("When opening a mailbox for the first time, where do you want to start?")
    );
    Note that this file is overwritten by default when cPanel updates, so you'd have to develop a custom bash script that automatically makes this change, and then configure it to run after each cPanel update. Information on how to make custom scripts run after cPanel updates (upcp) is available at:

    Guide to Standardized Hooks - Software Development Kit - cPanel Documentation
    Guide to Standardized Hooks - System Functions - Software Development Kit - cPanel Documentation

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice