1<HTML>
2<HEAD><TITLE>xxfi_close</TITLE></HEAD>
3<BODY>
4<!--
5$Id: xxfi_close.html,v 1.14 2013-11-22 20:51:39 ca Exp $
6-->
7<H1>xxfi_close</H1>
8
9<TABLE border="0" cellspacing=4 cellpadding=4>
10<!---------- Synopsis ----------->
11<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
12<PRE>
13#include &lt;libmilter/mfapi.h&gt;
14sfsistat (*xxfi_close)(
15	SMFICTX *ctx
16);
17</PRE>
18The current connection is being closed.
19</TD></TR>
20
21<!----------- Description ---------->
22<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
23<TABLE border="1" cellspacing=1 cellpadding=4>
24<TR align="left" valign=top>
25<TH width="80">Called When</TH>
26<TD>xxfi_close is always called once at the end of each connection.</TD>
27</TR>
28<TR align="left" valign=top>
29<TH>Default Behavior</TH>
30<TD>Do nothing; return SMFIS_CONTINUE.</TD>
31</TR>
32</TABLE>
33</TD></TR>
34
35<!----------- Arguments ---------->
36<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
37    <TABLE border="1" cellspacing=0>
38    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
39    <TR valign="top"><TD>ctx</TD>
40	<TD>Opaque context structure.
41	</TD></TR>
42    </TABLE>
43</TD></TR>
44
45<!----------- Notes ---------->
46<TR>
47<TH valign="top" align=left>NOTES</TH>
48<TD>
49<UL>
50<LI>xxfi_close may be called "out-of-order", i.e. before even the
51xxfi_connect is called.
52After a connection is established by the MTA to the filter,
53if the MTA decides this connection's traffic will be discarded
54(e.g. via an access_db result), no data will be passed to the
55filter from the MTA until the client closes down.
56At that time, xxfi_close is called.
57It can therefore be the only callback ever used for a given connection,
58and developers should anticipate this possibility when crafting their
59xxfi_close code.
60In particular, it is incorrect to assume the private context pointer
61will be something other than NULL in this callback.
62<LI>xxfi_close is called on close even if the previous mail
63transaction was aborted.
64<LI>xxfi_close is responsible for freeing any resources allocated on a
65per-connection basis.
66<LI>Since the connection is already closing, the return value is
67currently ignored.
68</UL>
69</TD>
70</TR>
71</TABLE>
72
73<HR size="1">
74<FONT size="-1">
75Copyright (c) 2000, 2003, 2004 Proofpoint, Inc. and its suppliers.
76All rights reserved.
77<BR>
78By using this file, you agree to the terms and conditions set
79forth in the LICENSE.
80</FONT>
81</BODY>
82</HTML>
83