# Azure AD app registration credentials AZURE_TENANT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx AZURE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx AZURE_CLIENT_SECRET=your-client-secret-here # UPN or object ID of the mailbox to monitor (required for app-only auth) MAILBOX_USER=user@yourdomain.com # Mail folder to monitor (top-level display name only; all others are ignored) MAIL_FOLDER_NAME=Inbox # Public HTTPS URL Graph API will POST webhook notifications to # Must be reachable from the internet (use ngrok or a reverse proxy for local dev) NOTIFICATION_URL=https://your-hostname.example.com/webhook/notify # Graph subscription max lifetime in minutes (hard cap: 4230) SUBSCRIPTION_EXPIRY_MINUTES=4230 # Server (TLS is terminated by the hosting provider, not uvicorn) HOST=0.0.0.0 PORT=8000 # Number of uvicorn worker processes. Safe to scale ≥1 — the scheduler # (cron jobs) and processor (poll loop) run in their own dedicated # processes, so cron jobs won't fire N times per worker. UVICORN_WORKERS=2 # Storage paths (volume-mounted) DATABASE_PATH=/data/rcmemail.db EMAIL_STORAGE_PATH=/emails LOG_PATH=/logs # Dropbox — confirm folder paths with ops/Hunter before going live # App key + secret come from the Dropbox App Console (appinfo tab) # Refresh token is generated once via scripts/dropbox_auth.py and stored here DROPBOX_APP_KEY=your-app-key DROPBOX_APP_SECRET=your-app-secret DROPBOX_REFRESH_TOKEN=your-refresh-token DROPBOX_PO_PATH=/RCM Supply/Inside Sales/POs DROPBOX_INVOICE_PATH=/RCM Supply/Inside Sales/Invoices DROPBOX_MTR_PATH=/RCM Supply/MTRs # Processor poll interval in seconds PROCESSOR_POLL_INTERVAL=10 # Document classification scoring weights (must sum to 1.0) SCORE_WEIGHT_FILENAME=0.35 SCORE_WEIGHT_OCR=0.65 # Each additional keyword match beyond the first adds this fraction of the base weight SCORE_FREQ_MULTIPLIER=0.10 # Minimum confidence score (0.0–1.0) required to route a document; below this it is skipped SCORE_MIN_THRESHOLD=0.30 # Daily brief report — comma-separated recipient email addresses, sent at 6 PM Central BRIEF_RECIPIENTS=email1@yourdomain.com,email2@yourdomain.com # Developer alert — immediate email on infrastructure/system errors (no Mail ID context) DEV_ALERT_RECIPIENTS=devteam@yourdomain.com