aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.chezmoiignore1
-rw-r--r--README.md1
-rw-r--r--meta/mail.txt1
-rw-r--r--run_onchange_after_deploy-thunderbird.sh.tmpl24
-rw-r--r--thunderbird/user.js81
5 files changed, 108 insertions, 0 deletions
diff --git a/.chezmoiignore b/.chezmoiignore
index fdc688a..7ccf1be 100644
--- a/.chezmoiignore
+++ b/.chezmoiignore
@@ -5,6 +5,7 @@ meta/
systemd-units/
etc/
firefox/
+thunderbird/
justfile
just-lib.sh
selene.toml
diff --git a/README.md b/README.md
index edea69b..84962d1 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,7 @@ My Arch Linux configuration, managed with [chezmoi](https://www.chezmoi.io/).
| Notifications | [mako](https://github.com/emersion/mako) |
| Lock screen | [swaylock](https://github.com/swaywm/swaylock) |
| Browser | [LibreWolf](https://librewolf.net/), hardened via `user-overrides.js` + `userChrome.css` (kept under `firefox/` by name for recognizability) |
+| Mail | [Thunderbird](https://www.thunderbird.net/) against [ProtonMail Bridge](https://proton.me/mail/bridge) + Radicale (CalDAV/CardDAV); non-private prefs tracked under `thunderbird/` |
| Secrets & identity | [GPG](https://gnupg.org/) (commit signing + SSH auth via gpg-agent), [pass](https://www.passwordstore.org/) |
| Media & viewers | [mpv](https://mpv.io/), [zathura](https://pwmt.org/projects/zathura/), [yazi](https://yazi-rs.github.io/) |
| Code quality | stylua + [selene](https://github.com/Kampfkarren/selene), [shfmt](https://github.com/mvdan/sh) + [shellcheck](https://www.shellcheck.net/), [ruff](https://github.com/astral-sh/ruff), [taplo](https://taplo.tamasfe.dev/), [prettier](https://prettier.io/) — all wired through `just check` |
diff --git a/meta/mail.txt b/meta/mail.txt
index b3c80d6..0ada68b 100644
--- a/meta/mail.txt
+++ b/meta/mail.txt
@@ -1 +1,2 @@
protonmail-bridge-core
+thunderbird
diff --git a/run_onchange_after_deploy-thunderbird.sh.tmpl b/run_onchange_after_deploy-thunderbird.sh.tmpl
new file mode 100644
index 0000000..f19eae0
--- /dev/null
+++ b/run_onchange_after_deploy-thunderbird.sh.tmpl
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Deploy Thunderbird non-private configuration (user.js, optional chrome/).
+# chezmoi re-runs this script whenever any file under thunderbird/ changes.
+# thunderbird/ content hash: {{ output "sh" "-c" (printf "cd %q && find thunderbird -type f -exec sha256sum {} + | LC_ALL=C sort" .chezmoi.sourceDir) | sha256sum }}
+set -eu
+
+PROFILES_DIR="$HOME/.thunderbird"
+[ -d "$PROFILES_DIR" ] || exit 0
+
+PROFILE=$(find "$PROFILES_DIR" -maxdepth 1 -mindepth 1 -type d -name '*.default-default' | head -1)
+if [ -z "$PROFILE" ]; then
+ PROFILE=$(find "$PROFILES_DIR" -maxdepth 1 -mindepth 1 -type d -name '*.default*' | head -1)
+fi
+if [ -z "$PROFILE" ]; then
+ PROFILE=$(find "$PROFILES_DIR" -maxdepth 1 -mindepth 1 -type d | head -1)
+fi
+[ -n "$PROFILE" ] || exit 0
+
+cd "$CHEZMOI_SOURCE_DIR"
+find thunderbird -type f | while IFS= read -r src; do
+ dest="$PROFILE/${src#thunderbird/}"
+ mkdir -p "$(dirname "$dest")"
+ cp --remove-destination "$src" "$dest"
+done
diff --git a/thunderbird/user.js b/thunderbird/user.js
new file mode 100644
index 0000000..c7da235
--- /dev/null
+++ b/thunderbird/user.js
@@ -0,0 +1,81 @@
+/*
+ * Thunderbird user.js — non-private configuration tracked in dotfiles.
+ * Accounts, passwords, mailboxes, calendar/contact data, and per-machine
+ * state stay local (prefs.js, logins.json, key4.db, ImapMail/, etc.).
+ * Deployed by run_onchange_after_deploy-thunderbird.sh.tmpl.
+ */
+
+/** Startup & updates **/
+user_pref("app.update.auto", false); // Arch handles updates
+user_pref("app.update.enabled", false);
+user_pref("mail.shell.checkDefaultClient", false);
+user_pref("mailnews.start_page.enabled", false); // no "what's new" tab
+user_pref("browser.rights.3.shown", true);
+user_pref("mail.spotlight.firstRunDone", true);
+user_pref("mail.winsearch.firstRunDone", true);
+
+/** Telemetry & data reporting — off **/
+user_pref("toolkit.telemetry.enabled", false);
+user_pref("toolkit.telemetry.unified", false);
+user_pref("toolkit.telemetry.archive.enabled", false);
+user_pref("toolkit.telemetry.newProfilePing.enabled", false);
+user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
+user_pref("toolkit.telemetry.updatePing.enabled", false);
+user_pref("toolkit.telemetry.bhrPing.enabled", false);
+user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
+user_pref("datareporting.healthreport.uploadEnabled", false);
+user_pref("datareporting.policy.dataSubmissionEnabled", false);
+user_pref("browser.ping-centre.telemetry", false);
+user_pref("toolkit.coverage.opt-out", true);
+user_pref("toolkit.coverage.endpoint.base", "");
+
+/** Safe browsing & connectivity probes — off (we trust our mail sources) **/
+user_pref("browser.safebrowsing.downloads.enabled", false);
+user_pref("browser.safebrowsing.malware.enabled", false);
+user_pref("browser.safebrowsing.phishing.enabled", false);
+user_pref("network.captive-portal-service.enabled", false);
+user_pref("network.connectivity-service.enabled", false);
+user_pref("network.prefetch-next", false);
+user_pref("network.dns.disablePrefetch", true);
+
+/** Reading — no remote content, no read receipts **/
+user_pref("mailnews.message_display.disable_remote_image", true); // block tracking pixels
+user_pref("mail.phishing.detection.enabled", true);
+user_pref("mail.mdn.report.enabled", false); // never send read receipts
+user_pref("mail.incorporate.return_receipt", 0); // never request
+user_pref("mail.server.default.mark_old_as_read", false);
+user_pref("mailnews.mark_message_read.auto", true);
+user_pref("mailnews.mark_message_read.delay", true);
+user_pref("mailnews.mark_message_read.delay.interval", 2);
+
+/** Compose — plain text first, flowed wrap at 72 **/
+user_pref("mail.identity.default.compose_html", false);
+user_pref("mailnews.send_plaintext_flowed", true);
+user_pref("mailnews.wraplength", 72);
+user_pref("mail.strictly_mime", false);
+user_pref("mail.SpellCheckBeforeSend", true);
+user_pref("mail.spellcheck.inline", true);
+
+/** UI **/
+user_pref("mail.pane_config.dynamic", 2); // vertical: message pane on the right
+user_pref("mail.threadpane.table.horizontal_scroll", true);
+user_pref("mailnews.default_sort_order", 2); // descending
+user_pref("mailnews.default_sort_type", 18); // by date
+user_pref("mail.folder_widget.view_flags", 1); // unified folders mode
+user_pref("mail.biff.play_sound", false); // use mako notifications only
+user_pref("mail.biff.show_alert", true);
+user_pref("mail.biff.alert.show_preview", false); // don't leak body to notification
+user_pref("mail.biff.alert.show_sender", true);
+user_pref("mail.biff.alert.show_subject", true);
+
+/** Calendar **/
+user_pref("calendar.week.start", 1); // Monday
+user_pref("calendar.view.timeIndicator.interval", 1);
+user_pref("calendar.alarms.playsound", false);
+user_pref("calendar.alarms.show", true);
+user_pref("calendar.timezone.useSystemTimezone", true);
+
+/** Privacy **/
+user_pref("privacy.donottrackheader.enabled", true);
+user_pref("places.history.enabled", false);
+user_pref("browser.formfill.enable", false);