2020/05/15 by Olivier Moulene.
PowerMTA configuration version control
Postmastery strongly encourages the use of a version control system for PowerMTA configurations. In this blog post, we will define version control, explain why PowerMTA configuration version control is important, and give you some guidelines on how to implement this on your own PowerMTA site.
Version control: what, who, when and why?
Version control systems are a category of software tools that help teams manage changes to source code or config files over time. This software keeps track of every modification: what changed, who made the change, when and why.
Some of the reasons why version control is important are that it:
- improves visibility of changes over time;
- allows for change validation prior to deployment by the sender on (PowerMTA) production systems;
- allows for quick rollback;
- enhances team collaboration.
"Working with Postmastery and adopting version control to manage our PMTA configuration has given us a great deal of confidence around the shifts we’ve made in our PMTA configuration.”
Rob Parker, Director of Engineering at SugarCRM
Version control applied to PowerMTA configuration files
Version control is a great tool to handle configuration changes in PowerMTA, especially when a team works on the same files. It’s a great way to back up each version of the configuration over time. Please note that version control is not supported natively by PowerMTA, but there are several great free/paid services to facilitate this such as Github, Bitbucket, and Gitlab. We mostly use Bitbucket at Postmastery.
Looking for a PowerMTA assessment to define a baseline for improvement?
How to set up version control
To set up version control, you first need to create an account on bitbucket.org or github.com and then create a repository. After creating the repository, clone it on the server and commit the files that will be modified regularly such as /etc/pmta/config. Other files such as config-defaults are part of the PowerMTA software. These should not be changed so exclude them using gitignore.
At Postmastery, we keep the repository on a PowerMTA server in read-only mode and do commits first on bitbucket.org using a web interface (or local working copy) so that changes can be reviewed & approved by the customer before deploying it to the server.
When there is more than one PowerMTA server, it’s easy to move common settings to a shared file so you do not need to make the same changes for each PowerMTA.
The picture below clearly shows the process flow.
If you would like more information about PowerMTA version control, please send us a message via our contact form. We are always happy to assist!