Preserve custom settings in different config-files or templates

  • I'am using some custom settings on following files and realized that my customized files are overwritten with standard ones when upgrading i-MSCP (upgraded i-MSCP from 1.2.8 to 1.2.9 today).
    Files customized by me:
    - /etc/postfix/main.cf
    ......added different tweaks to prevent spam
    - /var/www/imscp/gui/themes/default/reseller/navigation.php
    ......added variable 'visible' => '0', to sections hosting_plans and statistics to make them invisible for reseller
    - /var/www/imscp/gui/themes/default/client/navigation.php
    ......added variable 'visible' => '0', to sections statistics and webtools to make them invisible for client
    - /var/www/imscp/gui/themes/default/client/mail_add.tpl
    ......added a <span>@</span> infront of <select name="domain_name" id="domain_name">. Some clients added an @ into the textfield which is only for the mailadress when adding a new mailadress for example 'info@' in textfield.


    I would like to know if there is any possibility to preserve this customizations. After updating i-MSCP i loose all this custom things and need to add them every time.


    Thanks in advance for all your support.

  • Hello ;



    I'll give you the procedure to follow. In order:


    postfix main.cf and master.cf:


    The standard way with i-MSCP is to create a listener file which will re-apply your custom configuration parameter automatically on update.


    You can use that listener which has been created for that purpose: https://github.com/i-MSCP/imsc…tfix/10_postfix_tuning.pl


    About the theme:


    Again here, the better way is to create a listener which will copy your modified in the production directory once the update is done.



    See that thread which talk about a listener that exactly do that: Dir->rcopy invalid dirhandle

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206