[GH-ISSUE #488] make modoboa-admin.py automatically upgrade the postfix map files #474

Closed
opened 2026-02-27 11:11:56 +03:00 by kerem · 0 comments
Owner

Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/488

Originally assigned to: @tonioo on GitHub.

Originally created by Louis-Dominique Dubeau on 2013-08-08T11:08:35Z

Upon running

$ modoboa-admin.py upgrade_postfix_maps <mapfiles>

Modoboa-admin would:

  • Compare the files modoboa-admin would create in against checksums stored in /modoboa-postfix-maps.chk
  • If the checksums match, then modoboa-admin gets everything it needs (db type, db name, username, and password) from the existing files, generates new files and copies them over the old files if there is any difference. It would create a new /modoboa-postfix-maps.chk which would contain checksums for the created files.
  • If the checksum fail or if any file is missing (including the checksum file), modoboa-admin refuses to run.

The checksums would ensure that if an admin has customized the files manually, the upgrade would not overwrite this customization. In such cases, the admin must upgrade manually.

The postfix_maps command would also have to be updated to generate the checksum file when the files are created. This way people who use the stock mapfiles proposed by modoboa would not have to do anything more than run the upgrade command above when upgrading their postfix map files for new versions of modoboa.

Originally created by @tonioo on GitHub (Dec 4, 2013). Original GitHub issue: https://github.com/modoboa/modoboa/issues/488 Originally assigned to: @tonioo on GitHub. **Originally created by Louis-Dominique Dubeau on 2013-08-08T11:08:35Z** Upon running ``` bash $ modoboa-admin.py upgrade_postfix_maps <mapfiles> ``` Modoboa-admin would: - Compare the files modoboa-admin would create in <mapfiles> against checksums stored in <mapfiles>/modoboa-postfix-maps.chk - If the checksums match, then modoboa-admin gets everything it needs (db type, db name, username, and password) from the existing files, generates new files and copies them over the old files if there is any difference. It would create a new <mapfiles>/modoboa-postfix-maps.chk which would contain checksums for the created files. - If the checksum fail or if any file is missing (including the checksum file), modoboa-admin refuses to run. The checksums would ensure that if an admin has customized the files manually, the upgrade would not overwrite this customization. In such cases, the admin must upgrade manually. The postfix_maps command would also have to be updated to generate the checksum file when the files are created. This way people who use the stock mapfiles proposed by modoboa would not have to do anything more than run the upgrade command above when upgrading their postfix map files for new versions of modoboa.
kerem 2026-02-27 11:11:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#474
No description provided.