Configure the mail server access settings.
warden --task=mailserver:access --oper=<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: 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. 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. |
// reject mail from the 214.112.234.0/24 subnet
warden --task=mailserver:access --oper=client_add --pattern='214.112.234.0/24' --action=REJECT --text='Your network is banned' --reload=yes
// remove 214.112.234.0/24
warden --task=mailserver:access --oper=client_del --pattern='214.112.234.0/24' --reload=yes
// temporarily whitelist an IP address that is blocked on one of the DNSBLs
warden --task=mailserver:access --oper=client_add --pattern='214.112.234.1' --action=OK --reload=yes
// remove the temporarily whitelisted IP address
warden --task=mailserver:access --oper=client_del --pattern='214.112.234.1' --reload=yes