fix(alot): stop shipping real mail identity as the tracked default
alot/config was symlinked directly into ~/.config/alot, and mail-notmuch.sh wrote real account details straight back into that tracked repo file — so a fresh clone/deployment inherited a real name/email/maildir path as alot's configured identity by default, and any re-run of the install risked committing real PII back into the repo. alot/config is now a template with placeholder identity (bindings unchanged). shell-setup.sh seeds it into ~/.config/alot/config via a one-time copy instead of a symlink, and mail-notmuch.sh writes real account details into that local copy only — never back into the tracked file. No password was ever involved: msmtp/mbsync credentials live in ~/.msmtprc/~/.mbsyncrc, which were never tracked in the repo, in the current tree or anywhere in git history (verified via git log -p across all history).main
parent
c16a17f10b
commit
4afba5d3ea
13
alot/config
13
alot/config
|
|
@ -1,10 +1,15 @@
|
|||
# [accounts] is intentionally a placeholder: this file is a TEMPLATE, seeded
|
||||
# (copied, not symlinked) into ~/.config/alot/config by shell-setup.sh. Real
|
||||
# account details are written into that local copy by mail-notmuch.sh, never
|
||||
# back into this tracked file — so a fresh clone never ships (or auto-uses)
|
||||
# anyone's real mail identity.
|
||||
[accounts]
|
||||
[[main]]
|
||||
realname = amir alexander abdelbaki
|
||||
address = amir@abdelbaki.eu
|
||||
realname = Your Name
|
||||
address = you@example.com
|
||||
sendmail_command = msmtp -a main
|
||||
sent_box = maildir:///home/themiro/Mail/Sent
|
||||
draft_box = maildir:///home/themiro/Mail/Drafts
|
||||
sent_box = maildir:///home/you/Mail/Sent
|
||||
draft_box = maildir:///home/you/Mail/Drafts
|
||||
|
||||
[bindings]
|
||||
[[search]]
|
||||
|
|
|
|||
|
|
@ -128,10 +128,15 @@ EOF
|
|||
chmod +x "$MAILDIR/.notmuch/hooks/post-new"
|
||||
|
||||
# ── alot ──────────────────────────────────────────────────────────────────────
|
||||
# The bindings section lives in ~/Dotfiles/alot/config (symlinked by shell-setup.sh).
|
||||
# Write only the account block, which contains machine-specific paths/identity.
|
||||
log "Writing account details into ~/Dotfiles/alot/config..."
|
||||
ALOT_CFG="$HOME/Dotfiles/alot/config"
|
||||
# Real account details go into the LOCAL runtime config, never into the
|
||||
# tracked ~/Dotfiles/alot/config template — that file is seeded (copied) into
|
||||
# place by shell-setup.sh and ships only placeholder identity, so a fresh
|
||||
# clone never carries anyone's real mail account by default. Seed it here too
|
||||
# in case this module runs standalone before shell-setup.sh has.
|
||||
ALOT_CFG="$HOME/.config/alot/config"
|
||||
mkdir -p "$(dirname "$ALOT_CFG")"
|
||||
[[ -f "$ALOT_CFG" ]] || cp "$HOME/Dotfiles/alot/config" "$ALOT_CFG"
|
||||
log "Writing account details into ~/.config/alot/config..."
|
||||
# Use an inline Python script to splice the [accounts] block into the existing
|
||||
# config file. sed struggles with multi-line replacements; Python's re.sub with
|
||||
# re.DOTALL handles the entire block atomically and overwrites any prior values.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
# ║ ~/.config/starship.toml — symlink to repo ║
|
||||
# ║ ~/.config/nvim/ — symlink to repo/nvim/ ║
|
||||
# ║ ~/.config/micro/ — copy from repo/micro/ (plugin state needs cp)║
|
||||
# ║ ~/.config/alot/ — symlink for email client config ║
|
||||
# ║ ~/.config/alot/config — seeded copy (not symlink): keeps real mail ║
|
||||
# ║ identity out of the tracked repo file, see alot/config comment ║
|
||||
# ║ ~/.config/yazi/ — symlink for file manager config ║
|
||||
# ║ ~/Pictures/fflogo.svg — logo asset ║
|
||||
# ╚══════════════════════════════════════════════════════════════════════════════╝
|
||||
|
|
@ -196,9 +197,14 @@ ln -sf ~/Dotfiles/nvim ~/.config/nvim
|
|||
log "Syncing neovim plugins (lazy.nvim)..."
|
||||
nvim --headless "+Lazy! sync" +qa 2>/dev/null || true
|
||||
|
||||
# alot email client config — symlink
|
||||
rm -rf ~/.config/alot
|
||||
ln -sf ~/Dotfiles/alot ~/.config/alot
|
||||
# alot email client config — seeded copy, NOT a symlink. alot/config in the
|
||||
# repo is a template with placeholder account details (bindings are real);
|
||||
# mail-notmuch.sh later writes real account info into the local copy only, so
|
||||
# a fresh clone never ships or auto-adopts anyone's real mail identity. Only
|
||||
# seed on first install: never overwrite an existing local config (that would
|
||||
# clobber real account details written by mail-notmuch.sh on a later re-run).
|
||||
mkdir -p ~/.config/alot
|
||||
[[ -f ~/.config/alot/config ]] || cp ~/Dotfiles/alot/config ~/.config/alot/config
|
||||
|
||||
# yazi file manager config — symlink
|
||||
rm -rf ~/.config/yazi
|
||||
|
|
|
|||
Loading…
Reference in New Issue