<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="MilterClientContext">
<refmeta>
<refentrytitle role="top_of_page" id="MilterClientContext.top_of_page">MilterClientContext</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>milter managerライブラリ</refmiscinfo>
</refmeta>
<refnamediv>
<refname>MilterClientContext</refname>
<refpurpose>milterプロトコルを処理します。</refpurpose>
</refnamediv>

<refsynopsisdiv id="MilterClientContext.synopsis" role="synopsis">
<title role="synopsis.title">概要</title>

<synopsis>#define             <link linkend="MILTER-CLIENT-CONTEXT-ERROR:CAPS">MILTER_CLIENT_CONTEXT_ERROR</link>
enum                <link linkend="MilterClientContextError">MilterClientContextError</link>;
enum                <link linkend="MilterClientContextState">MilterClientContextState</link>;
                    <link linkend="MilterClientContext-struct">MilterClientContext</link>;
<link linkend="GQuark"><returnvalue>GQuark</returnvalue></link>              <link linkend="milter-client-context-error-quark">milter_client_context_error_quark</link>   (void);
<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> * <link linkend="milter-client-context-new">milter_client_context_new</link>         (void);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-feed">milter_client_context_feed</link>          (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *chunk,
                                                         <link linkend="gsize"><returnvalue>gsize</returnvalue></link> size,
                                                         <link linkend="GError"><returnvalue>GError</returnvalue></link> **error);
<link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>            <link linkend="milter-client-context-get-private-data">milter_client_context_get_private_data</link>
                                                        (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="milter-client-context-set-private-data">milter_client_context_set_private_data</link>
                                                        (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="gpointer"><returnvalue>gpointer</returnvalue></link> data,
                                                         <link linkend="GDestroyNotify"><returnvalue>GDestroyNotify</returnvalue></link> destroy);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-set-reply">milter_client_context_set_reply</link>     (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="guint"><returnvalue>guint</returnvalue></link> code,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *extended_code,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *message,
                                                         <link linkend="GError"><returnvalue>GError</returnvalue></link> **error);
<link linkend="gchar"><returnvalue>gchar</returnvalue></link> *             <link linkend="milter-client-context-format-reply">milter_client_context_format_reply</link>  (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-add-header">milter_client_context_add_header</link>    (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *name,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *value,
                                                         <link linkend="GError"><returnvalue>GError</returnvalue></link> **error);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-insert-header">milter_client_context_insert_header</link> (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="guint32"><returnvalue>guint32</returnvalue></link> index,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *name,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *value,
                                                         <link linkend="GError"><returnvalue>GError</returnvalue></link> **error);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-change-header">milter_client_context_change_header</link> (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *name,
                                                         <link linkend="guint32"><returnvalue>guint32</returnvalue></link> index,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *value);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-delete-header">milter_client_context_delete_header</link> (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *name,
                                                         <link linkend="guint32"><returnvalue>guint32</returnvalue></link> index);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-change-from">milter_client_context_change_from</link>   (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *from,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *parameters);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-add-recipient">milter_client_context_add_recipient</link> (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *recipient,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *parameters);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-delete-recipient">milter_client_context_delete_recipient</link>
                                                        (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *recipient);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-replace-body">milter_client_context_replace_body</link>  (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *body,
                                                         <link linkend="gsize"><returnvalue>gsize</returnvalue></link> body_size);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-progress">milter_client_context_progress</link>      (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="milter-client-context-quarantine">milter_client_context_quarantine</link>    (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *reason);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="milter-client-context-set-timeout">milter_client_context_set_timeout</link>   (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="guint"><returnvalue>guint</returnvalue></link> timeout);
<link linkend="guint"><returnvalue>guint</returnvalue></link>               <link linkend="milter-client-context-get-timeout">milter_client_context_get_timeout</link>   (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="milter-client-context-set-state">milter_client_context_set_state</link>     (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="MilterClientContextState"><returnvalue>MilterClientContextState</returnvalue></link> state);
<link linkend="MilterClientContextState"><returnvalue>MilterClientContextState</returnvalue></link>  <link linkend="milter-client-context-get-state">milter_client_context_get_state</link>
                                                        (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="milter-client-context-set-option">milter_client_context_set_option</link>    (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="MilterOption"><returnvalue>MilterOption</returnvalue></link> *option);
<link linkend="MilterOption"><returnvalue>MilterOption</returnvalue></link> *      <link linkend="milter-client-context-get-option">milter_client_context_get_option</link>    (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);
</synopsis>
</refsynopsisdiv>
<refsect1 id="MilterClientContext.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">オブジェクト階層</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="MilterAgent">MilterAgent</link>
         +----<link linkend="MilterProtocolAgent">MilterProtocolAgent</link>
               +----MilterClientContext
</synopsis>
</refsect1>
<refsect1 id="MilterClientContext.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">実装されたインターフェイス</title>
<para>MilterClientContextは<link linkend="MilterErrorEmittable">MilterErrorEmittable</link>と<link linkend="MilterFinishedEmittable">MilterFinishedEmittable</link>を実装しています。</para>
</refsect1>
<refsect1 id="MilterClientContext.properties" role="properties">
<title role="properties.title">プロパティ</title>
<synopsis>
  "<link linkend="MilterClientContext--option">option</link>"                   <link linkend="MilterOption"><type>MilterOption</type></link>*         : Read / Write
  "<link linkend="MilterClientContext--state">state</link>"                    <link linkend="MilterClientContextState"><type>MilterClientContextState</type></link>  : Read / Write
</synopsis>
</refsect1>
<refsect1 id="MilterClientContext.signals" role="signal_proto">
<title role="signal_proto.title">シグナル</title>
<synopsis>
  "<link linkend="MilterClientContext-abort">abort</link>"                                          : Run Last
  "<link linkend="MilterClientContext-abort-response">abort-response</link>"                                 : Run Last
  "<link linkend="MilterClientContext-body">body</link>"                                           : Run Last
  "<link linkend="MilterClientContext-body-response">body-response</link>"                                  : Run Last
  "<link linkend="MilterClientContext-connect">connect</link>"                                        : Run Last
  "<link linkend="MilterClientContext-connect-response">connect-response</link>"                               : Run Last
  "<link linkend="MilterClientContext-data">data</link>"                                           : Run Last
  "<link linkend="MilterClientContext-data-response">data-response</link>"                                  : Run Last
  "<link linkend="MilterClientContext-define-macro">define-macro</link>"                                   : Run Last
  "<link linkend="MilterClientContext-end-of-header">end-of-header</link>"                                  : Run Last
  "<link linkend="MilterClientContext-end-of-header-response">end-of-header-response</link>"                         : Run Last
  "<link linkend="MilterClientContext-end-of-message">end-of-message</link>"                                 : Run Last
  "<link linkend="MilterClientContext-end-of-message-response">end-of-message-response</link>"                        : Run Last
  "<link linkend="MilterClientContext-envelope-from">envelope-from</link>"                                  : Run Last
  "<link linkend="MilterClientContext-envelope-from-response">envelope-from-response</link>"                         : Run Last
  "<link linkend="MilterClientContext-envelope-recipient">envelope-recipient</link>"                             : Run Last
  "<link linkend="MilterClientContext-envelope-recipient-response">envelope-recipient-response</link>"                    : Run Last
  "<link linkend="MilterClientContext-header">header</link>"                                         : Run Last
  "<link linkend="MilterClientContext-header-response">header-response</link>"                                : Run Last
  "<link linkend="MilterClientContext-helo">helo</link>"                                           : Run Last
  "<link linkend="MilterClientContext-helo-response">helo-response</link>"                                  : Run Last
  "<link linkend="MilterClientContext-negotiate">negotiate</link>"                                      : Run Last
  "<link linkend="MilterClientContext-negotiate-response">negotiate-response</link>"                             : Run Last
  "<link linkend="MilterClientContext-timeout">timeout</link>"                                        : Run Last
  "<link linkend="MilterClientContext-unknown">unknown</link>"                                        : Run Last
  "<link linkend="MilterClientContext-unknown-response">unknown-response</link>"                               : Run Last
</synopsis>
</refsect1>

<refsect1 id="MilterClientContext.description" role="desc">
<title role="desc.title">説明</title>
<para><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>は1つのmilterプロトコルセッションを処理します。これは<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>インスタンスは各milterプロトコルセッション毎に生成されるということです。</para>
<para>各milterプロトコルコマンドを処理するために、<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>のシグナルに接続します。<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>にはmilterプロトコルのイベントに対応したシグナルがあります。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;ulink"><ulink url="https://www.milter.org/developers/api/xxfi_negotiate">xxfi_negotiate</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-negotiate"><type>"negotiate"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_connect">xxfi_connect</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-connect"><type>"connect"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_helo">xxfi_helo</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-helo"><type>"helo"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_envfrom">xxfi_envfrom</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-envelope-from"><type>"envelope-from"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_envrcpt">xxfi_envrcpt</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-envelope-recipient"><type>"envelope-recipient"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_data">xxfi_data</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-data"><type>"data"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_unknown">xxfi_unknown</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-unknown"><type>"unknown"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_header">xxfi_header</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-header"><type>"header"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_eoh">xxfi_eoh</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-end-of-header"><type>"end-of-header"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_body">xxfi_body</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-body"><type>"body"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_eom">xxfi_eom</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_abort">xxfi_abort</ulink></term>
  <listitem>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>。</para>
  <para>
  NOTE: You will need to check whether the current state is message processing or not. You can use <link linkend="MILTER-CLIENT-CONTEXT-STATE-IN-MESSAGE-PROCESSING:CAPS"><literal>MILTER_CLIENT_CONTEXT_STATE_IN_MESSAGE_PROCESSING</literal></link> for it.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><ulink url="https://www.milter.org/developers/api/xxfi_close">xxfi_close</ulink></term>
  <listitem>
  <para>
  <link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link>
</para>
</listitem>
</varlistentry>
</variablelist>
<para>以下はシグナルに接続する例です。すべてのシグナルに接続して、各シグナルハンドラはイベント名を表示します。</para>
<para>
<informalexample><programlisting>
static MilterStatus
cb_negotiate (MilterClientContext *context, MilterOption *option,
              gpointer user_data)
{
    g_print("negotiate\n");
    return MILTER_STATUS_ALL_OPTIONS;
}

static MilterStatus
cb_connect (MilterClientContext *context, const gchar *host_name,
            const struct sockaddr *address, socklen_t address_length,
            gpointer user_data)
{
    g_print("connect\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_helo (MilterClientContext *context, const gchar *fqdn, gpointer user_data)
{
    g_print("helo\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_envelope_from (MilterClientContext *context, const gchar *from,
                  gpointer user_data)
{
    g_print("envelope-from\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_envelope_recipient (MilterClientContext *context, const gchar *to,
                       gpointer user_data)
{
    g_print("envelope-recipient\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_data (MilterClientContext *context, gpointer user_data)
{
    g_print("data\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_header (MilterClientContext *context, const gchar *name, const gchar *value,
           gpointer user_data)
{
    g_print("header\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_end_of_header (MilterClientContext *context, gpointer user_data)
{
    g_print("end-of-header\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_body (MilterClientContext *context, const gchar *chunk, gsize length,
         gpointer user_data)
{
    g_print("body\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_end_of_message (MilterClientContext *context,
                   const gchar *chunk, gsize length,
                   gpointer user_data)
{
    g_print("end-of-message\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_abort (MilterClientContext *context, MilterClientContextState state,
          gpointer user_data)
{
    g_print("abort\n");
    return MILTER_STATUS_CONTINUE;
}

static MilterStatus
cb_unknown (MilterClientContext *context, const gchar *command,
            gpointer user_data)
{
    g_print("unknown\n");
    return MILTER_STATUS_CONTINUE;
}

static void
setup_context_signals (MilterClientContext *context)
{
#define CONNECT(name)                                                   \
    g_signal_connect(context, <link linkend="name">name</link>, G_CALLBACK(cb_ ## name), NULL)

    CONNECT(negotiate);
    CONNECT(connect);
    CONNECT(helo);
    CONNECT(envelope_from);
    CONNECT(envelope_recipient);
    CONNECT(data);
    CONNECT(header);
    CONNECT(end_of_header);
    CONNECT(body);
    CONNECT(end_of_message);
    CONNECT(abort);
    CONNECT(unknown);

#undef CONNECT
}
</programlisting></informalexample></para>

</refsect1>
<refsect1 id="MilterClientContext.details" role="details">
<title role="details.title">詳細</title>
<refsect2 id="MILTER-CLIENT-CONTEXT-ERROR:CAPS" role="macro">
<title>MILTER_CLIENT_CONTEXT_ERROR</title>
<indexterm zone="MILTER-CLIENT-CONTEXT-ERROR:CAPS"><primary>MILTER_CLIENT_CONTEXT_ERROR</primary></indexterm>
<programlisting>#define MILTER_CLIENT_CONTEXT_ERROR           (milter_client_context_error_quark())
</programlisting>
<para><link linkend="MilterClientContext"><type>MilterClientContext</type></link>のエラー用の<link linkend="GError"><type>GError</type></link>クォークを取得するために使われます。</para>
</refsect2>
<refsect2 id="MilterClientContextError" role="enum">
<title>enum MilterClientContextError</title>
<indexterm zone="MilterClientContextError"><primary>MilterClientContextError</primary></indexterm>
<programlisting>typedef enum
{
    MILTER_CLIENT_CONTEXT_ERROR_INVALID_CODE,
    MILTER_CLIENT_CONTEXT_ERROR_IO_ERROR,
    MILTER_CLIENT_CONTEXT_ERROR_NULL,
    MILTER_CLIENT_CONTEXT_ERROR_INVALID_STATE,
    MILTER_CLIENT_CONTEXT_ERROR_INVALID_ACTION
} MilterClientContextError;
</programlisting>
<para><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>の関数呼び出し中に発生するエラーを識別します。</para>
<variablelist role="enum">
<varlistentry id="MILTER-CLIENT-CONTEXT-ERROR-INVALID-CODE:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_ERROR_INVALID_CODE</literal></term>
<listitem><simpara><link linkend="milter-client-context-set-reply"><function>milter_client_context_set_reply()</function></link>で指定されたステータスコードが不正であることを示します。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-ERROR-IO-ERROR:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_ERROR_IO_ERROR</literal></term>
<listitem><simpara>milterプロトコルデータの読み書き時に発生した入出力エラーを示します。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-ERROR-NULL:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_ERROR_NULL</literal></term>
<listitem><simpara> Indicates unexpected
<link linkend="NULL:CAPS"><literal>NULL</literal></link> is passed.
</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-ERROR-INVALID-STATE:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_ERROR_INVALID_STATE</literal></term>
<listitem><simpara>現在の<link linkend="MilterClientContextState"><literal>MilterClientContextState</literal></link>で予期しない操作が要求されたことを示します。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-ERROR-INVALID-ACTION:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_ERROR_INVALID_ACTION</literal></term>
<listitem><simpara>コンテキストの<link linkend="MilterActionFlags"><literal>MilterActionFlags</literal></link>で予期しない操作が要求されたことを示します。</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="MilterClientContextState" role="enum">
<title>enum MilterClientContextState</title>
<indexterm zone="MilterClientContextState"><primary>MilterClientContextState</primary></indexterm>
<programlisting>typedef enum
{
    MILTER_CLIENT_CONTEXT_STATE_INVALID,
    MILTER_CLIENT_CONTEXT_STATE_START,
    MILTER_CLIENT_CONTEXT_STATE_NEGOTIATE,
    MILTER_CLIENT_CONTEXT_STATE_NEGOTIATE_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_CONNECT,
    MILTER_CLIENT_CONTEXT_STATE_CONNECT_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_HELO,
    MILTER_CLIENT_CONTEXT_STATE_HELO_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_ENVELOPE_FROM,
    MILTER_CLIENT_CONTEXT_STATE_ENVELOPE_FROM_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_ENVELOPE_RECIPIENT,
    MILTER_CLIENT_CONTEXT_STATE_ENVELOPE_RECIPIENT_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_DATA,
    MILTER_CLIENT_CONTEXT_STATE_DATA_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_UNKNOWN,
    MILTER_CLIENT_CONTEXT_STATE_UNKNOWN_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_HEADER,
    MILTER_CLIENT_CONTEXT_STATE_HEADER_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_END_OF_HEADER,
    MILTER_CLIENT_CONTEXT_STATE_END_OF_HEADER_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_BODY,
    MILTER_CLIENT_CONTEXT_STATE_BODY_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_END_OF_MESSAGE,
    MILTER_CLIENT_CONTEXT_STATE_END_OF_MESSAGE_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_QUIT,
    MILTER_CLIENT_CONTEXT_STATE_QUIT_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_ABORT,
    MILTER_CLIENT_CONTEXT_STATE_ABORT_REPLIED,
    MILTER_CLIENT_CONTEXT_STATE_FINISHED
} MilterClientContextState;
</programlisting>
<para><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>の状態を識別します。</para>
<variablelist role="enum">
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-INVALID:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_INVALID</literal></term>
<listitem><simpara>不正な状態。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-START:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_START</literal></term>
<listitem><simpara>はじまったばかり。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-NEGOTIATE:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_NEGOTIATE</literal></term>
<listitem><simpara>ネゴシエーションを開始。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-NEGOTIATE-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_NEGOTIATE_REPLIED</literal></term>
<listitem><simpara>ネゴシエーション応答を受信した</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-CONNECT:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_CONNECT</literal></term>
<listitem><simpara>接続情報を送信しました。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-CONNECT-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_CONNECT_REPLIED</literal></term>
<listitem><simpara>接続情報への応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-HELO:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_HELO</literal></term>
<listitem><simpara>HELOコマンドの開始。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-HELO-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_HELO_REPLIED</literal></term>
<listitem><simpara>HELOコマンドへの応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-ENVELOPE-FROM:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_ENVELOPE_FROM</literal></term>
<listitem><simpara>MAIL FROMコマンド開始。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-ENVELOPE-FROM-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_ENVELOPE_FROM_REPLIED</literal></term>
<listitem><simpara>MAIL FROMコマンドへの応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-ENVELOPE-RECIPIENT:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_ENVELOPE_RECIPIENT</literal></term>
<listitem><simpara>RCPT TOコマンドの開始。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-ENVELOPE-RECIPIENT-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_ENVELOPE_RECIPIENT_REPLIED</literal></term>
<listitem><simpara>RCPT TOコマンドへの応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-DATA:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_DATA</literal></term>
<listitem><simpara>DATAコマンドの開始。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-DATA-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_DATA_REPLIED</literal></term>
<listitem><simpara>DATAコマンドへの応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-UNKNOWN:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_UNKNOWN</literal></term>
<listitem><simpara>未知のSMTPコマンドの受信。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-UNKNOWN-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_UNKNOWN_REPLIED</literal></term>
<listitem><simpara>未知のSMTPコマンドへの応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-HEADER:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_HEADER</literal></term>
<listitem><simpara>ヘッダを送信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-HEADER-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_HEADER_REPLIED</literal></term>
<listitem><simpara>ヘッダへの応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-END-OF-HEADER:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_END_OF_HEADER</literal></term>
<listitem><simpara>すべてのヘッダを送信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-END-OF-HEADER-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_END_OF_HEADER_REPLIED</literal></term>
<listitem><simpara>ヘッダ終了への応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-BODY:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_BODY</literal></term>
<listitem><simpara>本体のかたまりの送信。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-BODY-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_BODY_REPLIED</literal></term>
<listitem><simpara>本体への応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-END-OF-MESSAGE:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_END_OF_MESSAGE</literal></term>
<listitem><simpara>すべての本文を送信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-END-OF-MESSAGE-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_END_OF_MESSAGE_REPLIED</literal></term>
<listitem><simpara>メッセージ終了への応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-QUIT:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_QUIT</literal></term>
<listitem><simpara>正常終了の開始。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-QUIT-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_QUIT_REPLIED</literal></term>
<listitem><simpara>正常終了への応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-ABORT:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_ABORT</literal></term>
<listitem><simpara>異常終了の開始。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-ABORT-REPLIED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_ABORT_REPLIED</literal></term>
<listitem><simpara>異常終了への応答を受信した。</simpara></listitem>
</varlistentry>
<varlistentry id="MILTER-CLIENT-CONTEXT-STATE-FINISHED:CAPS" role="constant">
<term><literal>MILTER_CLIENT_CONTEXT_STATE_FINISHED</literal></term>
<listitem><simpara>終了した。</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="MilterClientContext-struct" role="struct">
<title>MilterClientContext</title>
<indexterm zone="MilterClientContext-struct"><primary>MilterClientContext</primary></indexterm>
<programlisting>typedef struct _MilterClientContext MilterClientContext;</programlisting>
<para>
</para></refsect2>
<refsect2 id="milter-client-context-error-quark" role="function">
<title>milter_client_context_error_quark ()</title>
<indexterm zone="milter-client-context-error-quark"><primary>milter_client_context_error_quark</primary></indexterm>
<programlisting><link linkend="GQuark"><returnvalue>GQuark</returnvalue></link>              milter_client_context_error_quark   (void);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-new" role="function">
<title>milter_client_context_new ()</title>
<indexterm zone="milter-client-context-new"><primary>milter_client_context_new</primary></indexterm>
<programlisting><link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> * milter_client_context_new         (void);</programlisting>
<para>新しいコンテキストオブジェクトの生成。通常は、コンテキストオブジェクトは<link linkend="MilterClient"><literal>MilterClient</literal></link>が生成し、<link linkend="MilterClient-connection-established"><type>"connection-established"</type></link>シグナルで渡されます。</para>
<variablelist role="params">
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>新しい<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>オブジェクト。</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-feed" role="function">
<title>milter_client_context_feed ()</title>
<indexterm zone="milter-client-context-feed"><primary>milter_client_context_feed</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_feed          (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *chunk,
                                                         <link linkend="gsize"><returnvalue>gsize</returnvalue></link> size,
                                                         <link linkend="GError"><returnvalue>GError</returnvalue></link> **error);</programlisting>
<para><parameter>context</parameter>に入力を与えます。テストやデバッグに使えます。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>chunk</parameter> :</term>
<listitem><simpara><parameter>context</parameter>への入力。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter> :</term>
<listitem><simpara><parameter>chunk</parameter>のサイズ。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter> :</term>
<listitem><simpara> return location for an error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-get-private-data" role="function">
<title>milter_client_context_get_private_data ()</title>
<indexterm zone="milter-client-context-get-private-data"><primary>milter_client_context_get_private_data</primary></indexterm>
<programlisting><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>            milter_client_context_get_private_data
                                                        (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);</programlisting>
<para><parameter>context</parameter>のプライベートなデータ。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> the private data set by
<link linkend="milter-client-context-set-private-data"><function>milter_client_context_set_private_data()</function></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-set-private-data" role="function">
<title>milter_client_context_set_private_data ()</title>
<indexterm zone="milter-client-context-set-private-data"><primary>milter_client_context_set_private_data</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                milter_client_context_set_private_data
                                                        (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="gpointer"><returnvalue>gpointer</returnvalue></link> data,
                                                         <link linkend="GDestroyNotify"><returnvalue>GDestroyNotify</returnvalue></link> destroy);</programlisting>
<para><parameter>context</parameter>のプライベートなデータを設定します。<parameter>data</parameter>は<parameter>destroy</parameter>で破棄されます。<parameter>data</parameter>が破棄されるのは、新しいプライベートなデータが設定されたときか、<parameter>context</parameter>が破棄されたときです。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter> :</term>
<listitem><simpara>プライベートなデータ。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destroy</parameter> :</term>
<listitem><simpara> the destroy function for <parameter>data</parameter> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-set-reply" role="function">
<title>milter_client_context_set_reply ()</title>
<indexterm zone="milter-client-context-set-reply"><primary>milter_client_context_set_reply</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_set_reply     (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="guint"><returnvalue>guint</returnvalue></link> code,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *extended_code,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *message,
                                                         <link linkend="GError"><returnvalue>GError</returnvalue></link> **error);</programlisting>
<para>
Sets the error reply code. 4xx <parameter>code</parameter> is used on
<link linkend="MILTER-REPLY-TEMPORARY-FAILURE:CAPS"><literal>MILTER_REPLY_TEMPORARY_FAILURE</literal></link>. 5xx <parameter>code</parameter> is used on
<link linkend="MILTER-REPLY-REJECT:CAPS"><literal>MILTER_REPLY_REJECT</literal></link>.
</para>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_setreply"> smfi_setreply</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>code</parameter> :</term>
<listitem><simpara>3桁のSMTPエラー応答コード。（RFC 2821）4xxと5xxだけが使えます。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extended_code</parameter> :</term>
<listitem><simpara> the extended reply code (RFC 1893/2034),
                or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>message</parameter> :</term>
<listitem><simpara> the text part of the SMTP reply, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter> :</term>
<listitem><simpara> return location for an error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-format-reply" role="function">
<title>milter_client_context_format_reply ()</title>
<indexterm zone="milter-client-context-format-reply"><primary>milter_client_context_format_reply</primary></indexterm>
<programlisting><link linkend="gchar"><returnvalue>gchar</returnvalue></link> *             milter_client_context_format_reply  (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);</programlisting>
<para>
Formats the current error reply code specified by
<link linkend="milter-client-context-set-reply"><function>milter_client_context_set_reply()</function></link>. If error reply code
isn't set, this function returns <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> formatted reply code, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-add-header" role="function">
<title>milter_client_context_add_header ()</title>
<indexterm zone="milter-client-context-add-header"><primary>milter_client_context_add_header</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_add_header    (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *name,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *value,
                                                         <link linkend="GError"><returnvalue>GError</returnvalue></link> **error);</programlisting>
<para>現在のメッセージのヘッダリストにヘッダを追加します。この関数は<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>シグナルの中で呼ぶことができます。</para>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_addheader"> smfi_addheader</ulink>も見てください。</para>
<para>
FIXME: write about <link linkend="MILTER-ACTION-ADD-HEADERS:CAPS"><literal>MILTER_ACTION_ADD_HEADERS</literal></link>.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara>ヘッダ名。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter> :</term>
<listitem><simpara>ヘッダ値。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter> :</term>
<listitem><simpara> return location for an error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-insert-header" role="function">
<title>milter_client_context_insert_header ()</title>
<indexterm zone="milter-client-context-insert-header"><primary>milter_client_context_insert_header</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_insert_header (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="guint32"><returnvalue>guint32</returnvalue></link> index,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *name,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *value,
                                                         <link linkend="GError"><returnvalue>GError</returnvalue></link> **error);</programlisting>
<para>現在のメッセージのヘッダリストの<parameter>index</parameter>にヘッダを追加します。<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>シグナルの中で呼ぶことができます。milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_insheader"> smfi_insheader</ulink>も見てください。</para>
<para>FIXME: MILTER_ACTION_ADD_HEADERSについて書くこと。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter> :</term>
<listitem><simpara>挿入する位置。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara>ヘッダ名。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter> :</term>
<listitem><simpara>ヘッダ値。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter> :</term>
<listitem><simpara> return location for an error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-change-header" role="function">
<title>milter_client_context_change_header ()</title>
<indexterm zone="milter-client-context-change-header"><primary>milter_client_context_change_header</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_change_header (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *name,
                                                         <link linkend="guint32"><returnvalue>guint32</returnvalue></link> index,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *value);</programlisting>
<para>
Changes a header that is located at <parameter>index</parameter> in headers
that all of them are named <parameter>name</parameter>. If <parameter>value</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, the
header is deleted. This function can be
called in <link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link> signal.
</para>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_chgheader"> smfi_chgheader</ulink>も見てください。</para>
<para>FIXME: MILTER_ACTION_CHANGE_HEADERSについて書くこと。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara>ヘッダ名。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter> :</term>
<listitem><simpara>名前が<parameter>name</parameter>のヘッダの位置。（1ベース）FIXME: 0ベースに変更する？</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter> :</term>
<listitem><simpara> the header value. Use <link linkend="NULL:CAPS"><literal>NULL</literal></link> to delete the target
        header.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-delete-header" role="function">
<title>milter_client_context_delete_header ()</title>
<indexterm zone="milter-client-context-delete-header"><primary>milter_client_context_delete_header</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_delete_header (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *name,
                                                         <link linkend="guint32"><returnvalue>guint32</returnvalue></link> index);</programlisting>
<para>
Deletes a header that is located at <parameter>index</parameter> in headers
that all of them are named <parameter>name</parameter>. This function can be
called in <link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link> signal.
This function works same as
<link linkend="milter-client-context-change-header"><function>milter_client_context_change_header()</function></link> with <link linkend="NULL:CAPS"><literal>NULL</literal></link> as
<parameter>value</parameter>.
</para>
<para>FIXME: MILTER_ACTION_CHANGE_HEADERSについて書くこと。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara>ヘッダ名。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter> :</term>
<listitem><simpara>名前が<parameter>name</parameter>のヘッダの位置。（1ベース）FIXME: 0ベースに変更する？</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-change-from" role="function">
<title>milter_client_context_change_from ()</title>
<indexterm zone="milter-client-context-change-from"><primary>milter_client_context_change_from</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_change_from   (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *from,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *parameters);</programlisting>
<para>
Changes the envelope from address of the current message.
ESMTP's 'MAIL FROM' parameter can be set by
<parameter>parameters</parameter>. <parameter>parameters</parameter> may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. This function can be
called in <link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link> signal.
See also <ulink url="https://www.milter.org/developers/api/smfi_chgfrom">smfi_chgfrom
</ulink> on milter.org.
</para>
<para>FIXME: MILTER_ACTION_CHANGE_FROMについて書くこと。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>from</parameter> :</term>
<listitem><simpara>新しい送信アドレス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parameters</parameter> :</term>
<listitem><simpara> the ESMTP's 'MAIL FROM' parameter. It can be
<link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-add-recipient" role="function">
<title>milter_client_context_add_recipient ()</title>
<indexterm zone="milter-client-context-add-recipient"><primary>milter_client_context_add_recipient</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_add_recipient (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *recipient,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *parameters);</programlisting>
<para>
Adds a new envelope recipient address to the current
message.  ESMTP's 'RCPT TO' parameter can be set by
<parameter>parameters</parameter>. <parameter>parameters</parameter> may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. This function can
be called in <link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>
signal. See also <ulink url="https://www.milter.org/developers/api/smfi_addrcpt">smfi_addrcpt
</ulink> and <ulink url="https://www.milter.org/developers/api/smfi_addrcpt_par">smfi_addrcpt_par
</ulink> on milter.org.
</para>
<para>FIXME: MILTER_ACTION_ADD_RECIPIENTとMILTER_ACTION_ADD_ENVELOPE_RECIPIENT_WITH_PARAMETERSについて書くこと。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>recipient</parameter> :</term>
<listitem><simpara>新しい宛先アドレス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parameters</parameter> :</term>
<listitem><simpara> the ESMTP's 'RCPT TO' parameter. It can be
<link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-delete-recipient" role="function">
<title>milter_client_context_delete_recipient ()</title>
<indexterm zone="milter-client-context-delete-recipient"><primary>milter_client_context_delete_recipient</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_delete_recipient
                                                        (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *recipient);</programlisting>
<para>名前が<parameter>recipient</parameter>の宛先を削除します。<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>シグナルの中で呼ぶことができます。milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_delrcpt">smfi_delrcpt </ulink>も見てください。</para>
<para>FIXME: MILTER_ACTION_DELETE_RECIPIENTについて書くこと。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>recipient</parameter> :</term>
<listitem><simpara>削除する宛先アドレス。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-replace-body" role="function">
<title>milter_client_context_replace_body ()</title>
<indexterm zone="milter-client-context-replace-body"><primary>milter_client_context_replace_body</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_replace_body  (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *body,
                                                         <link linkend="gsize"><returnvalue>gsize</returnvalue></link> body_size);</programlisting>
<para>現在のメッセージの本文を<parameter>body</parameter>で置き換えます。<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>シグナルの中で呼ぶことができます。milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_replacebody">smfi_replacebody </ulink>も見てください。</para>
<para>FIXME: MILTER_ACTION_CHANGE_BODYについて書くこと。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>body</parameter> :</term>
<listitem><simpara>新しい本文。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>body_size</parameter> :</term>
<listitem><simpara><parameter>body</parameter>のサイズ。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-progress" role="function">
<title>milter_client_context_progress ()</title>
<indexterm zone="milter-client-context-progress"><primary>milter_client_context_progress</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_progress      (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);</programlisting>
<para>このmilterはまだ処理中であることをMTAに通知します。<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>シグナルの中で呼ぶことができます。milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_progress">smfi_progress </ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-quarantine" role="function">
<title>milter_client_context_quarantine ()</title>
<indexterm zone="milter-client-context-quarantine"><primary>milter_client_context_quarantine</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            milter_client_context_quarantine    (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *reason);</programlisting>
<para>現在のメッセージを理由<parameter>reason</parameter>で隔離します。<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>シグナルの中で呼ぶことができます。milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_quarantine">smfi_quarantine </ulink>も見てください。</para>
<para>FIXME: MILTER_ACTION_QUARANTINEについて書くこと。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>reason</parameter> :</term>
<listitem><simpara>どうして現在のメッセージが隔離されるかの理由。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-set-timeout" role="function">
<title>milter_client_context_set_timeout ()</title>
<indexterm zone="milter-client-context-set-timeout"><primary>milter_client_context_set_timeout</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                milter_client_context_set_timeout   (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="guint"><returnvalue>guint</returnvalue></link> timeout);</programlisting>
<para>秒単位でタイムアウトを設定します。MTAが<parameter>timeout</parameter>秒以内に応答しない場合は、<link linkend="MilterClientContext-timeout"><type>"timeout"</type></link>シグナルが発行されます。milter.orgの<ulink url="https://www.milter.org/developers/api/smfi_settimeout">smfi_settimeout </ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timeout</parameter> :</term>
<listitem><simpara>秒単位のタイムアウト。（既定値は7210秒）</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-get-timeout" role="function">
<title>milter_client_context_get_timeout ()</title>
<indexterm zone="milter-client-context-get-timeout"><primary>milter_client_context_get_timeout</primary></indexterm>
<programlisting><link linkend="guint"><returnvalue>guint</returnvalue></link>               milter_client_context_get_timeout   (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);</programlisting>
<para>秒単位でタイムアウトを取得します。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>秒単位でのタイムアウト。</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-set-state" role="function">
<title>milter_client_context_set_state ()</title>
<indexterm zone="milter-client-context-set-state"><primary>milter_client_context_set_state</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                milter_client_context_set_state     (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="MilterClientContextState"><returnvalue>MilterClientContextState</returnvalue></link> state);</programlisting>
<para>現在の状態を設定します。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>state</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContextState"><literal>MilterClientContextState</literal></link>。</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-get-state" role="function">
<title>milter_client_context_get_state ()</title>
<indexterm zone="milter-client-context-get-state"><primary>milter_client_context_get_state</primary></indexterm>
<programlisting><link linkend="MilterClientContextState"><returnvalue>MilterClientContextState</returnvalue></link>  milter_client_context_get_state
                                                        (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);</programlisting>
<para>現在の状態を取得します。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>現在の状態。</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-set-option" role="function">
<title>milter_client_context_set_option ()</title>
<indexterm zone="milter-client-context-set-option"><primary>milter_client_context_set_option</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                milter_client_context_set_option    (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context,
                                                         <link linkend="MilterOption"><returnvalue>MilterOption</returnvalue></link> *option);</programlisting>
<para>現在のコンテキストのオプションを取得します。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>option</parameter> :</term>
<listitem><simpara><link linkend="MilterOption"><literal>MilterOption</literal></link>。</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="milter-client-context-get-option" role="function">
<title>milter_client_context_get_option ()</title>
<indexterm zone="milter-client-context-get-option"><primary>milter_client_context_get_option</primary></indexterm>
<programlisting><link linkend="MilterOption"><returnvalue>MilterOption</returnvalue></link> *      milter_client_context_get_option    (<link linkend="MilterClientContext"><returnvalue>MilterClientContext</returnvalue></link> *context);</programlisting>
<para>コンテキストのオプションを取得します。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara><link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>。</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>コンテキストのオプション。</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="MilterClientContext.property-details" role="property_details">
<title role="property_details.title">プロパティ詳細</title>
<refsect2 id="MilterClientContext--option" role="property"><title>The <literal>"option"</literal> property</title>
<indexterm zone="MilterClientContext--option"><primary>MilterClientContext:option</primary></indexterm>
<programlisting>  "option"                   <link linkend="MilterOption"><type>MilterOption</type></link>*         : Read / Write</programlisting>
<para>The option of client context.</para></refsect2>
<refsect2 id="MilterClientContext--state" role="property"><title><literal>"state"</literal>プロパティ</title>
<indexterm zone="MilterClientContext--state"><primary>MilterClientContext:state</primary></indexterm>
<programlisting>  "state"                    <link linkend="MilterClientContextState"><type>MilterClientContextState</type></link>  : Read / Write</programlisting>
<para>The state of client context.</para><para>Default value: MILTER_CLIENT_CONTEXT_STATE_INVALID</para>
</refsect2>
</refsect1>
<refsect1 id="MilterClientContext.signal-details" role="signals">
<title role="signals.title">シグナル詳細</title>
<refsect2 id="MilterClientContext-abort" role="signal"><title><literal>"abort"</literal>シグナル</title>
<indexterm zone="MilterClientContext-abort"><primary>MilterClientContext::abort</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link>     *context,
                                                        <link linkend="MilterClientContextState"><type>MilterClientContextState</type></link> Returns,
                                                        <link linkend="gpointer"><type>gpointer</type></link>                 user_data)      : Run Last</programlisting>
<para>
This signal may be emitted at any time between
<link linkend="MilterClientContext-envelope-from"><type>"envelope-from"</type></link> and
<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>. This signal is
only emitted if the milter causes an internal error
and the message processing isn't completed. For
example, if the milter has already returned
<link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link>, <link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link>,
<link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link> and
<link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link>, this signal will
not emitted.
</para>
<para>milterが<link linkend="MilterClientContext-envelope-from"><type>"envelope-from"</type></link>から<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>の間にメッセージのために割り当てたリソースがある場合は、このシグナルの中で開放してください。しかし、接続用に割り当てたリソースは開放しないでください。そのリソースは<link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link>シグナルの中で開放してください。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在のメッセージに対する処理を続けます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link></term>
  <listitem>
  <para>現在のメッセージを受け入れて、だまって破棄します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>これ以上処理を続けずに、現在のメッセージを受け入れます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在のメッセージを一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxステータスコードになります。）</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>このステータスを返すのは、<link linkend="MilterClientContext-end-of-message-response"><type>"end-of-message-response"</type></link>シグナルを自分で発行するということです。そのときは、上記のどれかの<link linkend="MilterStatus"><literal>MilterStatus</literal></link>を一緒に渡してください。</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_abort"> xxfi_abort</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-abort-response" role="signal"><title><literal>"abort-response"</literal>シグナル</title>
<indexterm zone="MilterClientContext-abort-response"><primary>MilterClientContext::abort-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-abort"><type>"abort"</type></link> returns a status except
<link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-abort"><type>"abort"</type></link>, you need to emit this
signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-body" role="signal"><title><literal>"body"</literal>シグナル</title>
<indexterm zone="MilterClientContext-body"><primary>MilterClientContext::body</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gchar"><type>gchar</type></link>               *chunk,
                                                        <link linkend="guint"><type>guint</type></link>                size,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>このシグナルは本文のデータを受け取ったときに呼ばれます。このシグナルは<link linkend="MilterClientContext-end-of-header"><type>"end-of-header"</type></link>から<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>の間に0回以上発行されます。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在のメッセージに対する処理を続けます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在のメッセージを拒否します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link></term>
  <listitem>
  <para>現在のメッセージを受け入れて、だまって破棄します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>これ以上処理を続けずに、現在のメッセージを受け入れます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在のメッセージを一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxステータスコードになります。）</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-SKIP:CAPS"><literal>MILTER_STATUS_SKIP</literal></link></term>
  <listitem>
  <para>これ以上の本文の処理を省略します。<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>が発行されます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-BODY:CAPS"><literal>MILTER_STEP_NO_REPLY_BODY</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>このステータスを返すのは、<link linkend="MilterClientContext-body-response"><type>"body-response"</type></link>シグナルを自分で発行するということです。そのときは、上記のどれかの<link linkend="MilterStatus"><literal>MilterStatus</literal></link>を一緒に渡してください。</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_body"> xxfi_body</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>chunk</parameter> :</term>
<listitem><simpara>本文の1かたまり。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter> :</term>
<listitem><simpara><parameter>chunk</parameter>のサイズ。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-body-response" role="signal"><title><literal>"body-response"</literal>シグナル</title>
<indexterm zone="MilterClientContext-body-response"><primary>MilterClientContext::body-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-body"><type>"body"</type></link> returns a status except
<link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-body"><type>"body"</type></link>, you need to emit this
signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-connect" role="signal"><title><literal>"connect"</literal>シグナル</title>
<indexterm zone="MilterClientContext-connect"><primary>MilterClientContext::connect</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gchar"><type>gchar</type></link>               *host_name,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             address,
                                                        <link linkend="guint"><type>guint</type></link>                address_size,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)         : Run Last</programlisting>
<para>
This signal is emitted on SMTP client is connected to
MTA.
</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在の接続に対する処理を続行します。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在の接続を拒否します。</para>
  <para><link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link>が発行されるでしょう。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>これ以上処理を続けずに、現在の接続を受け入れます。</para>
  <para><link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link>が発行されるでしょう。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在の接続を一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxのステータスコードになります。）</para>
  <para><link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link>が発行されるでしょう。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-CONNECT:CAPS"><literal>MILTER_STEP_NO_REPLY_CONNECT</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>
  If you returns this status, you need to emit <link linkend="MilterClientContext-connect-response"><type>"connect-response"</type></link> signal by yourself with one of the above <link linkend="MilterStatus"><literal>MilterStatus</literal></link>es.
</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_connect">xxfi_connect</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>host_name</parameter> :</term>
<listitem><simpara>接続してきたSMTPクライアントのホスト名。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>address</parameter> :</term>
<listitem><simpara>接続してきたSMTPクライアントのアドレス。（struct sockaddr）</simpara></listitem></varlistentry>
<varlistentry><term><parameter>address_size</parameter> :</term>
<listitem><simpara><parameter>address</parameter>のサイズ。（socklen_t）</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-connect-response" role="signal"><title>The <literal>"connect-response"</literal> signal</title>
<indexterm zone="MilterClientContext-connect-response"><primary>MilterClientContext::connect-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-connect"><type>"connect"</type></link> returns a status except
<link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-connect"><type>"connect"</type></link>, you need to emit this
signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-data" role="signal"><title>The <literal>"data"</literal> signal</title>
<indexterm zone="MilterClientContext-data"><primary>MilterClientContext::data</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>このシグナルはSMTPの"DATA"コマンドのときに発行されます。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在のメッセージに対する処理を続けます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在のメッセージを拒否します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link></term>
  <listitem>
  <para>現在のメッセージを受け入れて、だまって破棄します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>現在の宛先を受け入れます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在のメッセージを一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxステータスコードになります。）</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-DATA:CAPS"><literal>MILTER_STEP_NO_REPLY_DATA</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>
  If you returns this status, you need to emit <link linkend="MilterClientContext-data-response"><type>"data-response"</type></link> signal by yourself with one of the above <link linkend="MilterStatus"><literal>MilterStatus</literal></link>es.
</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_data"> xxfi_data</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-data-response" role="signal"><title>The <literal>"data-response"</literal> signal</title>
<indexterm zone="MilterClientContext-data-response"><primary>MilterClientContext::data-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-data"><type>"data"</type></link> returns a status except
<link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-data"><type>"data"</type></link>, you need to emit this
signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-define-macro" role="signal"><title>The <literal>"define-macro"</literal> signal</title>
<indexterm zone="MilterClientContext-define-macro"><primary>MilterClientContext::define-macro</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterCommand"><type>MilterCommand</type></link>        command,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             macros,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted when macro definition is
received. Normally, this signal isn't needed to be
connected.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>command</parameter> :</term>
<listitem><simpara>マクロが定義されるコマンド。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>macros</parameter> :</term>
<listitem><simpara>マクロ定義。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-end-of-header" role="signal"><title><literal>"end-of-header"</literal>シグナル</title>
<indexterm zone="MilterClientContext-end-of-header"><primary>MilterClientContext::end-of-header</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>このシグナルはすべてのヘッダが処理されたときに呼ばれます。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在のメッセージに対する処理を続けます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在のメッセージを拒否します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link></term>
  <listitem>
  <para>現在のメッセージを受け入れて、だまって破棄します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>これ以上処理を続けずに、現在のメッセージを受け入れます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在のメッセージを一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxステータスコードになります。）</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-END-OF-HEADER:CAPS"><literal>MILTER_STEP_NO_REPLY_END_OF_HEADER</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>このステータスを返すのは、<link linkend="MilterClientContext-end-of-header-response"><type>"end-of-header-response"</type></link>シグナルを自分で発行するということです。そのときは、上記のどれかの<link linkend="MilterStatus"><literal>MilterStatus</literal></link>を一緒に渡してください。</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_eof"> xxfi_eof</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-end-of-header-response" role="signal"><title>The <literal>"end-of-header-response"</literal> signal</title>
<indexterm zone="MilterClientContext-end-of-header-response"><primary>MilterClientContext::end-of-header-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-end-of-header"><type>"end-of-header"</type></link> returns a status
except <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-end-of-header"><type>"end-of-header"</type></link>, you need to emit
this signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-end-of-message" role="signal"><title>The <literal>"end-of-message"</literal> signal</title>
<indexterm zone="MilterClientContext-end-of-message"><primary>MilterClientContext::end-of-message</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gchar"><type>gchar</type></link>               *Returns,
                                                        <link linkend="guint64"><type>guint64</type></link>              arg2,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>このシグナルはすべての<link linkend="MilterClientContext-body"><type>"body"</type></link>が発行された後に発行されます。すべてのメッセージ変更はこのシグナルの中出だけ実行できます。変更は<link linkend="milter-client-context-add-header"><function>milter_client_context_add_header()</function></link>、<link linkend="milter-client-context-change-from"><function>milter_client_context_change_from()</function></link>などで行えます。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在のメッセージに対する処理を続けます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link></term>
  <listitem>
  <para>現在のメッセージを受け入れて、だまって破棄します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>これ以上処理を続けずに、現在のメッセージを受け入れます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在のメッセージを一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxステータスコードになります。）</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>このステータスを返すのは、<link linkend="MilterClientContext-end-of-message-response"><type>"end-of-message-response"</type></link>シグナルを自分で発行するということです。そのときは、上記のどれかの<link linkend="MilterStatus"><literal>MilterStatus</literal></link>を一緒に渡してください。</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_eom"> xxfi_eom</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-end-of-message-response" role="signal"><title><literal>"end-of-message-response"</literal>シグナル</title>
<indexterm zone="MilterClientContext-end-of-message-response"><primary>MilterClientContext::end-of-message-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link> returns a status
except <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-end-of-message"><type>"end-of-message"</type></link>, you need to
emit this signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-envelope-from" role="signal"><title><literal>"envelope-from"</literal>シグナル</title>
<indexterm zone="MilterClientContext-envelope-from"><primary>MilterClientContext::envelope-from</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gchar"><type>gchar</type></link>               *from,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>このシグナルはSMTPの"MAIL FROM"コマンドのときに呼ばれます。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在のメッセージに対する処理を続けます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在の差出人とメッセージを拒否します。新しい差出人が指定されるかもしれません。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link></term>
  <listitem>
  <para>現在のメッセージを受け入れて、だまって破棄します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>これ以上処理を続けずに、現在のメッセージを受け入れます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在の差出人とメッセージを一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxのステータスコードになります。）新しい差出人が指定されるかもしれません。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-ENVELOPE-FROM:CAPS"><literal>MILTER_STEP_NO_REPLY_ENVELOPE_FROM</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>
  If you returns this status, you need to emit <link linkend="MilterClientContext-envelope-from-response"><type>"envelope-from-response"</type></link> signal by yourself with one of the above <link linkend="MilterStatus"><literal>MilterStatus</literal></link>es.
</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_envfrom"> xxfi_envfrom</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>from</parameter> :</term>
<listitem><simpara>SMTPの"MAIL FROM"コマンドの送信アドレス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-envelope-from-response" role="signal"><title><literal>"envelope-from-response"</literal>シグナル</title>
<indexterm zone="MilterClientContext-envelope-from-response"><primary>MilterClientContext::envelope-from-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-envelope-from"><type>"envelope-from"</type></link> returns a status
except <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-envelope-from"><type>"envelope-from"</type></link>, you need to emit
this signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-envelope-recipient" role="signal"><title><literal>"envelope-recipient"</literal>シグナル</title>
<indexterm zone="MilterClientContext-envelope-recipient"><primary>MilterClientContext::envelope-recipient</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gchar"><type>gchar</type></link>               *recipient,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>このシグナルはSMTPの"RCPT TO"コマンドのときに発行されます。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在のメッセージに対する処理を続けます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在の宛先を拒否します。現在のメッセージの処理は続きます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link></term>
  <listitem>
  <para>現在のメッセージを受け入れて、だまって破棄します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>現在の宛先を受け入れます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在の宛先を一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxのステータスコードになります。）現在のメッセージの処理は継続します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-ENVELOPE-RECIPIENT:CAPS"><literal>MILTER_STEP_NO_REPLY_ENVELOPE_RECIPIENT</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>
  If you returns this status, you need to emit <link linkend="MilterClientContext-envelope-recipient-response"><type>"envelope-recipient-response"</type></link> signal by yourself with one of the above <link linkend="MilterStatus"><literal>MilterStatus</literal></link>es.
</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_envrcpt"> xxfi_envrcpt</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>recipient</parameter> :</term>
<listitem><simpara>SMTPの"RCPT TO"コマンドの宛先アドレス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-envelope-recipient-response" role="signal"><title><literal>"envelope-recipient-response"</literal>シグナル</title>
<indexterm zone="MilterClientContext-envelope-recipient-response"><primary>MilterClientContext::envelope-recipient-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-envelope-recipient"><type>"envelope-recipient"</type></link> returns a
status except <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's
default handler replies a response to MTA. You don't
need to connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-envelope-recipient"><type>"envelope-recipient"</type></link>, you need to
emit this signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-header" role="signal"><title><literal>"header"</literal>シグナル。</title>
<indexterm zone="MilterClientContext-header"><primary>MilterClientContext::header</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gchar"><type>gchar</type></link>               *name,
                                                        <link linkend="gchar"><type>gchar</type></link>               *value,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted on each header. If
<link linkend="MILTER-STEP-HEADER-LEADING-SPACE:CAPS"><literal>MILTER_STEP_HEADER_LEADING_SPACE</literal></link> is set in
<link linkend="MilterClientContext-negotiate"><type>"negotiate"</type></link>, <parameter>value</parameter> have spaces
after header name and value separator ":".
</para>
<para>例:</para>
<para>
<informalexample><programlisting>
From: from &lt;from@example.com&gt;
To: recipient &lt;recipient@example.com&gt;
Subject:a subject
</programlisting></informalexample>
</para>
<para>
With <link linkend="MILTER-STEP-HEADER-VALUE-WITH-LEADING-SPACE:CAPS"><literal>MILTER_STEP_HEADER_VALUE_WITH_LEADING_SPACE</literal></link>:
</para>
<para>
<informalexample><programlisting>
"From", " from &lt;from@example.com&gt;"
"To", " recipient &lt;recipient@example.com&gt;"
"Subject", "a subject"
</programlisting></informalexample>
</para>
<para>
Without <link linkend="MILTER-STEP-HEADER-VALUE-WITH-LEADING-SPACE:CAPS"><literal>MILTER_STEP_HEADER_VALUE_WITH_LEADING_SPACE</literal></link>:
</para>
<para>
<informalexample><programlisting>
"From", "from &lt;from@example.com&gt;"
"To", "recipient &lt;recipient@example.com&gt;"
"Subject", "a subject"
</programlisting></informalexample>
</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在のメッセージに対する処理を続けます。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在のメッセージを拒否します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-DISCARD:CAPS"><literal>MILTER_STATUS_DISCARD</literal></link></term>
  <listitem>
  <para>現在のメッセージを受け入れて、だまって破棄します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>これ以上処理を続けずに、現在のメッセージを受け入れます。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在のメッセージを一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxステータスコードになります。）</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-HEADER:CAPS"><literal>MILTER_STEP_NO_REPLY_HEADER</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>
  If you returns this status, you need to emit <link linkend="MilterClientContext-header-response"><type>"header-response"</type></link> signal by yourself with one of the above <link linkend="MilterStatus"><literal>MilterStatus</literal></link>es.
</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_header"> xxfi_header</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara>ヘッダ名。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter> :</term>
<listitem><simpara>ヘッダ値。<parameter>value</parameter>は折り返し時に挿入された空白を含むかもしれません。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-header-response" role="signal"><title><literal>"header-response"</literal>シグナル。</title>
<indexterm zone="MilterClientContext-header-response"><primary>MilterClientContext::header-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-header"><type>"header"</type></link> returns a status except
<link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-header"><type>"header"</type></link>, you need to emit this
signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-helo" role="signal"><title><literal>"helo"</literal>シグナル</title>
<indexterm zone="MilterClientContext-helo"><primary>MilterClientContext::helo</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gchar"><type>gchar</type></link>               *fqdn,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>このシグナルはSMTPの"HELO"/"EHLO"コマンドのときに発行されます。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para>現在の接続に対する処理を続行します。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在の接続を拒否します。</para>
  <para><link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link>が発行されるでしょう。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-ACCEPT:CAPS"><literal>MILTER_STATUS_ACCEPT</literal></link></term>
  <listitem>
  <para>これ以上処理を続けずに、現在の接続を受け入れます。</para>
  <para><link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link>が発行されるでしょう。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在の接続を一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxのステータスコードになります。）</para>
  <para><link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link>が発行されるでしょう。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-HELO:CAPS"><literal>MILTER_STEP_NO_REPLY_HELO</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>
  If you returns this status, you need to emit <link linkend="MilterClientContext-helo-response"><type>"helo-response"</type></link> signal by yourself with one of the above <link linkend="MilterStatus"><literal>MilterStatus</literal></link>es.
</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_helo"> xxfi_helo</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fqdn</parameter> :</term>
<listitem><simpara>SMTPの"HELO"/"EHLO"コマンドでのFQDN。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-helo-response" role="signal"><title><literal>"helo-response"</literal>シグナル</title>
<indexterm zone="MilterClientContext-helo-response"><primary>MilterClientContext::helo-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-helo"><type>"helo"</type></link> returns a status except
<link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-helo"><type>"helo"</type></link>, you need to emit this
signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-negotiate" role="signal"><title><literal>"negotiate"</literal>シグナル</title>
<indexterm zone="MilterClientContext-negotiate"><primary>MilterClientContext::negotiate</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link>  *context,
                                                        <link linkend="MilterOption"><type>MilterOption</type></link>         *option,
                                                        <link linkend="MilterMacrosRequests"><type>MilterMacrosRequests</type></link> *macros_requests,
                                                        <link linkend="gpointer"><type>gpointer</type></link>              user_data)            : Run Last</programlisting>
<para>
This signal is emitted on negotiate request from MTA.
If you want to modify actions (<link linkend="MilterActionFlags"><literal>MilterActionFlags</literal></link>)
and steps (<link linkend="MilterStepFlags"><literal>MilterStepFlags</literal></link>), you modify <parameter>option</parameter>. If
you want to add macros that you want to receive, you
modify <parameter>macros_requests</parameter>.
</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-ALL-OPTIONS:CAPS"><literal>MILTER_STATUS_ALL_OPTIONS</literal></link></term>
  <listitem>
  <para>すべての利用可能なアクションとステップを有効にします。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在のセッションを拒否します。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-CONTINUE:CAPS"><literal>MILTER_STATUS_CONTINUE</literal></link></term>
  <listitem>
  <para><parameter>option</parameter>と<parameter>macros_requests</parameter>で指定されたアクション、ステップ、要求マクロリストを使って現在のセッションの処理を続けます</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>
  If you returns this status, you need to emit <link linkend="MilterClientContext-negotiate-response"><type>"negotiate-response"</type></link> signal by yourself with one of the above <link linkend="MilterStatus"><literal>MilterStatus</literal></link>es.
</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_negotiate"> xxfi_negotiate</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>option</parameter> :</term>
<listitem><simpara>MTAからのネゴシエーションのオプション。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>macros_requests</parameter> :</term>
<listitem><simpara>要求マクロリスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-negotiate-response" role="signal"><title><literal>"negotiate-response"</literal>シグナル</title>
<indexterm zone="MilterClientContext-negotiate-response"><primary>MilterClientContext::negotiate-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link>  *context,
                                                        <link linkend="MilterOption"><type>MilterOption</type></link>         *option,
                                                        <link linkend="MilterMacrosRequests"><type>MilterMacrosRequests</type></link> *macros_requests,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>          status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>              user_data)            : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-negotiate"><type>"negotiate"</type></link> returns a status
except <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-negotiate"><type>"negotiate"</type></link> handler, you need to
emit this signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>option</parameter> :</term>
<listitem><simpara>MTAからのネゴシエーションのオプション。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>macros_requests</parameter> :</term>
<listitem><simpara>要求マクロリスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-timeout" role="signal"><title>The <literal>"timeout"</literal> signal</title>
<indexterm zone="MilterClientContext-timeout"><primary>MilterClientContext::timeout</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted if MTA doesn't return the next
command within <link linkend="milter-client-context-get-timeout"><function>milter_client_context_get_timeout()</function></link>
seconds. If <link linkend="MilterClientContext-timeout"><type>"timeout"</type></link> is emitted,
the current connection is aborted and
<link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link> are emitted.
<link linkend="MilterClientContext-abort"><type>"abort"</type></link> may be emitted before
<link linkend="MilterFinishedEmittable-finished"><type>"finished"</type></link> if the milter
is processing a message.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-unknown" role="signal"><title>The <literal>"unknown"</literal> signal</title>
<indexterm zone="MilterClientContext-unknown"><primary>MilterClientContext::unknown</primary></indexterm>
<programlisting><link linkend="MilterStatus"><returnvalue>MilterStatus</returnvalue></link>        user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="gchar"><type>gchar</type></link>               *command,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>このシグナルは未知のSMTPコマンドまたは未実装のSMTPコマンドが送られてきた場合に発行されます。</para>
<para>すべての利用可能な応答ステータスは以下の通りです。</para>
<variablelist>
  <varlistentry>
  <term id="xml.&lt;link"><link linkend="MILTER-STATUS-REJECT:CAPS"><literal>MILTER_STATUS_REJECT</literal></link></term>
  <listitem>
  <para>現在のメッセージを拒否します。</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-TEMPORARY-FAILURE:CAPS"><literal>MILTER_STATUS_TEMPORARY_FAILURE</literal></link></term>
  <listitem>
  <para>現在のメッセージを一時的な障害が発生したとして拒否します。（つまり、SMTPでは4xxステータスコードになります。）</para>
  <para><link linkend="MilterClientContext-abort"><type>"abort"</type></link>は発行されません。</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-NO-REPLY:CAPS"><literal>MILTER_STATUS_NO_REPLY</literal></link></term>
  <listitem>
  <para>MTAに返答しません。</para>
  <para>
  The milter must set <link linkend="MILTER-STEP-NO-REPLY-DATA:CAPS"><literal>MILTER_STEP_NO_REPLY_DATA</literal></link> in <link linkend="MilerClientContext-negotiate"><type>"negotiate"</type></link> handler.
</para>
</listitem>
</varlistentry>
  <varlistentry>
  <term><link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link></term>
  <listitem>
  <para>It means that the processing in callback is in progress and returning response status is pending. The main loop for the milter is continued.</para>
  <para>
  If you returns this status, you need to emit <link linkend="MilterClientContext-unknown-response"><type>"unknown-response"</type></link> signal by yourself with one of the above <link linkend="MilterStatus"><literal>MilterStatus</literal></link>es.
</para>
  <para>This status may be used for a milter that has IO wait. (e.g. The milter may need to connect to the its server like clamav-milter) Normally, this status will not be used.</para>
</listitem>
</varlistentry>
</variablelist>
<para>MTAは、未知のSMTPコマンドまたは未実装のSMTPコマンドは常に拒否することに中してください。</para>
<para>milter.orgの<ulink url="https://www.milter.org/developers/api/xxfi_unknown"> xxfi_unknown</ulink>も見てください。</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>command</parameter> :</term>
<listitem><simpara>未知のSMTPコマンド。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>返値</emphasis>&nbsp;:</term><listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="MilterClientContext-unknown-response" role="signal"><title>The <literal>"unknown-response"</literal> signal</title>
<indexterm zone="MilterClientContext-unknown-response"><primary>MilterClientContext::unknown-response</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                user_function                      (<link linkend="MilterClientContext"><type>MilterClientContext</type></link> *context,
                                                        <link linkend="MilterStatus"><type>MilterStatus</type></link>         status,
                                                        <link linkend="gpointer"><type>gpointer</type></link>             user_data)      : Run Last</programlisting>
<para>
This signal is emitted implicitly after
<link linkend="MilterClientContext-unknown"><type>"unknown"</type></link> returns a status except
<link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link>. This signal's default
handler replies a response to MTA. You don't need to
connect this signal.
</para>
<para>
If you returns <link linkend="MILTER-STATUS-PROGRESS:CAPS"><literal>MILTER_STATUS_PROGRESS</literal></link> in
<link linkend="MilterClientContext-unknown"><type>"unknown"</type></link>, you need to emit this
signal to <parameter>context</parameter> by yourself.</para>
<variablelist role="params">
<varlistentry><term><parameter>context</parameter> :</term>
<listitem><simpara>シグナルを受け取るコンテキスト。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter> :</term>
<listitem><simpara>応答ステータス。</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>

</refentry>
