smfi_stop Function

Purpose

The smfi_stop function turns off the milter. Connections are not accepted after this call.

Syntax

#include <libmilter/mfapi.h>
int smfi_stop(void);
);

Description

The smfi_stop function is called from the Callback functions or error-handling routines at any time. The smfi_stop routine does not allow new connections. However, the function does not wait for existing connections (threads) to terminate. This function causes the smfi_main function to return to the calling program, which can then exit or warm-restart.

Arguments

Table 1. Arguments
Item Description
void This argument does not take any value.

Return values

The smfi_stop function returns SMFI_CONTINUE value in the following cases:
  • An internal routine causes the milter library to stop.
  • A routine causes the milter library to stop.
  • The process that is started cannot be stopped.

Example

int ret;
SMFICTX *ctx;
...
ret = smfi_addheader(ctx, "Content-Type",
"multipart/mixed;\n\tboundary=\"foobar\"");

Related information

Callback functions