diff --git a/CLAUDE.md b/CLAUDE.md index 19fa21e..80499f7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -98,7 +98,7 @@ A separate workspace crate that runs as an in-process local IMAP/SMTP server. - **native-tls (0.2)**: TLS support for secure IMAP connections - **lettre (0.11)**: SMTP client for sending mail - **chrono (0.4)**: Date parsing and timezone conversion -- **mailparse (0.15)**: MIME email parsing for body extraction +- **mailparse (0.15)**: MIME email paursing for body extraction - **aes-gcm (0.10)**: AES-256-GCM authenticated encryption for the body cache - **keyring (3)**: OS keychain access (apple-native / linux-native / windows-native) - **dirs (5)**: Platform-correct data directory paths diff --git a/MAIL_SERVER_SETUP.md b/MAIL_SERVER_SETUP.md index 0303c8b..a517967 100644 --- a/MAIL_SERVER_SETUP.md +++ b/MAIL_SERVER_SETUP.md @@ -16,20 +16,21 @@ App Passwords require 2-Step Verification to be enabled on your Google account. 2. Enter a name (e.g. "Mail TUI") and click **Create** 3. Google will display a 16-character password — copy it -### 3. Update config.toml +### 3. Configure tuimail -```toml -[imap] -host = "imap.gmail.com" -port = 993 -username = "you@gmail.com" -password = "xxxx xxxx xxxx xxxx" -use_tls = true +Run the setup wizard: + +```bash +cargo run -- --configure ``` -Replace the password with the app password from step 2 (spaces are optional). +When prompted for provider choose `imap`, then enter: +- IMAP host: `imap.gmail.com`, port: `993`, TLS: `true` +- Username: your Gmail address +- Password: the 16-character App Password from step 2 (spaces are optional) +- SMTP host: `smtp.gmail.com`, port: `465`, TLS mode: `smtps` -**Important:** Do not commit `config.toml` — it is listed in `.gitignore`. +Passwords are stored securely in the OS keychain — they are never written to `config.toml`. ## Local Test Server (Docker) @@ -50,6 +51,17 @@ Replace the password with the app password from step 2 (spaces are optional). docker-compose ps ``` +### Configure tuimail for the local server + +```bash +cargo run -- --configure +``` + +Choose provider `imap` and enter: +- IMAP host: `localhost`, port: `143`, TLS: `false` +- Username: `test@example.com`, password: `password123` +- SMTP host: `localhost`, port: `25`, TLS mode: `none` + ### IMAP Connection Details - **Host:** localhost