< Home

send-mail attachment max-size action

Function

The send-mail attachment max-size action command sets the maximum allowed size of attachments allowed for an email to be sent and configures the action to take if the attachment size exceeds the allowed limit.

The undo send-mail attachment max-size command restores the default configuration.

Format

send-mail attachment max-size max-size action { alert | block }

undo send-mail attachment max-size

Parameters

Parameter Description Value
max-size max-size Specifies the maximum allowed attachment size. The value is an integer ranging from 1 to 20480, in KB. The default value is 20480.
action Indicates the action to take when the size of a single email attachment exceeds the allowed limit.

alert: The FW permits the email and generates a log.

block: The FW blocks the email.

Views

Mail filtering profile view

Default Level

2: Configuration level

Usage Guidelines

Upon detecting an email encapsulated in SMTP, the FW performs filtering on the email by size and number of attachments in the sending direction.

Mail attachment control controls the size and number of attachments to prevent information leaks.

The send-mail attachment max-size action command sets the maximum allowed size of attachments in an email to be sent and configures the action to take if the attachment size exceeds the allowed limit.

  • The maximum size applies to a single attachment.
  • If the size of a single attachment in an SMTP email message is larger than the maximum allowed size, the filtering over the attachment size in the sent mail is enabled, and the action is set to block, the FW blocks this SMTP email message. Otherwise, the FW permits the email.

Example

# Set the maximum attachment size allowed for an email to 1000 KB.

<sysname> system-view
[sysname] profile type mail-filter name abc
[sysname-profile-mail-filter-abc] send-mail attachment max-size 1000 action block
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >