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!

Courier Configuration Changes

Discussion in 'E-mail Discussion' started by sparek-3, Jan 5, 2011.

  1. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,772
    Likes Received:
    119
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    It looks like whenever Courier is updated on a server the configuration changes that are made in:

    /usr/lib/courier-imap/etc/imapd

    are lost.

    Is there a way to keep the changes made to this file Courier is updated?

    Is there another file that these changes should be made in?
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,544
    Likes Received:
    9
    Trophy Points:
    268
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Are there specific configuration directives needing customization that are not available in WebHost Manager? Please ensure the following area in WHM is used as a first step: WHM: Main >> Service Configuration >> Mailserver Configuration

    After the Courier (mail server) preferences are configured via WHM, please take a moment to examine the following YAML file that stores the Courier configuration:
    Code:
    /var/cpanel/courierconfig.yaml
    If the desired customization is not offered in WHM, I would consider using the built-in script hooks that allow you to setup a custom "pre" and or "post" script that would be called at the beginning or end of the update process for Courier. Executed via /scripts/courierup, you may create /scripts/precourierup and or /scripts/postcourierup to perform custom actions, such as to save a backup of and or re-apply modifications to the Courier installation:
    Code:
    /scripts/precourierup
    /scripts/postcourierup
    Related documentation:
    Hooking into cPanel Functionality
    cPanel & WHM Script Hooks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,772
    Likes Received:
    119
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    The options look like they can be set in the WHM, but I was hoping to do this en masse for several of our servers.

    I think this information will help with this.

    So basically I could change the values accordingly via the WHM for one server and then copy the 2 files:

    /usr/lib/courier-imap/etc/imapd
    /var/cpanel/courierconfig.yaml

    to the other affected servers and then those changes will keep across all of the servers even after Courier updates. Is that correct?

    I think /var/cpanel/courierconfig.yaml was the missing file that I didn't know was being changed. I figured the WHM was saving the changes somewhere, but I didn't know where.
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,544
    Likes Received:
    9
    Trophy Points:
    268
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I believe you can effectively clone the Courier configuration, as setup via WHM, using the following steps:
    1. Transfer a copy of /var/cpanel/courierconfig.yaml to the desired server.
    2. Via shell, execute /scripts/courierup --reconfig to rebuild the Courier configuration from the YAML file.
     
    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