Domain blocking
Block mail by the domain it comes from, by the mail servers that send for that domain, or by any domain a message names. Blocks are kept at three levels, and all of them apply:
- The platform's (Mailocity admin panel, Settings โ Mail delivery โ Domain blocks): for every mailbox on the server.
- A team's (the team's page, or Domain blocks in the domain admin panel): for every mailbox on the team.
- A user's own (webmail, Settings โ Blocked domains; an admin can manage them from the user's page): for that mailbox only.
What a block matches
| Kind | Matches | Use it for |
|---|---|---|
Domain (domain) | The sender's domain: the envelope sender's and the From address's. | A company or service whose mail you never want. |
Mail servers (mx) | The MX hosts of the sender's domain, as DNS lists them. | Spammers who register many domains but run them all on the same servers. |
Named in the message (named) | Any domain in From, Sender or Reply-To, or in a link (http://, https://, ftp://) in the message's text. | Phishing that sends from ordinary addresses but links to one site. |
A block for example.com matches its subdomains too (mail.example.com) but not lookalikes (notexample.com). Names are not case sensitive; a trailing dot is ignored.
What happens to blocked mail
Each block says what to do:
- Refuse (
reject, the default): the sending server is told 550 "Message refused", so the sender learns it was not delivered. - Junk (
junk): the message is accepted and filed in the Junk folder.
SMTP gives one answer for the whole message, so a message to several people is refused only when every recipient refuses it; recipients whose blocks refuse it get it in Junk instead, and the others get it as usual.
Blocks apply to mail from other servers. Mail between mailboxes on this server, and mail your own users send, is never blocked. A block is applied before spam scoring and IP allowlists, so an allowlisted network cannot get past a block.
Refusals are written to the mail log (rejectlog) with the reason, such as mail from spam.example is not accepted here.
Limits
Each platform, team or user can have up to 1000 blocks. A note (up to 200 characters) says why a block was added; each block records who added it and when.
For developers
- Admin API:
/v1/domain-blocks(the platform's),/v1/tenants/{tenantId}/domain-blocks(a team's) and/v1/tenants/{tenantId}/accounts/{accountId}/domain-blocks(a user's):GETlists,POST {"kind": "mx", "value": "bulkhost.example", "action": "junk", "note": "..."}adds,DELETE .../{blockId}removes. Team admins can use the team and user routes for their own team. - Webmail:
GET,POST /api/mail/domain-blocksandDELETE /api/mail/domain-blocks/{id}for the signed-in user's own blocks;GETalso lists the team's (read only). - Command line:
domain-block,domain-block team TEAM,mailbox domain-block USER(see Command line).