feat: add terminal email with aerc + notmuch + mbsync + M365 OAuth2

Aperta
#30 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
macos, neovim, python, shell

Direzione di ricerca

Inizia risolvendo le questioni aperte relative all'accesso M365 IMAP, al numero di account e all'aerc styleset. Esamina quindi i percorsi di configurazione elencati in ~/.config/ e ~/Library/LaunchAgents/, insieme ai riferimenti ad aerc, mbsync, notmuch, msmtp e M365-Auth. Il lavoro è completato quando lo stack di posta del terminale è installato, configurato per la sincronizzazione offline e l'invio, e integrato con il tmux popup proposto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Set up terminal email using aerc as the frontend, with full offline support and M365 OAuth2 authentication.

Proposed stack

sbfnk/M365-Auth  (OAuth2 tokens → macOS Keychain)
       │
       ├──→ mbsync (IMAP sync → local Maildir)
       │         ↓
       │    notmuch (search/tag index)
       │         ↓
       │    aerc (notmuch backend — read, search, tag)
       │
       └──→ msmtp + msmtpq (SMTP sending + offline queue)

Components

Component Install Purpose
aerc brew install aerc TUI email client (notmuch backend)
isync (mbsync) brew install --HEAD sbfnk/formulae/isync IMAP sync to local Maildir with XOAUTH2
notmuch brew install notmuch Search index + tag engine over Maildir
msmtp brew install msmtp SMTP sending (ships with msmtpq)
M365-Auth pipx install git+https://github.com/sbfnk/M365-Auth OAuth2 token management
w3m brew install w3m HTML email rendering filter for aerc

Config files to create

~/.config/
├── aerc/
│   ├── accounts.conf    # Account source/outgoing/credentials
│   ├── aerc.conf        # UI, filters, hooks, compose settings
│   ├── binds.conf       # Keybindings (vim-style)
│   └── stylesets/       # Theme (catppuccin)
├── m365auth/
│   └── config.py        # Client ID, scopes, authority URL
├── notmuch/
│   └── default/config   # Database path, user info, new mail tags
├── msmtp/
│   └── config           # SMTP account with xoauth2 auth
└── mbsync/
    └── mbsyncrc         # IMAP channels, Maildir paths, PassCmd
~/Mail/                  # Local Maildir root
~/Library/LaunchAgents/
├── mail.sync.plist      # Periodic mbsync + notmuch new
└── mail.sendqueue.plist # Periodic msmtpq flush

Why this architecture

  • aerc as frontend — vim keybindings, runs in tmux pane/popup, uses neovim for composing
  • notmuch backend (not raw IMAP) — full offline access, fast local full-text search, tag-based workflows
  • mbsync for sync — battle-tested IMAP-to-Maildir. Seb's custom isync formula adds XOAUTH2 SASL support
  • Seb's M365-Auth for OAuth2 — Python + macOS Keychain + Thunderbird client ID. No Haskell (oama) or GPG (mutt_oauth2.py) needed. refresh-token --profile mail slots into mbsync PassCmd and msmtp passwordeval
  • msmtpq for offline sending — queues outgoing mail when offline, flushes via LaunchAgent
  • Backend is identical to sbfnk/dotfiles (mu4e swapped for aerc) — Seb can help debug

tmux integration

Add a popup keybinding similar to gh-dash:

bind-key M display-popup -E -w 90% -h 80% -d '#{pane_current_path}' 'aerc'

Open questions

  • Confirm IMAP is enabled on M365 tenant (if not, need DavMail gateway)
  • Single account (work) or multiple accounts?
  • Decide on catppuccin or tokyonight styleset for aerc

References

This was opened by a bot. Please ping @seabbs for any questions.

Lingua principale
Shell
Stelle
0
Fork
0
Merge medio
4g 4h
PR unite (30g)
13

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di seabbs/dotfiles

Tutte le issue di seabbs/dotfiles

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.