Repository navigation
Verify: read expected values from shared.conf, support custom and none relays - #53
Merged
Merged
Conversation
Adds MAIL_RELAY and related settings. GMAIL_USER and GMAIL_APP_PASSWORD still work as the old names.
A login on a port other than 587 or 465 used smtp_tls_security_level=may, so the password could be sent in plain text if TLS failed. It is now encrypt whenever a login is set. Opportunistic TLS stays for a no-login relay.
…e relays verify-clone.sh sources shared.conf on the host and passes only non-secret values to the guest as VERIFY_* variables. verify-template.sh keeps its old defaults when they are not set.
# Conflicts: # Bash/Proxmox Scripts/Ubuntu Cloud Template/README.md
…conf # Conflicts: # Bash/Proxmox Scripts/Ubuntu Cloud Template/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The verify scripts no longer have modem7's values baked in. This is PR 2 of the series and is stacked on #52 (base branch
mail-provider-neutral); merge #52 first and GitHub will retarget this to master.verify-clone.sh:shared.confthe same way the builder does (SHARED_CONF,BUILD_CONF,shared.confnext to the script) or takes--config <path>. Not found: it says so andverify-template.shuses its built-in defaults, as before.VERIFY_*variables viaenv. The mail password is never sent, printed or logged.MAIL_RELAY=none, since mail stays local.verify-template.sh:VERIFY_*values (explicitly empty means "off"; unset means the old default, so a hand run is unchanged).MAIL_RELAY:gmail,custom(host, port, TLS by port, login or no login, optionalMAIL_SENDER) andnone(no relay, SASL or transport checks, no test mail).libsasl2-modulesis expected only when a login is set.README updated. The branch also merges #52's TLS fix, so a login on any port expects
encrypt.Testing
bash -nand shellcheck are clean on all three scripts.qmthat logs every argument: no config, Gmail with old names, custom 465 with login, custom 25 with no login,none, sender set,--config,SHARED_CONF,BUILD_CONF, and error cases. The ansible key with spaces arrives as one argument. A marker password in the fake config appeared 0 times in the qm log, stdout and stderr.postconf,apt-config,dpkg-query,systemctland others in a scratch directory: with nothing set, the old and new scripts give the same output and counts on good and broken fixtures.custom465,custom25 with no login,none, a sender and bad values behave as designed, and a wrong TLS level or SASL setting FAILs.Not tested: a real
qm guest execand guest agent (thatenvplus its arguments pass through unchanged), a real Postfix (for example thatpostconf -h sender_canonical_classesprints exactlyenvelope_sender, header_sender), or a root run in a real clone. Please run./verify-clone.sh <id>against a rebuilt template.Note: sourcing
shared.confruns it as shell, the same as the builder does, so it needs to be a file you trust.