Author Topic: How to preserve modifications in /etc/postfix/main.cf  (Read 1856 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to preserve modifications in /etc/postfix/main.cf
« on: January 24, 2022, 02:54:56 AM »
As I am trying to make the server behave as per my requirements, currently specially mail server, I made some changes to /etc/postfix/main.cf, but on rebuilding mail server the same gets overwritten (it's been mentioned all over this forum.).

So, is there a proper method to preserve the changes made in configuration files?

May be a post rebuild script ?

Offline
***
Re: How to preserve modifications in /etc/postfix/main.cf
« Reply #1 on: January 24, 2022, 10:44:32 AM »
As I am trying to make the server behave as per my requirements, currently specially mail server, I made some changes to /etc/postfix/main.cf, but on rebuilding mail server the same gets overwritten (it's been mentioned all over this forum.).

So, is there a proper method to preserve the changes made in configuration files?

May be a post rebuild script ?

Why are you rebuilding it?

I did modifications to main.cf and master.cf
They stay like this unless I rebuild the server. That's the point of "rebuild". Rebuilding only happens when you tell it to. Just like Windows factory reset, it doesn't happen by itself. So, again, why are you rebuilding your mail server after configuring it appropriately?

If you insist, move the master and main file to somewhere else and then symlink it into the /etc/postfix directory. Connect the symlink again after each rebuild that you do.
« Last Edit: January 24, 2022, 10:47:44 AM by iraqiboy90 »