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.

Courier Configuration Changes

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

  1. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    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,557
    Likes Received:
    7
    Trophy Points:
    38
    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
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    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,557
    Likes Received:
    7
    Trophy Points:
    38
    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.
     
Loading...

Share This Page