"""Central configuration for the temp-mail service.

Everything is overridable via environment variables so the SAME code runs
locally today and on a VPS later with zero edits.
"""
import os

# ---- Domain the temp addresses belong to -----------------------------------
# On a VPS, set MAIL_DOMAIN to your real domain and point its MX record here.
MAIL_DOMAIN = os.getenv("MAIL_DOMAIN", "tempmail.local")

#####################################[AKN 12-8-26 ]############################
#PWD  : tempmail@#!@#$%
#User: indovisionconsul_tempmail
#Database: indovisionconsul_tempmail

# ---- MySQL ------------------------------------------------------------------
DB_HOST = os.getenv("TM_DB_HOST", "127.0.0.1")
DB_PORT = int(os.getenv("TM_DB_PORT", "3306"))
DB_USER = os.getenv("TM_DB_USER", "indovisionconsul_tempmail")
DB_PASSWORD = os.getenv("TM_DB_PASSWORD", "tempmail@#!@#$%")
DB_NAME = os.getenv("TM_DB_NAME", "indovisionconsul_tempmail")

# ---- Web server -------------------------------------------------------------
WEB_HOST = os.getenv("TM_WEB_HOST", "127.0.0.1")
WEB_PORT = int(os.getenv("TM_WEB_PORT", "8000"))

# ---- SMTP receiver ----------------------------------------------------------
# Port 25 is the real mail port. It needs admin rights + an open firewall.
# Locally you can use 2525 to avoid that; on a VPS use 25.
# Local default is 127.0.0.1 (Windows can't self-check 0.0.0.0).
# On a Linux VPS set TM_SMTP_HOST=0.0.0.0 to accept public mail.
SMTP_HOST = os.getenv("TM_SMTP_HOST", "127.0.0.1")
SMTP_PORT = int(os.getenv("TM_SMTP_PORT", "2525"))

# ---- Inbox lifetime ---------------------------------------------------------
INBOX_TTL_MINUTES = int(os.getenv("TM_INBOX_TTL", "60"))
