aboutsummaryrefslogtreecommitdiff
path: root/modules/help-config.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
commit3e9499f62c4fb621ec234a0cf5cee51eb2cf32c0 (patch)
tree1a7384b5204351eefa8135242d24da2a8da8d38d /modules/help-config.el
parent59094e944b4a9e8c5e1a20724c2681ffe9b6155c (diff)
downloaddotemacs-3e9499f62c4fb621ec234a0cf5cee51eb2cf32c0.tar.gz
dotemacs-3e9499f62c4fb621ec234a0cf5cee51eb2cf32c0.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 'modules/help-config.el')
0 files changed, 0 insertions, 0 deletions