docker-mailserver/target/scripts/helpers
Brennan Kinney e3cc627e18
refactor: Share a common helper (vhost builder) for sourcing domains (#2620)
* chore: Split vhost helper method and use filepath vars

- Helpers `accounts.sh` and `aliases.sh` can move their vhost code into this helper.
- They share duplicate code with `bin/open-dkim` which will also leverage this vhost helper going forward.

* chore: Sync vhost generation logic into helper

- Chunky commit, but mostly copy/paste of logic into a common method.
- `bin/open-dkim` additionally wrapped relevant logic in a function call and revised inline docs.

* chore: Include LDAP vhost support

- Revises notes for LDAP vhost support.
- This now ensures LDAP users get vhost rebuilt to match the startup script for when change detection support is enabled.
- `bin/open-dkim` will additionally be able to support the default `DOMAINNAME` var (set via `helpers/dns.sh`) for LDAP users instead of requiring them to provide one explicitly.

* chore(`bin/open-dkim`): Ensure `DOMAINNAME` is properly set

- This will ensure LDAP users insert the same `DOMAINNAME` value as used during container startup.
- The container itself should panic at startup (during `helpers/dns.sh`) if this isn't configured correctly already, thus it should not introduce any breaking change to users of this utility?

* chore: Set the 2nd value as blank `_`

Line is split by a delimiter such as white-space (or via IFS: `|`), the blank `_` var is to indicate we're not interested in that value, but still leverage how `read -r` works, instead of splitting the var ourselves first thing.

* chore: Remove shellcheck disable lines

No longer applicable with the switch to `_`
2022-06-10 10:57:10 +12:00
..
accounts.sh refactor: Share a common helper (vhost builder) for sourcing domains (#2620) 2022-06-10 10:57:10 +12:00
aliases.sh refactor: Share a common helper (vhost builder) for sourcing domains (#2620) 2022-06-10 10:57:10 +12:00
change-detection.sh chore(check-for-changes.sh): Drop redundant guards (#2623) 2022-06-09 19:48:07 +12:00
dns.sh Remove unnecessary quotes from command substitutions (#2561) 2022-05-05 10:28:38 +02:00
error.sh Fix changedetector restart loop (#2548) 2022-04-19 21:09:25 +02:00
index.sh chore: Merge helpers/sasl.sh into helpers/relay.sh (#2605) 2022-06-06 10:59:42 +12:00
lock.sh Remove unnecessary quotes from command substitutions (#2561) 2022-05-05 10:28:38 +02:00
log.sh Use color variables instead of escape codes (#2565) 2022-05-10 17:50:33 +02:00
network.sh Rename config examples directory (#2438) 2022-03-02 22:54:14 +00:00
postfix.sh refactor: Share a common helper (vhost builder) for sourcing domains (#2620) 2022-06-10 10:57:10 +12:00
relay.sh chore(housekeeping): Normalize how config files filter out unwanted lines (#2619) 2022-06-07 01:07:30 +12:00
ssl.sh chore(housekeeping): Create helpers/change-detection.sh (#2610) 2022-06-05 11:59:54 +12:00
utils.sh chore: Extract out /var/mail ownership workaround (#2628) 2022-06-08 10:09:19 +12:00