How can I reject mail from a specific network (CIDR) using Warden?

Overview

This article provides instructions for rejecting incoming mail from a specific IP network or subnet within Warden. By configuring client access rules using CIDR notation, administrators can effectively block traffic from designated networks.

Note: For organizations that utilize multiple subnets, it is recommended to configure scoring rules based on their Autonomous System Number (ASN) rather than individual CIDR blocks. Refer to the ASN Scoring Guide for detailed implementation steps.

Prerequisites

  • Administrative access to the Warden management interface.
  • The CIDR notation or decimal subnet mask of the network you intend to block.

Configuration Procedure

  1. Navigate to Warden > Settings > Mail Server Access > Client Access.
  2. In the client access grid, click the Add button.
  3. Enter the target network's CIDR notation in the pattern field.
  4. Set the action to REJECT - Reject the request.
  5. Click Submit to apply and save the rule.

Verification & Logging

Once the rule is active, rejected connection attempts will be recorded in the system logs. To review blocked traffic, navigate to Warden > Logs > Reject log.

Mail Server Access Configuration Interface

CIDR Subnet Reference

Use the following tables to convert decimal subnet masks to CIDR notation when configuring access rules.

IPv4

CIDR Prefix Total IP Addresses Network Mask
/8 16,777,216 255.0.0.0
/16 65,536 255.255.0.0
/24 256 255.255.255.0
/25 128 255.255.255.128
/26 64 255.255.255.192
/27 32 255.255.255.224
/28 16 255.255.255.240
/29 8 255.255.255.248
/30 4 255.255.255.252
/31 2 255.255.255.254
/32 1 255.255.255.255

IPv6

CIDR Prefix Total IP Addresses
/64 18,446,744,073,709,551,616
/56 256 /64 subnets
/48 65,536 /64 subnets

Troubleshooting & Common Issues

  • Rule Not Applying: Verify that the CIDR notation is entered correctly without spaces or trailing slashes. Ensure the action is explicitly set to REJECT - Reject the request.
  • Missing Log Entries: Confirm that the rejecting server is actively attempting to connect during your monitoring window. Logs only populate when a connection attempt matches the configured pattern.
  • cidr, reject
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I install or upgrade the extension?

We provide free installation and configuration for all our paid licenses. Open a support ticket...

How can I add stronger Postfix restrictions so that the bulk of spam is rejected at the SMTPD level before it gets processed by Amavis?

Overview Warden enables administrators to enforce stricter Postfix SMTPD restrictions. These...

How can I change the interface language of the extension?

Overview This article provides instructions on how to change the interface language within the...

How can I configure greylisting with Warden Anti-spam and Virus protection?

Overview Greylisting is an email filtering mechanism designed to mitigate spam by temporarily...