Ezy Mail Server Check
ASecurityCheck whether the EzyPlatform Mail Server plugin is installed and working on a live site, end to end, through its admin API - domains and DNS (MX, SPF, DKIM, DMARC), PTR / reverse DNS, outbound port 25, mail ports open from the Internet (25, 587, 465, 143, 993), outbound queue with explanations of receiver answers, a real test mail to an outside address, DKIM signature verification, and an inbound test (mail from Gmail/Outlook arriving in a mailbox, with its Authentication-Results). Ends with...
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add cppai-vn/agents-plugins --skill ezy-mail-server-check --agent claude-codeAre you the author of Ezy Mail Server Check?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/cppai-vn-ezy-mail-server-check)---
name: ezy-mail-server-check
description: Check whether the EzyPlatform Mail Server plugin is installed and working on a live site, end to end, through its admin API - domains and DNS (MX, SPF, DKIM, DMARC), PTR / reverse DNS, outbound port 25, mail ports open from the Internet (25, 587, 465, 143, 993), outbound queue with explanations of receiver answers, a real test mail to an outside address, DKIM signature verification, and an inbound test (mail from Gmail/Outlook arriving in a mailbox, with its Authentication-Results). Ends with a pass/fail report and the exact fixes (PTR, firewall, protocol settings, block lists, relay). Uses the "EzyPlatform EzyLogin CLI Login" skill to sign in. Use when the user asks whether their mail server is set up correctly, "đã gửi/nhận được mail chưa", why mails do not arrive or go to spam, or to verify a new Mail Server installation.
---
# Check an EzyPlatform Mail Server installation
> Paths: `${CLAUDE_SKILL_DIR}` is this skill's folder (Claude Code substitutes it; other agents: replace it with the folder containing this SKILL.md).
`scripts/mail_check.py` (Python 3, standard library; `openssl` for `dkim-verify`) reads the Mail Server admin API (`/mail-server/api/v1/...`) with the EzyLogin CLI token. It finds `ezylogin.py` from the **ezy-login** skill (`${CLAUDE_SKILL_DIR}/../ezy-login/scripts/ezylogin.py`, or `EZYLOGIN_PY=/path/to/ezylogin.py`). If that skill is missing, tell the user to install it first.
`$M` below means `python3 -I ${CLAUDE_SKILL_DIR}/scripts/mail_check.py`, `$L` means `python3 -I ${CLAUDE_SKILL_DIR}/../ezy-login/scripts/ezylogin.py`.
## Rules
- Talk to the user in their language. Explain results in plain words; avoid dumping raw JSON.
- Everything here is read-only except: `send-test` (sends one real mail), the DNS check (it may move a domain from `PENDING_VERIFY` to `ACTIVE`, same as the admin button), and asking an outside service to probe ports (`--external-port-check` sends the server IP to portchecker.io). Ask before `send-test` (which address it goes to) and before the external port check.
- Never print tokens, passwords, app passwords or the content of private mails beyond the headers needed for the diagnosis.
- Some admin servers answer slowly; each call waits up to 120 seconds. Run long commands (`wait-inbox`, overview) in the background if your tool has a short timeout.
## 1. Sign in
Ask for the admin URL if you do not have it, then follow the EzyLogin CLI Login skill: `$L status --base-url <admin>`, `$L whoami ...`, `$L login ...` (the user approves in the browser; if EzyLogin is missing or CLI login is disabled, that skill explains how to fix it or enables it with the user).
## 2. Overview
```bash
$M overview --base-url https://admin.example.com --external-port-check
```
It prints and you check:
| Section | Good | If not |
|---|---|---|
| API reachable | domains listed | HTTP 404/HTML: Mail Server admin plugin not installed/active, or the admin lacks the `mail-server` permission |
| Domains | `status=ACTIVE`, `verifiedAt` set | fix the DNS rows marked not OK (see 2.1), press the DNS check again |
| Mailboxes | at least one ACTIVE mailbox per domain; `postmaster@` (DMARC reports) exists or is an alias | create them in Admin > Mail Server |
| Webmail mailboxes of this admin | the mailbox you will test is listed | inbox checks need a mailbox owned by the admin who signed in |
| Outbound queue | recent items `SENT` with `250` | read the `hint:` lines (block list, PTR, port 25, greylisting, unknown user) |
| Outbound port 25 from the server | `OK ... 220 mx.google.com` | VPS provider blocks outbound 25: ask them to open it, or add an SMTP relay transport |
| DNS rows | MX, SPF, DKIM OK (DMARC recommended) | add the expected value shown |
| PTR of the mail host IP | equals the mail hostname | ask the VPS provider to set reverse DNS `<ip> -> <mail hostname>` (Gmail and Microsoft reject or spam mail without it) |
| Ports from the Internet | 25 open (receive); 587/143 open if mail clients are used; 465/993 only if enabled with SSL | see 2.2 |
Without `--external-port-check` the ports are tested from this computer, which is useless for port 25 when the local network blocks it (the script says so). Single host: `$M ports mail.example.com --external-port-check`.
### 2.1 DNS records
Expected values are shown in the admin domain details page and by the overview:
- `MX <domain> -> <mail hostname>` (priority 10), and an `A` record for the mail hostname pointing to the server IP (not proxied through a CDN: a Cloudflare record for the mail host must be "DNS only").
- SPF `v=spf1 mx ~all` (the admin check accepts `mx` or `a:<hostname>`); if the server sends from another IP than the MX host, add `ip4:<ip>`.
- DKIM TXT `<selector>._domainkey.<domain>` = the key from the admin (DNS panels may split it into several quoted strings; that is fine).
- DMARC TXT `_dmarc.<domain>` `v=DMARC1; p=none; rua=mailto:postmaster@<domain>` to start.
- PTR is set at the VPS/IP provider, not at the domain DNS.
### 2.2 Ports closed from the Internet
Ask the user to run on the server (you cannot reach it):
```bash
sudo ss -ltnp | grep -E ':(25|587|465|143|993)\b'
sudo ufw status # or firewall-cmd --list-all / iptables -S
```
- Nothing listening: the socket server did not open the mail ports. Check that the Mail Server socket plugin is installed and active, that `socket/plugins/mail-server/mail-server-protocol-settings.xml` exists in the EzyPlatform folder with `active=true` for `smtp` (25), `submission` (587), `imap` (143) (465/993 need `ssl-active` and a certificate), that the socket server runs with a user allowed to bind ports below 1024, then restart the socket server and read its log.
- Listening but closed from outside: open the firewall (`sudo ufw allow 25,587,465,143,993/tcp`) and the provider's cloud firewall/security group, if any. Some providers block inbound 25 by default: ask them.
## 3. Outbound test (sending)
Ask the user for an outside address they can read (Gmail, Outlook, or a test service such as mail-tester.com, which gives a spam score). Then:
```bash
$M send-test --base-url https://admin.example.com --from info@example.com --to <outside address>
```
It sends synchronously through DIRECT delivery (`--transport <id>` to test a relay) and prints the receiver's answer:
- `accepted (250)`: the receiver took it. Ask the user whether it reached **Inbox or Spam**. Spam usually means missing PTR, a new IP/domain without reputation, or content that looks like spam; ask them to open "Show original" in Gmail and read `SPF`, `DKIM`, `DMARC` (all should be PASS).
- refused: read the `hint:` lines (block list such as Spamhaus PBL, Gmail "not authorized to send email directly", PTR, port 25 blocked).
Mails sent from webmail go through the queue instead; check them with `$M queue --base-url ...` (DEFERRED items retry automatically; FAILED items show the final reason).
To prove the server signs correctly, verify the DKIM signature of a sent message (from the Sent folder of a mailbox you own):
```bash
$M inbox --base-url ... --mailbox <id> --folder SENT
$M dkim-verify --base-url ... --mailbox <id> --message <message id>
```
`body hash: OK` and `signature: OK` mean receivers will see `dkim=pass` as long as the DNS key matches (the DNS check covers that).
## 4. Inbound test (receiving)
Needs port 25 open from the Internet (step 2). Start waiting, then ask the user to send a mail from an outside account (Gmail/Outlook) to the mailbox:
```bash
$M wait-inbox --base-url ... --mailbox <id> --timeout 600 # run in the background
$M headers --base-url ... --mailbox <id> --message <new id>
```
Read `Authentication-Results` added by the server (`spf=pass`, `dkim=pass`, `dmarc=pass` for a normal Gmail sender) and the first `Received` line (the sender's server). Also check `SPAM` with `--folder SPAM` if nothing shows in `INBOX`. If nothing arrives: port 25 closed, MX wrong, or the sender got an error (ask the user for the bounce message; a bounce mentioning "connection timed out" means port 25 is not reachable).
`inbox` and `wait-inbox` only work for mailboxes owned by the signed-in admin (webmail rule); otherwise ask the user to look in Admin > Mail Server > Webmail with the owner account.
## 5. Report
Finish with a short table, one row per check, `PASS` / `FAIL` / `NOT TESTED`, and for each FAIL the exact fix and who does it (user at the DNS provider, VPS provider, server firewall, admin page). Typical items: plugin installed, domain ACTIVE, DNS records, PTR, outbound port 25, test mail accepted, landed in Inbox (user confirms), DKIM signature, inbound port 25, inbound mail received with SPF/DKIM/DMARC pass, mail client ports (587/143) if needed.
The installation is confirmed working when: the domain is ACTIVE, PTR matches, a test mail to Gmail lands in Inbox with SPF/DKIM/DMARC pass, and a mail from Gmail arrives in the mailbox.
Files in this skill
- SKILL.md
- scripts/mail_check.py
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.