尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Free, open-source email security scanner and DMARC monitor: SPF, DKIM, DMARC, MTA-STS, BIMI, lookalike domains, DMARC reports. Self-host with Docker.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Open-source email security: domain scanning, DMARC monitoring and one-click fixes.
Features · Plans · Quick start · Configuration · Security · Documentation
PhishLens grades a domain's email security in seconds, tells you exactly which DNS records to publish, and keeps watching so you hear about it when something breaks. It reads DMARC and TLS reports, spots lookalike domains, and can publish fixes for you at your DNS provider.
It is MIT-licensed and self-hostable in one command. A self-hosted copy has every feature. XSignOn also runs a hosted service with Free, Pro and MSP plans.
t=, np=, psd=; pct, rf and ri flagged as obsolete).| Scan report | Dashboard |
|---|---|
| Phishing link checker | Translated pages |
One scan grades a domain across 13 checks, scores it 0–100 and returns the exact records to publish for every failing check, with step-by-step fix cards for your DNS provider.
/setup flow: domain, DMARC policy, publishing and alerts.No account needed at /tools: a phishing link checker, an email header
analyzer, single-record checkers, record generators (DMARC, SPF with a live
lookup meter, MTA-STS, TLS-RPT, BIMI), a BIMI logo checker with an inbox
preview, and a DNS propagation checker. Signed-in users also get a test-email
address that shows SPF, DKIM, DMARC alignment and the delivery path.
/mcp, so Claude or any MCP client can scan domains and
read reports (docs/MCP.md)./api/metrics endpoint for Grafana.Self-hosting? You get everything. Plans are off by default
(PLANS_ENABLED=false) and every company has every feature.
Hosted service. With PLANS_ENABLED=true, each company is on a Free, Pro
or MSP plan, set by the platform admin at /platform. Limits are enforced on
the server, locked features show a Pro or MSP badge in the dashboard, and a
downgrade never deletes data or breaks hosted DNS records.
| Free | Pro | MSP | |
|---|---|---|---|
| Public scanner and free tools | ✓ | ✓ | ✓ |
| Email alerts, fix cards, PDF of a scan | ✓ | ✓ | ✓ |
| Authenticator app, sessions, company isolation | ✓ | ✓ | ✓ |
| Monitored domains | 2 | 25 | Unlimited |
| Users | 2 | 10 | Unlimited |
| Automatic rescans | Weekly | Daily | Hourly |
| DMARC report domains | 1 | Unlimited | Unlimited |
| DMARC and TLS report history | 14 days | 1 year | 2 years |
| Audit log history | 7 days | 90 days | 1 year |
| Failure (RUF) and TLS reports | ✓ | ✓ | |
| Lookalike domain watch | ✓ | ✓ | |
| Hosted records and one-click DNS fixes | ✓ | ✓ | |
| Scheduled reports and shared report links | ✓ | ✓ | |
| Webhooks, chat alerts and API keys | ✓ | ✓ | |
| White-label branding | ✓ | ||
| SIEM and PSA / helpdesk tickets | ✓ |
Security features are in every plan. Limits live in app/plans.py; details in
docs/PLANS.md.
SECRET_KEY=$(python3 -c "import secrets; print(secrets.token_hex(32))") \
ADMIN_PASSWORD='choose-a-long-random-password' \
docker compose up -d
# open http://localhost:8000
docker-compose.yml runs PhishLens with Postgres and weekly built-in rescans.
A prebuilt image is published on every push to main:
ghcr.io/xsignon-secure/phishlens:latest.
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
cp .env.example .env # set SECRET_KEY and ADMIN_PASSWORD
.venv/bin/alembic upgrade head
.venv/bin/uvicorn app.main:app --port 8000
/platform and sign in with ADMIN_PASSWORD./login, chooses a password and sets up an
authenticator app, then adds the company's mail server and users.Full walkthrough: docs/ACCOUNTS.md.
All settings are environment variables; .env.example lists every one.
| Variable | Purpose |
|---|---|
SECRET_KEY | Required. Signs sessions and encrypts stored secrets. |
DATABASE_URL | Postgres for production; SQLite (phishlens.db) by default. |
ADMIN_PASSWORD | Opens /platform to create companies and owners. |
APP_URL | Public address used in emails and links. |
SMTP_* | Server-wide mail fallback; each company can set its own. |
RESCAN_INTERVAL_HOURS | Built-in rescans (e.g. 168 weekly, 1 hourly). |
REPORT_FETCH_MINUTES | Import DMARC/TLS reports from IMAP, Microsoft 365 or Gmail. |
PLANS_ENABLED | true turns on hosted plans. Off by default. |
RATE_LIMIT_STORAGE | database to share limits across several instances. |
VIRUSTOTAL_API_KEY, SAFE_BROWSING_API_KEY, URLHAUS_AUTH_KEY, OPENPHISH_FEED | Optional reputation and link-checker feeds. |
RPKI_CHECK, GEOIP_DB | Optional RPKI lookups and DMARC sender countries. |
MAX_MONITORS_PER_TEAM, SCAN_RATE_LIMIT_PER_HOUR | Abuse brakes for public instances. |
Dockerfile with a free
Postgres such as Neon (docs/DEPLOY-RENDER.md).--proxy-headers (the Dockerfile does).Threat model and pen-test checklist: docs/ACCOUNTS.md. Report vulnerabilities privately as described in SECURITY.md.
| Check | Points | Notes |
|---|---|---|
| DMARC | 20 | reject 20, quarantine 12, none 5; −3 for t=y or legacy pct<100, −2 without rua |
| SPF | 15 | -all 15, ~all 11; fails on more than 10 lookups or +all |
| DKIM | 15 | 2048-bit or more 15, 1024-bit 8 |
| MTA-STS | 10 | enforce 10, testing 4 |
| MX and SMTP STARTTLS | 5 + 5 | |
| TLS-RPT and BIMI | 3 + 2 | |
| DNSSEC, DNS blocklists, CAA | 5 + 5 + 5 | 7 IP lists plus Spamhaus DBL, SURBL and URIBL |
| TLS certificate, web security headers | 5 + 5 |
FastAPI, SQLAlchemy with Alembic, server-rendered Jinja templates and vanilla JavaScript with no build step.
app/
main.py, config.py app setup, security headers, settings
models.py, database.py SQLAlchemy models (SQLite or Postgres)
plans.py hosted plan limits and features
scanner/ DNS, mail and web checks, scoring, fix guides
routers/ auth, users, platform, scans, monitors, DMARC, TLS-RPT,
hosted records, integrations, MCP, pages
templates/, static/ UI and translations (app/locales)
scripts/ rescans and report import jobs
tests/ pytest suite
Run the tests with .venv/bin/python -m pytest tests/ -q.
| Guide | Covers |
|---|---|
| ACCOUNTS.md | Companies, roles, sign-in, threat model |
| PLANS.md | Hosted Free / Pro / MSP plans |
| DEPLOY.md · DEPLOY-RENDER.md | Production deployment |
| HOSTED-RECORDS.md | Hosted DMARC, SPF, MTA-STS, BIMI |
| DOMAIN-CONNECT.md | One-click publishing |
| INTEGRATIONS.md | Report mailboxes, SIEM, PSA, helpdesks |
| MCP.md | AI assistant connection |
| ENTERPRISE.md | Database migrations and operations |
| MARKET-ANALYSIS-2026-10.md | How PhishLens compares |
Contributions are welcome. See CONTRIBUTING.md and
CODE_OF_CONDUCT.md. Native-speaker reviews of the
translations in app/locales are especially helpful.
MIT. Use it, change it, self-host it. The hosted service and its plans are run by XSignOn; the code is the same.
| AI assistant connection (MCP) | ✓ |