diff --git a/docs/source/example.ini b/docs/source/example.ini index faeb5f37..b9e1a4ba 100644 --- a/docs/source/example.ini +++ b/docs/source/example.ini @@ -29,3 +29,14 @@ token_file = /etc/example/token.json include_spam_trash = True paginate_messages = True scopes = https://www.googleapis.com/auth/gmail.modify + +[msgraph] +auth_method = ClientSecret +client_id = 12345678-90ab-cdef-1234-567890abcdef +client_secret = your-client-secret-here +tenant_id = 12345678-90ab-cdef-1234-567890abcdef +mailbox = dmarc-reports@example.com +# Use standard folder names - they work across all locales +# and avoid "Default folder Root not found" errors +reports_folder = Inbox +archive_folder = Archive diff --git a/docs/source/usage.md b/docs/source/usage.md index 85eec61d..f3b824aa 100644 --- a/docs/source/usage.md +++ b/docs/source/usage.md @@ -229,6 +229,18 @@ The full set of configuration options are: username, you must grant the app `Mail.ReadWrite.Shared`. ::: + :::{tip} + When configuring folder names (e.g., `reports_folder`, `archive_folder`), + you can use standard folder names like `Inbox`, `Archive`, `Sent Items`, etc. + These will be automatically mapped to Microsoft Graph's well-known folder names, + which works reliably across different mailbox locales and avoids issues with + uninitialized or shared mailboxes. Supported folder names include: + - English: Inbox, Sent Items, Deleted Items, Drafts, Junk Email, Archive, Outbox + - German: Posteingang, Gesendete Elemente, Gelöschte Elemente, Entwürfe, Junk-E-Mail, Archiv + - French: Boîte de réception, Éléments envoyés, Éléments supprimés, Brouillons, Courrier indésirable, Archives + - Spanish: Bandeja de entrada, Elementos enviados, Elementos eliminados, Borradores, Correo no deseado + ::: + :::{warning} If you are using the `ClientSecret` auth method, you need to grant the `Mail.ReadWrite` (application) permission to the