Your Linux Data Center Experts

As part of system automation work, the other day we were talking about changing the postfix configurations. Mention was made of using sed, but I brought out “postconf -e”, a tool that postfix provides to allow modifying the configuration. Particularly useful for more complicated entries which can span multiple lines and a simple sed script wouldn't do the right thing.

You run it as: “postconf -e name=value”

This will modify the configuration to change the setting “name” so that is assigned the value “value”. Of course, proper quoting is necessary if you are using special characters.

I also frequently use “postconf” to have it tell me what the current configuration is (because sometimes looking at the file it isn't obvious) and “postconf -d” to tell me what the default configuration values are.

Definitely useful tools to have in the tool-box.

comments powered by Disqus

Join our other satisfied clients. Contact us today.