4.9.2.2. Configuring policies for SMTP commands and responses

Changing the default behavior of commands can be done by using the hash attribute request. These hashes are indexed by the command name (e.g.: MAIL or DATA). Policies for responses can be configured using the response attribute, which is indexed by the command name and the response code. The possible actions are shown in the tables below. See Section 2.1, Policies for requests and responses for details. When looking up entries of the response attribute hash, the lookup precedence described in Section 2.1.2, Response codes is used.

ActionDescription
SMTP_REQ_ACCEPT Accept the request without any modification.
SMTP_REQ_REJECT Reject the request. The second parameter contains an SMTP status code, the third one an associated parameter which will be sent back to the client.
SMTP_REQ_ABORT Reject the request and terminate the connection.

Table 4.20.  Action codes for SMTP requests

ActionDescription
SMTP_RSP_ACCEPT Accept the response without any modification.
SMTP_RSP_REJECT Reject the response. The second parameter contains an SMTP status code, the third one an associated parameter which will be sent back to the client.
SMTP_RSP_ABORT Reject the response and terminate the connection.

Table 4.21.  Action codes for SMTP responses

SMTP extensions can be controlled using the extension hash, which is indexed by the extension name. The supported extensions (SMTP_EXT_PIPELINING; SMTP_EXT_SIZE; SMTP_EXT_ETRN; SMTP_EXT_8BITMIME) can be accepted or dropped (SMTP_EXT_ACCEPT or SMTP_EXT_DROP) individually or all at once using the SMTP_EXT_ALL index value.