March 26, 2020 Contributors


sieve_hard_error — Report an error in a Sieve extension


#include "sieve/ecsieve.h"

| int **sieve_hard_error** ( | seng, |   |
|   | msg, |   |
|   | ); |   |

SENG * <var class="pdparam">seng</var>;
const char * <var class="pdparam">msg</var>;
<var class="pdparam">...</var>;


Report an error in a Sieve extension.

The purpose of this routine is to log error information, such as invalid parameters, to the panic log and return from a Sieve extension routine.

If Sieve is configured to fail on a runtime error, this function will set the validation context to reply code 421 (Service not available, closing transmission channel) so that the inbound session will be retried by the sender at a later time.

If Sieve is configured to continue on a runtime error, this function will simply log an error and the script will continue running the next statement.

To set the Sieve error mode see sieve_set_error_mode.



The Sieve engine.


The message with format specifiers, if required.

The variable argument(s).

Return Values

Returns SIV_CONT if Sieve should continue running the script, or SIV_DONE if the script should terminate. You must return one of these values from your routine.


It is legal to call this function in any thread.

See Also

Section 68.73, “SENG (sieve_engine)”