Enabling, disabling, or whitelisting rewriting URLs using the CLI

Prev Next

Follow these steps to enable or disable rewriting URLs based on the Advanced URL Defense analysis using the CLI.

To enable rewriting URLs:
  1. Go to CLI configuration mode:

    hostname > enable
    hostname # configure terminal
  2. Enable rewriting URLs based on the Advanced URL Defense analysis.

    hostname (config) email-analysis adv-url-defense rewrite enable
  3. Save your changes.

    hostname (config) # write memory
  4. Verify that rewriting URLs is enabled.

    hostname (config) # show email-analysis adv-url-defense configuration
    Email-Analysis Advanced URL Defense Configuration:
      Feature Enabled:                                yes
      URL Re-writing Enabled:                         yes
      ...
      
To disable rewriting URLs:
  1. Go to CLI configuration mode:

    hostname > enable
    hostname # configure terminal
  2. Disable rewriting URLs based on the Advanced URL Defense analysis.

    hostname (config) # no email-analysis adv-url-defense rewrite enable
  3. Save your changes.

    hostname (config) # write memory
  4. Verify that rewriting URLs is disabled.

    hostname (config) # show email-analysis adv-url-defense configuration
    Email-Analysis Advanced URL Defense Configuration:
      Feature Enabled:                                yes
      URL Re-writing Enabled:                         no

Whitelisting URLs from rewrite

You can use the CLI to whitelist specific URLs from being rewritten. The following CLI commands allow you to add a URL to the whitelist, remove a URL from the whitelist, and to display the list of whitelisted URLs:

  • email-analysis adv-url-defense rewrite domain-whitelist regex|strict <value>

  • no email-analysis adv-url-defense rewrite domain-whitelist <uuid>

  • show email-analysis adv-url-defense rewrite domain-whitelist regex|strict

Note

You can delete all whitelisted regex using the following CLI. To delete a specific regex, mention the UUID.

no email-analysis adv-url-defense rewrite whitelist

no email-analysis adv-url-defense rewrite whitelist <uuid>

Caution

Always add a domain to the whitelist without the 'www' prefix. When you submit a URL, the URL analyser extracts the domain without the ‘www’ prefix. For example, if you have added ‘www.xyz.com’ to the domain whitelist, the URL analyser fails to match it with the extracted domain, that is ‘xyz.com’.

Whitelisting URLs from rewrite using the Alexa Depth list

A whitelisted URL can be rewritten based on its position on the Alexa Depth list. The following CLI commands allow you to configure the Alexa Depth level and enable Alexa Depth.

  • email-analysis adv-url-defense rewrite alexa-depth <depth value>

  • analysis url policy alexa depth enable

The following CLI commands display the current value for Alexa Depth.

  • show email-analysis adv-url-defense rewrite alexa-depth

  • show analysis url-policy

The following CLI command allow you to reset the value for Alexa Depth. The default value is 100000. The minimum and maximum values are 10000 and 1000000 respectively:

  • analysis url policy alexa depth number