qpsmtpd Wiki

[[api:hook_return_values]]

You are here: start » api » hook_return_values

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

You don't have an account yet? Just get one: Register

Forgotten your password? Get a new one: Set new password

Hook return values

Return values are a plugin's way of communicating back to the qpsmtpd core, and an integral part of the Plug-in API

Some of the most common return values are

OK

The OK return value implies that the plugin has performed some sort of checking on this connection or transaction, and that the remaining plugins should not be called for the current hook. This is not very clear 1)

DONE

DENY

The DENY return value tells qpsmtpd to end this transaction with a 5xx_error_code.

DENY_DISCONNECT

The DENY_DISCONNECT return value tells qpsmtpd to end this transaction with a 5xx_error_code and to end the connection by “hanging up” on the connecting client.

DENYSOFT

The DENYSOFT return value tells qpsmtpd to end this transaction with a 4xx_error_code, i.e. a temporary error.

DENYSOFT_DISCONNECT

The DENYSOFT_DISCONNECT return value tells qpsmtpd to end this transaction with a 4xx_error_code, i.e. a temporary error, and to end the connection by “hanging up” on the connecting client.

DECLINED

The DECLINED return code is used to indicate that the plugin does not wish to affect reception of this message, or that the plugin has failed internally. It will imply that the next plugin is called, so many plugins will use DECLINED and not OK to signal that this plugin thinks the message is legitimate. This is not very clear either 2)

1) keep in mind that plugins are called in the order of the plugins config file, for most hooks: returning anything else than DECLINED will not run any later plugins
2) see other footnote