- Rust 100%
|
|
||
|---|---|---|
| src | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
meil
A read-only terminal mail viewer for Microsoft 365.
Authenticates via the local microsoft-identity-broker D-Bus service and reads mail through the Microsoft Graph REST API.
Features
- Browse mail folders (Inbox, Sent, Drafts, Archive, etc.)
- Message list with unread/attachment indicators and relative timestamps
- Full message reader with word-wrapped plain text (HTML fallback)
- Marks messages as read when opened
- Lazy pagination — loads more messages on scroll
- Unread-only filter
Requirements
- Linux with
microsoft-identity-brokerrunning on the D-Bus session bus - An M365 account signed into the broker
- Rust 2024 edition toolchain
Usage
cargo run
Override the OAuth client ID:
cargo run -- --client-id <YOUR_CLIENT_ID>
# or
MEIL_CLIENT_ID=<ID> cargo run
The default client ID is the Microsoft Office public client (d3590ed6-...), which is pre-consented for Mail.ReadWrite in all M365 tenants.
Keybindings
| Key | Action |
|---|---|
j / ↓ |
Move down |
k / ↑ |
Move up |
Enter |
Open folder / Open message |
Tab |
Switch focus (folders ↔ messages) |
q / Esc |
Back / Quit |
r |
Refresh |
u |
Toggle unread-only filter |
c |
Open calendar agenda |
g |
Jump to top |
G |
Jump to bottom |
Space / PgDn |
Page down (reader) |
PgUp |
Page up (reader) |
Calendars and reminders
Meil always follows your default Microsoft 365 calendar. To include other calendars in the same account, list the available names and IDs:
meil --list-calendars
Add their exact names or IDs to ~/.config/meil/config.toml:
additional_calendars = ["Personal", "Family"]
calendar_days_ahead = 7
calendar_refresh_minutes = 5
reminders_enabled = true
Restart Meil after changing configuration. Use IDs if calendar names are ambiguous. The default calendar is included automatically; repeated selections are ignored. Unknown or ambiguous selections and calendar fetch failures appear in the status bar rather than silently omitting a calendar.
Events from all followed calendars appear together in chronological order in the
agenda (c). While Meil is running, desktop notifications fire according to each
event's reminder setting and lead time, including events on additional calendars.
Zero-minute reminders can fire at the event's start or during the first minute
afterward, but not at or after one minute past the start.
Cancelled events and events with reminders disabled do not notify. Refreshes
default to every five minutes and the agenda window defaults to seven days.
Invalid configuration is reported at startup.
Scope
This is a viewer only — no send, reply, delete, or move. The Mail.ReadWrite scope is used solely for marking messages as read.