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 <libmilter/mfapi.h> 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 34<!----------- Arguments ----------> 35<TR><TH valign="top" align=left>ARGUMENTS</TH><TD> 36 <TABLE border="1" cellspacing=0> 37 <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR> 38 <TR valign="top"><TD>ctx</TD> 39 <TD>Opaque context structure. 40 </TD></TR> 41 </TABLE> 42</TD></TR> 43 44<!----------- Notes ----------> 45<TR> 46<TH valign="top" align=left>NOTES</TH> 47<TD> 48<UL> 49<LI>xxfi_close may be called "out-of-order", i.e. before even the 50xxfi_connect is called. 51After a connection is established by the MTA to the filter, 52if the MTA decides this connection's traffic will be discarded 53(e.g. via an access_db result), no data will be passed to the 54filter from the MTA until the client closes down. 55At that time, xxfi_close is called. 56It can therefore be the only callback ever used for a given connection, 57and developers should anticipate this possibility when crafting their 58xxfi_close code. 59In particular, it is incorrect to assume the private context pointer 60will be something other than NULL in this callback. 61<LI>xxfi_close is called on close even if the previous mail 62transaction was aborted. 63<LI>xxfi_close is responsible for freeing any resources allocated on a 64per-connection basis. 65<LI>Since the connection is already closing, the return value is 66currently ignored. 67</UL> 68</TD> 69</TR> 70</TABLE> 71 72<HR size="1"> 73<FONT size="-1"> 74Copyright (c) 2000, 2003, 2004 Proofpoint, Inc. and its suppliers. 75All rights reserved. 76<BR> 77By using this file, you agree to the terms and conditions set 78forth in the LICENSE. 79</FONT> 80</BODY> 81</HTML> 82