This file is indexed.

/usr/share/doc/sendmail-doc/libmilter/html/smfi_insheader.html is in sendmail-doc 8.15.2-10.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<HTML>
<HEAD><TITLE>smfi_insheader</TITLE></HEAD>
<BODY>
<!--
$Id: smfi_insheader.html,v 1.11 2013-11-22 20:51:39 ca Exp $
-->
<H1>smfi_insheader</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;
int smfi_insheader(
	SMFICTX *ctx,
	int hdridx,
	char *headerf,
	char *headerv
);
</PRE>
Prepend a header to the current message.
</TD></TR>

<!----------- Description ---------->
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
<TABLE border="1" cellspacing=1 cellpadding=4>
<TR align="left" valign=top>
<TH width="80">Called When</TH>
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
</TR>
<TR align="left" valign=top>
<TH width="80">Effects</TH>
<TD>Prepends a header to the current message.</TD>
</TR>
</TABLE>

<!----------- 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 valign="top"><TD>ctx</TD>
	<TD>Opaque context structure.
	</TD></TR>
    <TR valign="top"><TD>hdridx</TD>
	<TD>The location in the internal header list where this header should
	be inserted; 0 makes it the topmost header, etc.
	</TD></TR>
    <TR valign="top"><TD>headerf</TD>
	<TD>The header name, a non-NULL, null-terminated string.
	</TD></TR>
    <TR valign="top"><TD>headerv</TD>
	<TD>The header value to be added, a non-NULL, null-terminated string.  This may be the empty string.  
	</TD></TR>
    </TABLE>
</TD></TR>

<!----------- Return values ---------->
<TR>
<TH valign="top" align=left>RETURN VALUES</TH> 

<TD>smfi_insheader returns MI_FAILURE if:
<UL><LI>headerf or headerv is NULL.
    <LI>Adding headers in the current connection state is invalid.
    <LI>Memory allocation fails.
    <LI>A network error occurs.
    <LI>SMFIF_ADDHDRS was not set when <A href="smfi_register.html">smfi_register</A> was called.
</UL>
Otherwise, it returns MI_SUCCESS.
</TD>
</TR>

<!----------- Notes ---------->
<TR align="left" valign=top>
<TH>NOTES</TH> 
<TD>
<UL>
    <LI>smfi_insheader does not change a message's existing headers.
	To change a header's current value, use
	<A HREF="smfi_chgheader.html">smfi_chgheader</A>.
    <LI>A filter which calls smfi_insheader must have set the SMFIF_ADDHDRS
	flag in the smfiDesc_str passed to
	<A href="smfi_register.html">smfi_register</A>.
    <LI>For smfi_insheader, filter order is important.
	<B>Later filters will see the header changes made by earlier ones.</B>
    <LI>A filter will receive <EM>only</EM> headers that have been sent
	by the SMTP client and those header modifications by earlier filters.
	It will <EM>not</EM> receive the headers that are inserted by sendmail
	itself.
	This makes the header insertion position highly dependent on
	the headers that exist in the incoming message
	and those that are configured to be added by sendmail.
	For example, sendmail will always add a
	<CODE>Received:</CODE> header to the beginning of the headers.
	Setting <CODE>hdridx</CODE> to 0 will actually insert the header
	before this <CODE>Received:</CODE> header.
	However, later filters can be easily confused as they receive
	the added header, but not the <CODE>Received:</CODE> header,
	thus making it hard to insert a header at a fixed position.
    <LI>If hdridx is a number larger than the number of headers in the message,
	the header will simply be appended.
    <LI>Neither the name nor the value of the header is checked for
	standards compliance.
	However, each line of the header must be under 2048 characters
	and should be under 998 characters.
	If longer headers are needed, make them multi-line.
	To make a multi-line header,
	insert a line feed (ASCII 0x0a, or <TT>\n</TT> in C)
	followed by at least one whitespace character
	such as a space (ASCII 0x20) or tab (ASCII 0x09, or <TT>\t</TT> in C).
	The line feed should NOT be preceded by a carriage return (ASCII 0x0d);
	the MTA will add this automatically.
	<B>It is the filter writer's responsibility to ensure that no standards
	are violated.</B>
    <LI>The MTA adds a leading space to an inserted header value unless
    the flag
<A HREF="xxfi_negotiate.html#SMFIP_HDR_LEADSPC"><CODE>SMFIP_HDR_LEADSPC</CODE></A>
    is set, in which case the milter
    must include any desired leading spaces itself.
</UL>
</TD>
</TR>

<!----------- Example code ---------->
<TR>
<TH valign="top" align=left>EXAMPLE</TH> 

<TD>
 <PRE>
  int ret;
  SMFICTX *ctx;

  ...

  ret = smfi_insheader(ctx, 0, "First", "See me?");
 </PRE>
</TD>
</TR>

</TABLE>

<HR size="1">
<FONT size="-1">
Copyright (c) 2004, 2006, 2009 Proofpoint, 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>