summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/libmilter/docs/xxfi_connect.html
blob: 87d5eeb0b53ca24a8a8a511fce2ddb1b2d4ec5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<HTML>
<HEAD><TITLE>xxfi_connect</TITLE></HEAD>
<BODY>
<!--
$Id: xxfi_connect.html,v 1.19 2007/01/15 22:24:45 ca Exp $
-->
<H1>xxfi_connect</H1>

<TABLE border="0" cellspacing=4 cellpadding=4>
<!---------- Synopsis ----------->
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
<PRE>
#include &lt;libmilter/mfapi.h&gt;
sfsistat (*xxfi_connect)(
        SMFICTX    *ctx, 
        char       *hostname,
        _SOCK_ADDR *hostaddr);
</PRE>
</TD></TR>
<!----------- Description ---------->
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
<TABLE border="1" cellspacing=1 cellpadding=4>
<TR>
<TH valign="top" align=left width=80>Called When</TH>
<TD>Once, at the start of each SMTP connection.</TD>
</TR>
<TR>
<TH valign="top" align=left width=80>Default Behavior</TH>
<TD>Do nothing; return SMFIS_CONTINUE.</TD>
</TR>
</TABLE>
<!--
This callback function is invoked on each connection to the mail 
filter program.
The callback is to be implemented by the Milter application developers.
The name of the callback can be any valid function name.
The function pointer is to be assigned to the
smfiDesc.xxfi_connect and the pointer to the smfiDesc structure
is passed to smfi_register().
</TD></TR>
-->
<!----------- Arguments ---------->
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
    <TABLE border="1" cellspacing=0>
    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
    <TR><TD>ctx</TD>
	<TD>the opaque context structure.
	</TD></TR>
    <TR><TD>hostname</TD>
	<TD>the host name of the message sender, as determined by a
	reverse lookup on the host address.
	If the reverse lookup fails
	or if none of the IP addresses of the resolved host name
	matches the original IP address,
	hostname will contain the message sender's IP
	address enclosed in square brackets (e.g. `[a.b.c.d]').
	If the SMTP connection is made via stdin the value is
	<CODE>localhost</CODE>.
	</TD></TR>
    <TR><TD>hostaddr</TD>
	<TD>the host address,
	as determined by a <CODE>getpeername(2)</CODE> call on the SMTP socket.
	NULL if the type is not supported in the current version or if
	the SMTP connection is made via stdin.
	</TD></TR>
    </TABLE>
</TD></TR>
<!----------- Return values ---------->
<!--
<TR>
<TH valign="top" align=left>SPECIAL RETURN VALUES</TH>
<TD><TABLE border="1" cellspacing=0>
  <TR bgcolor="#dddddd"><TH>Return value</TH><TH>Description</TH></TR>
  <TR valign="top">
     <TD>SMFIS_ACCEPT</TD>
     <TD>Accept all commands and messages from this client without any
         further contact with the filter. </TD>
     </TD>
  </TR>
  <TR valign="top">
     <TD>SMFIS_CONTINUE</TD>
     <TD>Continue normal processing. </TD>
  </TR>
  <TR valign="top">
     <TD>SMFIS_DISCARD</TD>
     <TD>Undefined behaviour; do not use. </TD>
  </TR>
  <TR valign="top">
     <TD>SMFIS_TEMPFAIL</TD>
     <TD>Reject all commands and messages from this client with a
        temporary failure reply code.
	If also used in conjunction with <CODE>smfi_setreply()</CODE>
	to set a reply whose SMTP code is 421,
	the MTA will drop the connection immediately. </TD>
  </TR>
  <TR valign="top">
     <TD>SMFIS_REJECT</TD>
     <TD>Reject all commands and messages from this client with a
         permanent failure reply code. </TD>
  </TR>
</TABLE>
</TR>
-->
<!----------- Notes ---------->
<TR>
<TH valign="top" align=left>NOTES</TH> 
<TD>If an earlier filter rejects the connection in its xxfi_connect()
routine, this filter's xxfi_connect() will not be called.</TD>
</TR>
</TABLE>

<HR size="1">
<FONT size="-1">
Copyright (c) 2000-2001, 2003, 2007 Sendmail, Inc. and its suppliers.
All rights reserved.
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</FONT>
</BODY>
</HTML>
OpenPOWER on IntegriCloud