mailserver:access

Configure the mail server access settings.

warden --task=mailserver:access --oper=<postscreen_add|postscreen_del|client_add|client_del|helo_add|helo_del|sender_add|sender_del|recipient_add|recipient_del>
Option
Value Description
--oper <string> The operation you want to perform. Operations: postscreen_add, postscreen_del, client_add, client_del, helo_add, helo_del, sender_add, sender_del, recipient_add, recipient_del
--pattern <string> The pattern to match.
--action <string> The action you want to take: Postscreen supports actions - REJECT, PERMIT, DUNNO. All others support actions - REJECT, OK, DUNNO, DISCARD, HOLD, REDIRECT, BCC, PREPEND, INFO, WARN
--text <string> You can optionally specify a short string of text to be used in the reply and with logging for this message; otherwise, Postfix uses the general reply code and text configured for the restriction.
--reload <yes> Reload the service after saving settings.

Examples

// reject mail from the 214.112.234.0/24 subnet in Postscreen
warden --task=mailserver:access --oper=postscreen_add --pattern=214.112.234.0/24 --action=REJECT --reload=yes

// remove 214.112.234.0/24
warden --task=mailserver:access --oper=postscreen_del --pattern=214.112.234.0/24 --reload=yes

// whitelist an IP address that is blocked on one of the DNSBLs in Postscreen
warden --task=mailserver:access --oper=postscreen_add --pattern=214.112.234.1 --action=PERMIT --reload=yes

// remove a temporarily whitelisted IP address from Postscreen
warden --task=mailserver:access --oper=postscreen_del --pattern=214.112.234.1 --reload=yes

// reject mail from an attacking subnet with a custom rejection message
warden --task=mailserver:access --oper=client_add --pattern=203.0.113.44/28 --action=REJECT --text='Access denied by policy' --reload=yes

// hold mail addressed to a mailbomb target for manual review
warden --task=mailserver:access --oper=recipient_add --pattern=ceo@example.com --action=HOLD --reload=yes

Related Pages