Moderation & Safety
Moderation & Safety
Section titled “Moderation & Safety”Courier includes rate limiting, player blocking, and input sanitization out of the box. Most of it works automatically — zero configuration required.
Rate Limiting
Section titled “Rate Limiting”Three tiers of rate limiting prevent mail spam. Each tracks sends independently per player:
File: config/courier/config.conf
mail { minuteLimit = 5 hourlyLimit = 30 dailyLimit = 100}| Tier | Default | What It Does |
|---|---|---|
| Per-minute | 5 | Max messages a player can send per minute |
| Per-hour | 30 | Max messages a player can send per hour |
| Per-day | 100 | Max messages a player can send per day |
Limits are per-player and shared across servers in multi-server setups. No bypassing them by server-hopping.
Cooldown Permissions
Section titled “Cooldown Permissions”Cooldowns add a delay between consecutive sends. The player’s permissions determine their tier — the most permissive match wins:
| Permission | Cooldown |
|---|---|
courier.cooldown.bypass | None |
courier.cooldown.vip | 5 seconds |
courier.cooldown.premium | 2 seconds |
| (none) | 10 seconds (default) |
Cooldowns are separate from rate limits. A player can be within their rate limit but still need to wait for the cooldown timer. Both checks must pass.
Player Blocking
Section titled “Player Blocking”Players can block others from sending them mail:
/mail block <player>— block a player/mail unblock <player>— unblock a player
Blocks persist across sessions. When a blocked player tries to send mail, they get an error — the mail is never created or stored.
Input Sanitization
Section titled “Input Sanitization”Courier sanitizes user input automatically:
- MiniMessage tags are stripped to prevent tag injection in subjects and bodies. Players can’t use formatting tags to impersonate system messages or create misleading content.
- Command placeholders are validated to prevent command injection. Only whitelisted placeholders like
{player}and{uuid}are processed. - Subject length is enforced by the
maxSubjectLengthconfig setting, preventing excessively long subjects from breaking the GUI or database.
Atomic Package Claims
Section titled “Atomic Package Claims”Every package claim uses a compare-and-set (CAS) operation at the database level. Each package can only be claimed exactly once, even if two requests arrive at the same instant.
Admin Tools
Section titled “Admin Tools”A handful of admin commands for monitoring and maintenance:
| Command | What It Does |
|---|---|
/mailadmin debug <player> | Inspect a player’s mailbox data — message counts, statuses |
/mailadmin stats | System-wide statistics — total messages, active users, storage usage |
/mailadmin cleanup | Force an immediate cleanup of expired mail (normally runs on a schedule) |
/mailadmin locker cleanup | Force cleanup of expired package locker entries |
Next Steps
Section titled “Next Steps”- Permissions Reference — full list of all Courier permissions including moderation nodes
- Notifications — configure how players hear about new mail
- Configuration — full config.conf reference including all moderation settings