Files
Meister-Eder/.env.example
T
Claude 7fb1d1fa0f Make admin notification recipients configurable via ADMIN_EMAILS
Previously the To/Cc addresses were hardcoded in notifier.py (Andrea,
Barbara, Markus). This caused accidental emails to production contacts
during testing.

Changes:
- New ADMIN_EMAILS env var: comma-separated list of addresses.
  First address → To; remaining addresses → Cc.
- AdminNotifier now accepts admin_emails list; warns and skips if empty.
- Removed hardcoded _INDOOR_EMAIL / _OUTDOOR_EMAIL / _ADMIN_CC_EMAIL
  constants and the _recipients_for() routing method.
- Config.from_env() parses ADMIN_EMAILS into a list.
- main.py passes config.admin_emails to AdminNotifier.
- .env.example documents the new variable with production example.
- Tests: fixture updated; TestRecipientsFor removed (routing gone).

For testing: ADMIN_EMAILS=you@example.com
For production: ADMIN_EMAILS=andrea.sigrist@gmx.net,baba.laeubli@gmail.com,spielgruppen@familien-verein.ch

https://claude.ai/code/session_01HaUFs7SaLD5SoiuGCY27Tw
2026-02-21 21:23:51 +00:00

69 lines
2.8 KiB
Bash

# ---------------------------------------------------------------
# Meister-Eder Email Agent — Configuration Template
# ---------------------------------------------------------------
# Copy this file to .env and fill in your values.
# The .env file must NOT be committed to version control.
# ---------------------------------------------------------------
# ---------------------------------------------------------------
# AI Model (via litellm — supports any provider)
# ---------------------------------------------------------------
# Use litellm model strings: "<provider>/<model-name>"
# Examples:
# anthropic/claude-opus-4-6 (default)
# openai/gpt-4o
# gemini/gemini-2.0-flash
AI_MODEL=anthropic/claude-opus-4-6
# ---------------------------------------------------------------
# API Keys — set the one matching your chosen model's provider
# ---------------------------------------------------------------
ANTHROPIC_API_KEY=sk-ant-...
# OPENAI_API_KEY=sk-...
# GEMINI_API_KEY=...
# ---------------------------------------------------------------
# Email — IMAP (receiving parent messages)
# ---------------------------------------------------------------
IMAP_HOST=imap.example.com
IMAP_PORT=993
IMAP_USERNAME=anmeldung@example.com
IMAP_PASSWORD=your-imap-password
IMAP_USE_SSL=true
# ---------------------------------------------------------------
# Email — SMTP (sending replies and notifications)
# ---------------------------------------------------------------
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USE_TLS=true
# ---------------------------------------------------------------
# Registration email address (displayed as sender to parents)
# ---------------------------------------------------------------
REGISTRATION_EMAIL=anmeldung@example.com
# ---------------------------------------------------------------
# Admin notification recipients (comma-separated)
# First address → To; remaining addresses → Cc.
# For testing, set this to just your own email address.
# Production example (indoor leader, outdoor leader, admin):
# ADMIN_EMAILS=andrea.sigrist@gmx.net,baba.laeubli@gmail.com,spielgruppen@familien-verein.ch
# ---------------------------------------------------------------
ADMIN_EMAILS=you@example.com
# ---------------------------------------------------------------
# Storage
# ---------------------------------------------------------------
# Directory for conversation state and completed registrations.
DATA_DIR=data
# Path to the knowledge-base markdown files (admin-editable).
KNOWLEDGE_BASE_DIR=openspec/changes/define-project-scope/content/knowledge-base
# ---------------------------------------------------------------
# Polling
# ---------------------------------------------------------------
# How often (in seconds) to check the inbox for new messages.
POLL_INTERVAL=60