comparison xml/en/docs/mail/ngx_mail_core_module.xml @ 1488:0a1c5a087556

Documented bind/ipv6only/ssl/so_keepalive in mail listen directive.
author Yaroslav Zhuravlev <yar@nginx.com>
date Mon, 25 May 2015 13:22:48 +0300
parents 42f288fc9ad3
children 9f9b8543b946
comparison
equal deleted inserted replaced
1487:269e8de8765a 1488:0a1c5a087556
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9 9
10 <module name="Module ngx_mail_core_module" 10 <module name="Module ngx_mail_core_module"
11 link="/en/docs/mail/ngx_mail_core_module.html" 11 link="/en/docs/mail/ngx_mail_core_module.html"
12 lang="en" 12 lang="en"
13 rev="4"> 13 rev="5">
14 14
15 <section id="summary"> 15 <section id="summary">
16 16
17 <para> 17 <para>
18 This module is not built by default, it should be 18 This module is not built by default, it should be
71 <section id="directives" name="Directives"> 71 <section id="directives" name="Directives">
72 72
73 <directive name="listen"> 73 <directive name="listen">
74 <syntax> 74 <syntax>
75 <value>address</value>:<value>port</value> 75 <value>address</value>:<value>port</value>
76 [<literal>bind</literal>]</syntax> 76 [<literal>ssl</literal>]
77 [<literal>bind</literal>]
78 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>]
79 [<literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]]</syntax>
77 <default/> 80 <default/>
78 <context>server</context> 81 <context>server</context>
79 82
80 <para> 83 <para>
81 Sets the <value>address</value> and <value>port</value> for the socket 84 Sets the <value>address</value> and <value>port</value> for the socket
100 </example> 103 </example>
101 104
102 </para> 105 </para>
103 106
104 <para> 107 <para>
105 The optional <literal>bind</literal> parameter 108 The <literal>ssl</literal> parameter allows specifying that all
106 instructs to make a separate <c-func>bind</c-func> 109 connections accepted on this port should work in SSL mode.
110 </para>
111
112 <para>
113 The <literal>listen</literal> directive
114 can have several additional parameters specific to socket-related system calls.
115 <list type="tag">
116
117 <tag-name>
118 <literal>bind</literal>
119 </tag-name>
120 <tag-desc>
121 this parameter instructs to make a separate <c-func>bind</c-func>
107 call for a given address:port pair. 122 call for a given address:port pair.
108 The fact is that if there are several <literal>listen</literal> directives with 123 The fact is that if there are several <literal>listen</literal> directives with
109 the same port but different addresses, and one of the 124 the same port but different addresses, and one of the
110 <literal>listen</literal> directives listens on all addresses 125 <literal>listen</literal> directives listens on all addresses
111 for the given port (<literal>*:</literal><value>port</value>), nginx will 126 for the given port (<literal>*:</literal><value>port</value>), nginx will
112 <c-func>bind</c-func> only to <literal>*:</literal><value>port</value>. 127 <c-func>bind</c-func> only to <literal>*:</literal><value>port</value>.
113 It should be noted that the <c-func>getsockname</c-func> system call will be 128 It should be noted that the <c-func>getsockname</c-func> system call will be
114 made in this case to determine the address that accepted the connection. 129 made in this case to determine the address that accepted the connection.
130 If the <literal>ipv6only</literal>
131 or <literal>so_keepalive</literal> parameters
132 are used then for a given
133 <value>address</value>:<value>port</value> pair
134 a separate <c-func>bind</c-func> call will always be made.
135 </tag-desc>
136
137 <tag-name>
138 <literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>
139 </tag-name>
140 <tag-desc>
141 this parameter determines
142 (via the <c-def>IPV6_V6ONLY</c-def> socket option)
143 whether an IPv6 socket listening on a wildcard address <literal>[::]</literal>
144 will accept only IPv6 connections or both IPv6 and IPv4 connections.
145 This parameter is turned on by default.
146 It can only be set once on start.
147 </tag-desc>
148
149 <tag-name>
150 <literal>so_keepalive</literal>=<literal>on</literal>|<literal>off</literal>|[<value>keepidle</value>]:[<value>keepintvl</value>]:[<value>keepcnt</value>]
151 </tag-name>
152 <tag-desc>
153 this parameter configures the “TCP keepalive” behavior
154 for the listening socket.
155 If this parameter is omitted then the operating system’s settings will be
156 in effect for the socket.
157 If it is set to the value “<literal>on</literal>”, the
158 <c-def>SO_KEEPALIVE</c-def> option is turned on for the socket.
159 If it is set to the value “<literal>off</literal>”, the
160 <c-def>SO_KEEPALIVE</c-def> option is turned off for the socket.
161 Some operating systems support setting of TCP keepalive parameters on
162 a per-socket basis using the <c-def>TCP_KEEPIDLE</c-def>,
163 <c-def>TCP_KEEPINTVL</c-def>, and <c-def>TCP_KEEPCNT</c-def> socket options.
164 On such systems (currently, Linux 2.4+, NetBSD 5+, and
165 FreeBSD 9.0-STABLE), they can be configured
166 using the <value>keepidle</value>, <value>keepintvl</value>, and
167 <value>keepcnt</value> parameters.
168 One or two parameters may be omitted, in which case the system default setting
169 for the corresponding socket option will be in effect.
170 For example,
171 <example>so_keepalive=30m::10</example>
172 will set the idle timeout (<c-def>TCP_KEEPIDLE</c-def>) to 30 minutes,
173 leave the probe interval (<c-def>TCP_KEEPINTVL</c-def>) at its system default,
174 and set the probes count (<c-def>TCP_KEEPCNT</c-def>) to 10 probes.
175 </tag-desc>
176
177 </list>
115 </para> 178 </para>
116 179
117 <para> 180 <para>
118 Different servers must listen on different 181 Different servers must listen on different
119 <value>address</value>:<value>port</value> pairs. 182 <value>address</value>:<value>port</value> pairs.