Listerner to protect changes

  • Hi,


    My Setup:
    Distributor ID: Debian
    Description: Debian GNU/Linux 8.6 (jessie)
    Release: 8.6
    Codename: jessie


    i-MSCP Git 1.3.8
    Build: 20161101
    Codename: Horner


    /etc/postfix/header_checks (this file has nothing to do with imscp so it will not be overwritten):

    Code
    1. /^Received:.*/ IGNORE


    /etc/postfix/main.cf (this file get overwritten on update and running the installer), there i made the following changes on the end:


    Code
    1. # Custom
    2. header_checks = regexp:/etc/postfix/header_checks


    Can somebody give me an example or help me to create a listener that this change in main.cf dont get changed on update or running installer?


    Thanks in advance,
    Goodpeace.

  • Hello,


    /etc/imscp/listeners.d/10_postfix_headerchecks.pl: http://pastebin.com/aCSXbPFy



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

  • Hi and thanks for this quick solution :)


    All i need is to put the file called 10_postfix_headerchecks.pl on /etc/imscp/listeners.d/ ?

  • @Goodpeace


    Yes, you must create the /etc/imscp/listeners.d/10_postfix_headerchecks.pl file and put the content from pastbin link in it and then, save the file. After, you must just rerun the installer and the line will be automatically added in the postfix main.cf file.

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

  • You're welcome.


    Thread closed.

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