typedef ValvulaState(* ValvulaProcessRequest)(ValvulaCtx *ctx, ValvulaConnection *connection, ValvulaRequest *request, axlPointer request_data, char **message)

Handler definition for those set of functions that are able to process an incoming request and reports what action should be reported by Valvala to the gateway software (i.e.


This is a key handler and provides one of the basic functions of Valvula. Everything valvula receives a request, it tries to call registered ValvulaProcessRequest handlers to find out what to report to the gateway software (i.e. postfix).

ctxThe context where the operation/request is taking place.
connectionThe connection where the operation/request was received.
requestThe request that was received and has been asked to be resolved.
request_dataUser defined pointer passed to this handler.
messageOptional pointer to a message or particular content that is allowed by the handler itself. The content and how it is formated depends on the value that returns the handler. Check every code available at ValvulaState to know more about the kind of message you can report. In any case, the handler, if wants to report something, must allocate the string using axl_strdup, axl_strdup_printf or axl_new (char, <num of chars). Once the engine is done with the message, memory is released using axl_free.
An allowed ValvulaState value reporting what to do with the request received.