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 access map pattern to match.
--action <string> The access map action. Postscreen 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