]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/sendmail/libmilter/docs/smfi_getsymval.html
Merge commit '850ef5ae11d69ea3381bd310f564f025fc8caea3'
[FreeBSD/FreeBSD.git] / contrib / sendmail / libmilter / docs / smfi_getsymval.html
1 <HTML>
2 <HEAD><TITLE>smfi_getsymval</TITLE></HEAD>
3 <BODY>
4 <!--
5 $Id: smfi_getsymval.html,v 1.16 2013-11-22 20:51:39 ca Exp $
6 -->
7 <H1>smfi_getsymval</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;
14 char* smfi_getsymval(
15         SMFICTX *ctx,
16         char *symname
17 );
18 </PRE>
19 Get the value of a sendmail macro.
20 </TD></TR>
21
22 <!----------- Description ---------->
23 <TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
24 <TABLE border="1" cellspacing=1 cellpadding=4>
25 <TR align="left" valign=top>
26 <TH width="80">Called When</TH>
27 <TD>smfi_getsymval may be called from within any of the xxfi_* callbacks.  Which macros are defined will depend on when it is called.</TD>
28 </TR>
29 <TR align="left" valign=top>
30 <TH width="80">Effects</TH>
31 <TD>None.</TD>
32 </TR>
33 </TABLE>
34 </TD></TR>
35
36 <!----------- Arguments ---------->
37 <TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
38     <TABLE border="1" cellspacing=0>
39     <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
40     <TR valign="top"><TD>ctx</TD>
41         <TD>The opaque context structure.
42         </TD></TR>
43     <TR valign="top"><TD>symname</TD>
44         <TD>The name of a sendmail macro.
45         Single letter macros can optionally be enclosed in braces ("{" and "}"),
46         longer macro names must be enclosed in braces, just as in a
47         <TT>sendmail.cf</TT> file.
48         <A href="#notes">See below</A> for default macros.
49         </TD></TR>
50     </TABLE>
51 </TD></TR>
52
53 <!----------- Return values ---------->
54 <TR>
55 <TH valign="top" align=left>RETURN VALUES</TH>
56
57 <TD>smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.</TD>
58 </TR>
59
60 <!----------- Notes ---------->
61 <TR align="left" valign=top>
62 <TH><A name="notes">NOTES</A></TH>
63 <TD>
64 By default, the following macros are valid in the given contexts:
65
66 <TABLE border="1" cellspacing=0>
67 <TR bgcolor="#dddddd"><TH>Sent With</TH><TH>Macros</TH></TR>
68 <TR><TD>xxfi_connect</TD>    <TD>daemon_name, if_name, if_addr, j, _</TD></TR>
69 <TR><TD>xxfi_helo</TD>       <TD>tls_version, cipher, cipher_bits, cert_subject, cert_issuer</TD></TR>
70 <TR><TD>xxfi_envfrom</TD>    <TD>i, auth_type, auth_authen, auth_ssf, auth_author,
71                 mail_mailer, mail_host, mail_addr</TD></TR>
72 <TR><TD>xxfi_envrcpt</TD>    <TD>rcpt_mailer, rcpt_host, rcpt_addr</TD></TR>
73
74 <TR><TD>xxfi_data</TD>   <TD>(none)</TD></TR>
75 <TR><TD>xxfi_eoh</TD>    <TD>(none)</TD></TR>
76 <TR><TD>xxfi_eom</TD>    <TD>msg_id</TD></TR>
77 </TABLE>
78 <P>
79 All macros stay in effect from the point they are received until
80 <UL>
81 <LI>the end of the connection for the first two sets,
82 <LI>just for each recipient for xxfi_envrcpt.
83 <LI>and the end of the message for the rest.
84 </UL>
85 <P>
86 The macro list can be changed using
87 the confMILTER_MACROS_* options in sendmail.mc
88 or via the
89 <A HREF="smfi_setsymlist.html">smfi_setsymlist</A>
90 function.
91 The scopes of such macros will be determined by when they are set by sendmail.
92 For descriptions of macros' values,
93 please see the
94 "Sendmail Installation and Operation Guide"
95 provided with your sendmail distribution.
96
97 </TD>
98 </TR>
99
100 </TABLE>
101
102 <HR size="1">
103 <FONT size="-1">
104 Copyright (c) 2000, 2002-2003, 2007 Proofpoint, Inc. and its suppliers.
105 All rights reserved.
106 <BR>
107 By using this file, you agree to the terms and conditions set
108 forth in the LICENSE.
109 </FONT>
110 </BODY>
111 </HTML>