---
title: 'webserver:policy:webmail'
url: 'https://docs.danami.com/juggernaut/command-line-interface/webserver/webserver-policy-webmail'
markdown: 'https://docs.danami.com/juggernaut/command-line-interface/webserver/webserver-policy-webmail.md'
date: '2026-10-07'
description: 'Configure the webmail access policy. All country code options use ISO 3166-1 alpha-2 country codes. See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 juggernaut --task=webserver:policy:webmail Option Value Default Description --deny_countries <string1,string2> A list of countries …'
taxonomy:
  category:
    - docs
  tag:
    - maxmind
---

[](#)  [ Basics ](https://docs.danami.com/juggernaut/)     [ Command Line Interface ](https://docs.danami.com/juggernaut/command-line-interface)      Webserver       webserver:policy:webmail    

# webserver:policy:webmail

Configure the webmail access policy. All country code options use ISO 3166-1 alpha-2 country codes. See: [https://en.wikipedia.org/wiki/ISO\_3166-1\_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)

```
juggernaut --task=webserver:policy:webmail
```

| Option | Value | Default | Description |
|---|---|---|---|
| `--deny_countries` | <string1,string2> |  | A list of countries that will be denied access to the webmail. (ISO 3166-1 alpha-2 country codes) |
| `--deny_countries_add` | <string> |  | Add a single entry to deny\_countries. |
| `--deny_countries_del` | <string> |  | Remove a single entry from deny\_countries. |
| `--deny_continents` | <string1,string2> |  | A list of continents that will be denied access to the webmail. Continents: AF, NA, OC, AN, AS, EU, SA |
| `--deny_continents_add` | <string> |  | Add a single entry to deny\_continents. |
| `--deny_continents_del` | <string> |  | Remove a single entry from deny\_continents. |
| `--deny_asns` | <digit1,digit2> |  | A list of ASNs that will be denied access to the webmail. |
| `--deny_asns_add` | <digit> |  | Add a single entry to deny\_asns. |
| `--deny_asns_del` | <digit> |  | Remove a single entry from deny\_asns. |
| `--allow_countries` | <string1,string2> |  | A list of countries that will be allowed access to the webmail. (ISO 3166-1 alpha-2 country codes) |
| `--allow_countries_add` | <string> |  | Add a single entry to allow\_countries. |
| `--allow_countries_del` | <string> |  | Remove a single entry from allow\_countries. |
| `--allow_continents` | <string1,string2> |  | A list of continents that will be allowed access to the webmail. Continents: AF, NA, OC, AN, AS, EU, SA |
| `--allow_continents_add` | <string> |  | Add a single entry to allow\_continents. |
| `--allow_continents_del` | <string> |  | Remove a single entry from allow\_continents. |
| `--allow_asns` | <digit1,digit2> |  | A list of ASNs that will be allowed access to the webmail. |
| `--allow_asns_add` | <digit> |  | Add a single entry to allow\_asns. |
| `--allow_asns_del` | <digit> |  | Remove a single entry from allow\_asns. |
| `--default` | <yes> |  | Reset all settings to their default values. |
| `--default_option` | <option> |  | Reset a specific setting to its default value. |
| `--restart` | <yes> |  | Restart the service after saving settings. |

## Examples

```
// set deny_countries
juggernaut --task=webserver:policy:webmail --deny_countries=RU,BG --restart=yes

// reset deny_countries to default
juggernaut --task=webserver:policy:webmail --default_option=deny_countries --restart=yes

// reset all settings back to default
juggernaut --task=webserver:policy:webmail --default=yes --restart=yes

// only allow webmail access from Europe and North America
juggernaut --task=webserver:policy:webmail --allow_continents=EU,NA --restart=yes
```

## Related Pages

- [Webmail Policy](https://docs.danami.com/juggernaut/settings/web-server/webmail-policy "Webmail Policy")
- [Policy Migrator](https://docs.danami.com/juggernaut/settings/web-server/policy-migrator "Policy Migrator")
- [Policy Settings](https://docs.danami.com/juggernaut/settings/web-server/policy-settings "Policy Settings")

 [ ](https://docs.danami.com/juggernaut/command-line-interface/webserver/webserver-policy) [](https://docs.danami.com/juggernaut/settings/web-server/policy-settings)

---

## Navigation

- Previous: [webserver:policy](https://docs.danami.com/juggernaut/command-line-interface/webserver/webserver-policy.md)
