PHPackages                             anto0102/mailguard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. anto0102/mailguard

ActiveFlarum-extension[Mail &amp; Notifications](/categories/mail)

anto0102/mailguard
==================

Flarum extension to sanitize and validate email registrations

v2.0.7(2mo ago)14MITPHPPHP ^8.3

Since May 2Pushed 2mo agoCompare

[ Source](https://github.com/anto0102/MailGuard)[ Packagist](https://packagist.org/packages/anto0102/mailguard)[ RSS](/packages/anto0102-mailguard/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (14)Used By (0)

Flarum MailGuard
================

[](#flarum-mailguard)

[![Flarum 2.0 Compatible](https://camo.githubusercontent.com/efb5eba7f9df415c7628d164e4a61150fbee8a33a04d596a169b11d0f636dc60/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466c6172756d2d322e302d626c75652e737667)](https://camo.githubusercontent.com/efb5eba7f9df415c7628d164e4a61150fbee8a33a04d596a169b11d0f636dc60/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466c6172756d2d322e302d626c75652e737667) [![License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Total Downloads](https://camo.githubusercontent.com/e7f70045ab8004164c58c9d17645e5f23e652a55456bcf389c58da506011dece/68747470733a2f2f706f7365722e707567782e6f72672f616e746f303130322f6d61696c67756172642f646f776e6c6f616473)](https://packagist.org/packages/anto0102/mailguard)[![Latest Stable Version](https://camo.githubusercontent.com/09d7df96aeb45d31c4667095d7adc68c05d38a2243ec32701a0eb0613b2b76c2/68747470733a2f2f706f7365722e707567782e6f72672f616e746f303130322f6d61696c67756172642f76)](https://packagist.org/packages/anto0102/mailguard)[![Monthly Downloads](https://camo.githubusercontent.com/4f6e2378eb045c6da55d2d393e97545c6da7d9507953b5160e69f16978cba59d/68747470733a2f2f706f7365722e707567782e6f72672f616e746f303130322f6d61696c67756172642f642f6d6f6e74686c79)](https://packagist.org/packages/anto0102/mailguard)

MailGuard is a lightweight, ultra-optimized Flarum 2.0 extension to securely guard and validate email domains during user registration. Built entirely without external GUI frameworks to guarantee zero impact on server memory and provide instant, real-time blocking of unwanted users.

---

Features &amp; Configuration Guide
----------------------------------

[](#features--configuration-guide)

### Alias Anti-Fraud (Plus Strategy)

[](#alias-anti-fraud-plus-strategy)

Gmail and many providers allow users to add a `+` (e.g., `user+spam@gmail.com`) to create "infinite" addresses for the same account.

- **Action: Block**: Rejects any registration containing a `+` alias.
- **Action: Sanitize**: Automatically removes the alias part (e.g., `user+1@gmail.com` becomes `user@gmail.com`) before saving.

### Gmail Dot Strategy (Anti-Clone)

[](#gmail-dot-strategy-anti-clone)

Gmail ignores dots (e.g., `m.a.r.i.o@gmail.com` is the same as `mario@gmail.com`). This is often used for account cloning.

- **Disabled (Standard)**: Dots are ignored by the filter; Flarum treats them as separate emails.
- **Check for Duplicates (Anti-Clone)**: \[Recommended\] The user can register with dots (maintaining their login UX), but MailGuard blocks the registration if the root version (without dots) already exists in the database.
- **Strict Block**: Rejects any email containing dots in the local part for target providers.
- **Silent Clean**: Automatically removes dots from the email before saving. Note: The user will then need to log in without dots.

### DNS/MX Live Validation

[](#dnsmx-live-validation)

Performs a real-time server check to verify if the domain has valid Mail Exchange (MX) records. Blocks fake domains like `@nonexistent-provider.web` instantly.

### Domain Shield (Allow/Deny)

[](#domain-shield-allowdeny)

- **Allowlist**: Only the listed domains can register. Perfect for corporate or invitation-only forums.
- **Denylist**: All domains allowed except those listed (e.g., disposable email providers).

---

Installation &amp; CLI
----------------------

[](#installation--cli)

Install via Composer:

```
composer require anto0102/mailguard
php flarum cache:clear
```

### Powerful CLI Commands:

[](#powerful-cli-commands)

```
# Audit users against current blocked domains
php flarum emailguard:audit

# Perform a deep audit and permanently remove non-compliant users
php flarum emailguard:audit --delete

# Export all current forum domains to CSV or JSON
php flarum emailguard:export --format=json
```

---

License
-------

[](#license)

This project is licensed under the MIT License.

Support &amp; Issues
--------------------

[](#support--issues)

If you experience any bugs, have questions, or want to suggest new features, please open an Issue directly on this GitHub repository.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance84

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

13

Last Release

83d ago

Major Versions

v1.0.4 → v2.0.02026-05-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/164395900?v=4)[Anto102](/maintainers/Anto102)[@anto102](https://github.com/anto102)

---

Top Contributors

[![anto0102](https://avatars.githubusercontent.com/u/201468737?v=4)](https://github.com/anto0102 "anto0102 (1 commits)")

---

Tags

emailregistrationdomainguardflarum

### Embed Badge

![Health badge](/badges/anto0102-mailguard/health.svg)

```
[![Health](https://phpackages.com/badges/anto0102-mailguard/health.svg)](https://phpackages.com/packages/anto0102-mailguard)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[arubacao/tld-checker

Top Level Domain (TLD) validation library for PHP

731.7M3](/packages/arubacao-tld-checker)[salaros/is-biz-mail

isBizMail tells you whether a given email address is free (gmail.com, yahoo.es, yandex.ru etc) or not

31466.4k](/packages/salaros-is-biz-mail)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/webhooks

Automatically notify Discord, Slack, and Microsoft Teams when events happen on your Flarum forum.

2420.0k](/packages/fof-webhooks)[maize-tech/laravel-email-domain-rule

Laravel Email Domain Rule

612.0k](/packages/maize-tech-laravel-email-domain-rule)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
