Files
claude-outlonok/config.py
2026-03-06 00:45:44 +08:00

42 lines
1.3 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
"""
配置常量和设置
"""
import os
import logging
# ============================================================================
# Microsoft OAuth2配置
# ============================================================================
# 使用exp.py中验证有效的CLIENT_ID
CLIENT_ID = 'dbc8e03a-b00c-46bd-ae65-b683e7707cb0'
TOKEN_URL = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token"
# ============================================================================
# IMAP配置
# ============================================================================
IMAP_SERVER = 'outlook.live.com'
IMAP_PORT = 993
INBOX_FOLDER_NAME = "INBOX"
JUNK_FOLDER_NAME = "Junk"
# ============================================================================
# 系统配置
# ============================================================================
# 管理认证配置
ADMIN_TOKEN = os.getenv('ADMIN_TOKEN', 'admin123') # 从环境变量获取默认为admin123
# 邮件获取配置
DEFAULT_EMAIL_LIMIT = 10 # 默认邮件获取数量限制V2默认获取10封
# ============================================================================
# 日志配置
# ============================================================================
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)