aboutsummaryrefslogtreecommitdiff
path: root/tests/test-custom-ordering-unarrayify.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-03 19:57:30 -0500
committerCraig Jennings <c@cjennings.net>2026-05-03 19:57:30 -0500
commit1326508ec64d90964bc4b2f0debd156dd40b64b6 (patch)
treed09123011d79a74463db89a92299383f79ffefb8 /tests/test-custom-ordering-unarrayify.el
parent1ef03734fb74bebae204f49ba0e5400a886c5506 (diff)
downloaddotemacs-1326508ec64d90964bc4b2f0debd156dd40b64b6.tar.gz
dotemacs-1326508ec64d90964bc4b2f0debd156dd40b64b6.zip
fix: validate mail transport executables and default debug off
`mail-config.el` had three related issues. SMTP transport debug was hard-coded to t, which is sensitive since mail bodies and headers land in debug buffers. The use-package `:config` was also setting `sendmail-program` and `mu4e-get-mail-command` directly from `executable-find` results. So a host without msmtp or mbsync silently got `nil` or `(concat nil " -a")` instead of a clear failure mode. I added `cj/smtpmail-debug-enabled` (default nil) plus `cj/set-smtpmail-debug` and `cj/toggle-smtpmail-debug` for temporary troubleshooting, mirroring the pattern from `auth-config.el`. I extracted `cj/mail--executable-or-warn` so a missing program emits a one-time `display-warning` and returns nil. `cj/mail-configure-smtpmail` and `cj/mail--mbsync-command` both use it. Missing msmtp now leaves `sendmail-program` nil with a warning. Missing mbsync produces a nil sync command instead of the broken `(concat nil " -a")` string. I also wrapped the mbsync executable path in `shell-quote-argument` so unusual install paths don't fall apart on the `" -a"` concat. I added `tests/test-mail-config-transport.el` with seven tests across Normal / Boundary / Error: debug-default-off, toggle wiring, msmtp present and missing, mbsync present, mbsync path with spaces, and mbsync missing. The `test-mail-config--with-executables` macro stubs `executable-find` from an alist so each test names its own environment.
Diffstat (limited to 'tests/test-custom-ordering-unarrayify.el')
0 files changed, 0 insertions, 0 deletions