---
title: 'mailserver:access'
url: 'https://docs.danami.com/warden/command-line-interface/mailserver/mailserver-access'
markdown: 'https://docs.danami.com/warden/command-line-interface/mailserver/mailserver-access.md'
date: '2026-09-24'
description: '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. Ope…'
taxonomy:
  category:
    - docs
  tag:
    - mailserver
---

[](#)  [ Basics ](https://docs.danami.com/warden/)     [ Command Line Interface ](https://docs.danami.com/warden/command-line-interface)      Mailserver       mailserver:access    

# 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

```

## Related Pages

- [Mail Server Access](https://docs.danami.com/warden/settings/mailserver/mailserver-access "Mail Server Access")
- [Mail Server Checks](https://docs.danami.com/warden/settings/mailserver/mailserver-checks "Mail Server Checks")
- [Mail Server Settings](https://docs.danami.com/warden/settings/mailserver/mailserver-settings "Mail Server Settings")

 [](https://docs.danami.com/warden/command-line-interface/mailserver/mailserver-checks)

---

## Navigation

- Next: [mailserver:checks](https://docs.danami.com/warden/command-line-interface/mailserver/mailserver-checks.md)
