20210410
- Added an msg_panic() call to silence a Coverity warning,
- File: global/mail_task.c.
-
Documentation: updated containerization suggestions in
the postfix(1) manpage. File: postfix/postfix.c.
Documentation: added text and ASCII art to illustrate how
postlogd(8) provides an alternative to syslog logging.
File: proto/OVERVIEW.html.
+
+20210411
+
+ Updated the missing null pointer check (introduced: Postfix
+ alpha) after null argv[0] value. File: global/mail_task.c.
+
+ Cleanup: added a test case for a missing haproxy v1 protocol
+ type, and improved the haproxy parser error messages. File:
+ global/haproxy_srvr.c.
+
+ Documentation: updated examples and TLS configuration. File
+ proto/CONNECTION_CACHE_README.html.
connection automatically when a destination has high volume of mail in the
active queue.
-See Client-side TLS connection reuse to also implement multiple deliveries over
-a TLS-encrypted connection (Postfix version 3.4 and later).
-
SMTP Connection caching is a performance feature. Whether or not it actually
improves performance depends on the conditions:
OVERVIEW document.
The Postfix connection cache is shared among Postfix mail delivering processes.
-This maximizes the opportunity to reuse an open connection. Other MTAs such as
-Sendmail or exim have a non-shared connection cache. Here, a connection can be
-reused only by the mail delivering process that creates the connection. To get
-the same performance improvement as with a shared connection cache, non-shared
+This maximizes the opportunity to reuse an open connection. Some MTAs such as
+Sendmail have a non-shared connection cache. Here, a connection can be reused
+only by the mail delivering process that creates the connection. To get the
+same performance improvement as with a shared connection cache, non-shared
connections need to be kept open for a longer time.
The scache(8) server, introduced with Postfix version 2.2, maintains the shared
connection cache. With Postfix version 2.2, only the smtp(8) client has support
to access this cache.
- /-- smtp(8) --> Internet
-
- qmgr(8)
- |
- \-- | smtp(8) --> Internet
- |
- ^
- |
-
- scache(8)
-
When SMTP connection caching is enabled (see next section), the smtp(8) client
does not disconnect after a mail transaction, but gives the connection to the
scache(8) server which keeps the connection open for a limited amount of time.
client process can ask the scache(8) server for that cached connection and
reuse it for mail delivery.
+ /-- smtp(8) --> Internet
+
+ qmgr(8)
+ |
+ \-- | smtp(8)
+ |
+ | ^
+ v |
+
+ scache(8)
+
+With TLS connection reuse (Postfix 3.4 and later), the Postfix smtp(8) client
+connects to a remote SMTP server and sends plaintext EHLO and STARTTLS
+commands, then inserts a tlsproxy(8) process into the connection as shown
+below.
+
+After delivering mail, the smtp(8) client hands over the open smtp(8)-to-
+tlsproxy(8) connection to the scache(8) server, and continues with some other
+mail delivery request. Meanwhile, any smtp(8) client process can ask the scache
+(8) server for that cached connection and reuse it for mail delivery.
+
+ /-- smtp(8) --> tlsproxy(8) --> Internet
+
+ qmgr(8)
+ |
+ \-- | smtp(8)
+ |
+ | ^
+ v |
+
+ scache(8)
+
The connection cache can be searched by destination domain name (the right-hand
side of the recipient address) and by the IP address of the host at the other
end of the connection. This allows Postfix to reuse a connection even when the
smtp_connection_cache_destinations = hotmail.com, ...
smtp_connection_cache_destinations = static:all (not recommended)
+ See Client-side TLS connection reuse to enable multiple deliveries over a
+ TLS-encrypted connection (Postfix version 3.4 and later).
+
C\bCo\bon\bnn\bne\bec\bct\bti\bio\bon\bn c\bca\bac\bch\bhe\be s\bsa\baf\bfe\bet\bty\by m\bme\bec\bch\bha\ban\bni\bis\bsm\bms\bs
Connection caching must be used wisely. It is anti-social to keep an unused
STARTTLS commands, the smtp(8) client inserts a tlsproxy(8) process into
the connection as shown below.
- After the mail transaction completes, the Postfix smtp(8) client gives its
- connection to the tlsproxy(8) process to the scache(8) server, which keeps
- the connection open for a limited amount of time. The smtp(8) client
- continues with some other mail delivery request. Meanwhile, any Postfix
- smtp(8) client can ask the scache(8) server for that cached connection and
- reuse it for mail delivery.
+ After the mail transaction completes, the Postfix smtp(8) client gives the
+ smtp(8)-to-tlsproxy(8) connection to the scache(8) server, which keeps the
+ connection open for a limited amount of time. The smtp(8) client continues
+ with some other mail delivery request. Meanwhile, any Postfix smtp(8)
+ client can ask the scache(8) server for that cached connection and reuse it
+ for mail delivery.
/-- smtp(8) --> tlsproxy(8) --> Internet
reuses a plaintext SMTP connection automatically when a destination has
high volume of mail in the <a href="QSHAPE_README.html#active_queue">active queue</a>. </p>
-<p> See <a href="TLS_README.html#client_tls_reuse">Client-side TLS
-connection reuse</a> to also implement multiple deliveries over a
-TLS-encrypted connection (Postfix version 3.4 and later). </p>
-
<p> SMTP Connection caching is a performance feature. Whether or not
it actually improves performance depends on the conditions: </p>
<p> The Postfix connection cache is shared among Postfix mail
delivering processes. This maximizes the opportunity to reuse an
-open connection. Other MTAs such as Sendmail or exim have a
+open connection. Some MTAs such as Sendmail have a
non-shared connection cache. Here, a connection can be reused only
by the mail delivering process that creates the connection. To get
the same performance improvement as with a shared connection cache,
maintains the shared connection cache. With Postfix version 2.2,
only the <a href="smtp.8.html">smtp(8)</a> client has support to access this cache. </p>
+<p> When SMTP connection caching is enabled (see next section), the
+<a href="smtp.8.html">smtp(8)</a> client does not disconnect after a mail transaction, but
+gives the connection to the <a href="scache.8.html">scache(8)</a> server which keeps the
+connection open for a limited amount of time. </p>
+
+<p> After handing over the open connection to the <a href="scache.8.html">scache(8)</a> server,
+the <a href="smtp.8.html">smtp(8)</a> client continues with some other mail delivery request.
+Meanwhile, any <a href="smtp.8.html">smtp(8)</a> client process can ask the <a href="scache.8.html">scache(8)</a> server
+for that cached connection and reuse it for mail delivery. </p>
+
<blockquote>
<table>
<tr> <td> </td> <td> <tt> /-- </tt> </td> <td align="center"
colspan="3" bgcolor="#f0f0ff"> <a href="smtp.8.html">smtp(8)</a> </td> <td colspan="2"> <tt>
---> </tt> Internet </td> </tr>
+--> </tt> </td> <td> Internet </td> </tr>
<tr> <td align="center" bgcolor="#f0f0ff"> <a href="qmgr.8.html">qmgr(8)</a> </td> <td> </td>
-<td align="center" rowspan="3"> </td> <td align="center"
-rowspan="3"><tt>|<br>|<br>|<br>|<br>v</tt></td> <td> </td>
+<td align="center" rowspan="3"><tt>|<br>|<br>|<br>|<br>v</tt></td>
</tr>
+
+<tr> <td> </td> <td> <tt> \-- </tt> </td> <td align="center"
+colspan="4" bgcolor="#f0f0ff"> <a href="smtp.8.html">smtp(8)</a> </td> <td align="left">
+ </td> </tr>
-<tr> <td> </td> <td> <tt> \-- </tt> </td> <td align="center"
-colspan="2" bgcolor="#f0f0ff"> <a href="smtp.8.html">smtp(8)</a> </td> <td align="left"> <tt>
---> </tt> Internet </td> </tr>
-
-<tr> <td colspan="3"> </td> <td align="center"><tt>^<br>|</tt></td>
-<td> </td> </tr>
+<tr> <td colspan="2"> </td> <td> </td> <td
+align="center"><tt>^<br>|</tt></td> </tr>
-<tr> <td colspan="3"> </td> <td align="center" colspan="3"
+<tr> <td colspan="2"> </td> <td align="center" colspan="3"
bgcolor="#f0f0ff"> <a href="scache.8.html">scache(8)</a> </td> </tr>
</table>
</blockquote>
-<p> When SMTP connection caching is enabled (see next section), the
-<a href="smtp.8.html">smtp(8)</a> client does not disconnect after a mail transaction, but
-gives the connection to the <a href="scache.8.html">scache(8)</a> server which keeps the
-connection open for a limited amount of time. </p>
+<p> With TLS connection reuse (Postfix 3.4 and later), the Postfix
+<a href="smtp.8.html">smtp(8)</a> client connects to a remote SMTP server and sends plaintext
+EHLO and STARTTLS commands, then inserts a <a href="tlsproxy.8.html">tlsproxy(8)</a> process into
+the connection as shown below. </p>
-<p> After handing over the open connection to the <a href="scache.8.html">scache(8)</a> server,
-the <a href="smtp.8.html">smtp(8)</a> client continues with some other mail delivery request.
-Meanwhile, any <a href="smtp.8.html">smtp(8)</a> client process can ask the <a href="scache.8.html">scache(8)</a> server
-for that cached connection and reuse it for mail delivery. </p>
+<p> After delivering mail, the <a href="smtp.8.html">smtp(8)</a> client hands over the open
+<a href="smtp.8.html">smtp(8)</a>-to-<a href="tlsproxy.8.html">tlsproxy(8)</a> connection to the <a href="scache.8.html">scache(8)</a> server, and
+continues with some other mail delivery request. Meanwhile, any
+<a href="smtp.8.html">smtp(8)</a> client process can ask the <a href="scache.8.html">scache(8)</a> server for that cached
+connection and reuse it for mail delivery. </p>
+
+<blockquote>
+
+<table>
+
+<tr> <td> </td> <td> <tt> /-- </tt> </td> <td align="center"
+colspan="3" bgcolor="#f0f0ff"> <a href="smtp.8.html">smtp(8)</a> </td> <td colspan="2"> <tt>
+--> </tt> </td> <td align="center"bgcolor="#f0f0ff"> <a href="tlsproxy.8.html">tlsproxy(8)</a>
+</td> <td> <tt> --> </tt> </td> <td> Internet </td> </tr>
+
+<tr> <td align="center" bgcolor="#f0f0ff"> <a href="qmgr.8.html">qmgr(8)</a> </td> <td> </td>
+<td align="center" rowspan="3"><tt>|<br>|<br>|<br>|<br>v</tt></td>
+</tr>
+
+<tr> <td> </td> <td> <tt> \-- </tt> </td> <td align="center"
+colspan="4" bgcolor="#f0f0ff"> <a href="smtp.8.html">smtp(8)</a> </td> <td align="left">
+ </td> </tr>
+
+<tr> <td colspan="2"> </td> <td> </td> <td
+align="center"><tt>^<br>|</tt></td> </tr>
+
+<tr> <td colspan="2"> </td> <td align="center" colspan="3"
+bgcolor="#f0f0ff"> <a href="scache.8.html">scache(8)</a> </td> </tr>
+
+</table>
+
+</blockquote>
<p> The connection cache can be searched by destination domain name
(the right-hand side of the recipient address) and by the IP address
</blockquote>
+<p> See <a href="TLS_README.html#client_tls_reuse">Client-side TLS
+connection reuse</a> to enable multiple deliveries over a TLS-encrypted
+connection (Postfix version 3.4 and later). </p>
+
</ul>
<h2><a name="safety">Connection cache safety mechanisms </a></h2>
below. </p>
<p> After the mail transaction completes, the Postfix <a href="smtp.8.html">smtp(8)</a> client
-gives its connection to the <a href="tlsproxy.8.html">tlsproxy(8)</a> process to the <a href="scache.8.html">scache(8)</a>
+gives the <a href="smtp.8.html">smtp(8)</a>-to-<a href="tlsproxy.8.html">tlsproxy(8)</a> connection to the <a href="scache.8.html">scache(8)</a>
server, which keeps the connection open for a limited amount of
time. The <a href="smtp.8.html">smtp(8)</a> client continues with some other mail delivery
request. Meanwhile, any Postfix <a href="smtp.8.html">smtp(8)</a> client can ask the <a href="scache.8.html">scache(8)</a>
reuses a plaintext SMTP connection automatically when a destination has
high volume of mail in the active queue. </p>
-<p> See <a href="TLS_README.html#client_tls_reuse">Client-side TLS
-connection reuse</a> to also implement multiple deliveries over a
-TLS-encrypted connection (Postfix version 3.4 and later). </p>
-
<p> SMTP Connection caching is a performance feature. Whether or not
it actually improves performance depends on the conditions: </p>
<p> The Postfix connection cache is shared among Postfix mail
delivering processes. This maximizes the opportunity to reuse an
-open connection. Other MTAs such as Sendmail or exim have a
+open connection. Some MTAs such as Sendmail have a
non-shared connection cache. Here, a connection can be reused only
by the mail delivering process that creates the connection. To get
the same performance improvement as with a shared connection cache,
maintains the shared connection cache. With Postfix version 2.2,
only the smtp(8) client has support to access this cache. </p>
+<p> When SMTP connection caching is enabled (see next section), the
+smtp(8) client does not disconnect after a mail transaction, but
+gives the connection to the scache(8) server which keeps the
+connection open for a limited amount of time. </p>
+
+<p> After handing over the open connection to the scache(8) server,
+the smtp(8) client continues with some other mail delivery request.
+Meanwhile, any smtp(8) client process can ask the scache(8) server
+for that cached connection and reuse it for mail delivery. </p>
+
<blockquote>
<table>
<tr> <td> </td> <td> <tt> /-- </tt> </td> <td align="center"
colspan="3" bgcolor="#f0f0ff"> smtp(8) </td> <td colspan="2"> <tt>
---> </tt> Internet </td> </tr>
+--> </tt> </td> <td> Internet </td> </tr>
<tr> <td align="center" bgcolor="#f0f0ff"> qmgr(8) </td> <td> </td>
-<td align="center" rowspan="3"> </td> <td align="center"
-rowspan="3"><tt>|<br>|<br>|<br>|<br>v</tt></td> <td> </td>
+<td align="center" rowspan="3"><tt>|<br>|<br>|<br>|<br>v</tt></td>
</tr>
+
+<tr> <td> </td> <td> <tt> \-- </tt> </td> <td align="center"
+colspan="4" bgcolor="#f0f0ff"> smtp(8) </td> <td align="left">
+ </td> </tr>
-<tr> <td> </td> <td> <tt> \-- </tt> </td> <td align="center"
-colspan="2" bgcolor="#f0f0ff"> smtp(8) </td> <td align="left"> <tt>
---> </tt> Internet </td> </tr>
-
-<tr> <td colspan="3"> </td> <td align="center"><tt>^<br>|</tt></td>
-<td> </td> </tr>
+<tr> <td colspan="2"> </td> <td> </td> <td
+align="center"><tt>^<br>|</tt></td> </tr>
-<tr> <td colspan="3"> </td> <td align="center" colspan="3"
+<tr> <td colspan="2"> </td> <td align="center" colspan="3"
bgcolor="#f0f0ff"> scache(8) </td> </tr>
</table>
</blockquote>
-<p> When SMTP connection caching is enabled (see next section), the
-smtp(8) client does not disconnect after a mail transaction, but
-gives the connection to the scache(8) server which keeps the
-connection open for a limited amount of time. </p>
+<p> With TLS connection reuse (Postfix 3.4 and later), the Postfix
+smtp(8) client connects to a remote SMTP server and sends plaintext
+EHLO and STARTTLS commands, then inserts a tlsproxy(8) process into
+the connection as shown below. </p>
-<p> After handing over the open connection to the scache(8) server,
-the smtp(8) client continues with some other mail delivery request.
-Meanwhile, any smtp(8) client process can ask the scache(8) server
-for that cached connection and reuse it for mail delivery. </p>
+<p> After delivering mail, the smtp(8) client hands over the open
+smtp(8)-to-tlsproxy(8) connection to the scache(8) server, and
+continues with some other mail delivery request. Meanwhile, any
+smtp(8) client process can ask the scache(8) server for that cached
+connection and reuse it for mail delivery. </p>
+
+<blockquote>
+
+<table>
+
+<tr> <td> </td> <td> <tt> /-- </tt> </td> <td align="center"
+colspan="3" bgcolor="#f0f0ff"> smtp(8) </td> <td colspan="2"> <tt>
+--> </tt> </td> <td align="center"bgcolor="#f0f0ff"> tlsproxy(8)
+</td> <td> <tt> --> </tt> </td> <td> Internet </td> </tr>
+
+<tr> <td align="center" bgcolor="#f0f0ff"> qmgr(8) </td> <td> </td>
+<td align="center" rowspan="3"><tt>|<br>|<br>|<br>|<br>v</tt></td>
+</tr>
+
+<tr> <td> </td> <td> <tt> \-- </tt> </td> <td align="center"
+colspan="4" bgcolor="#f0f0ff"> smtp(8) </td> <td align="left">
+ </td> </tr>
+
+<tr> <td colspan="2"> </td> <td> </td> <td
+align="center"><tt>^<br>|</tt></td> </tr>
+
+<tr> <td colspan="2"> </td> <td align="center" colspan="3"
+bgcolor="#f0f0ff"> scache(8) </td> </tr>
+
+</table>
+
+</blockquote>
<p> The connection cache can be searched by destination domain name
(the right-hand side of the recipient address) and by the IP address
</blockquote>
+<p> See <a href="TLS_README.html#client_tls_reuse">Client-side TLS
+connection reuse</a> to enable multiple deliveries over a TLS-encrypted
+connection (Postfix version 3.4 and later). </p>
+
</ul>
<h2><a name="safety">Connection cache safety mechanisms </a></h2>
below. </p>
<p> After the mail transaction completes, the Postfix smtp(8) client
-gives its connection to the tlsproxy(8) process to the scache(8)
+gives the smtp(8)-to-tlsproxy(8) connection to the scache(8)
server, which keeps the connection open for a limited amount of
time. The smtp(8) client continues with some other mail delivery
request. Meanwhile, any Postfix smtp(8) client can ask the scache(8)
if (beyond_header == 0)
err = "missing protocol header terminator";
else if (haproxy_srvr_parse_lit(NEXT_TOKEN, "PROXY", (char *) 0) < 0)
- err = "unexpected protocol header";
+ err = "bad or missing protocol header";
else if (haproxy_srvr_parse_proto(NEXT_TOKEN, &addr_family) < 0)
- err = "unsupported protocol type";
+ err = "bad or missing protocol type";
else if (haproxy_srvr_parse_addr(NEXT_TOKEN, smtp_client_addr,
addr_family) < 0)
- err = "unexpected client address syntax";
+ err = "bad or missing client address";
else if (haproxy_srvr_parse_addr(NEXT_TOKEN, smtp_server_addr,
addr_family) < 0)
- err = "unexpected server address syntax";
+ err = "bad or missing server address";
else if (haproxy_srvr_parse_port(NEXT_TOKEN, smtp_client_port) < 0)
- err = "unexpected client port syntax";
+ err = "bad or missing client port";
else if (haproxy_srvr_parse_port(NEXT_TOKEN, smtp_server_port) < 0)
- err = "unexpected server port syntax";
+ err = "bad or missing server port";
else {
err = 0;
*str_len = beyond_header - saved_str;
/* IPv6. */
{"PROXY TCP6 fc:00:00:00:1:2:3:4 fc:00:00:00:4:3:2:1 123 321\n", 0, 0, 0, 0, "fc::1:2:3:4", "fc::4:3:2:1", "123", "321"},
{"PROXY TCP6 FC:00:00:00:1:2:3:4 FC:00:00:00:4:3:2:1 123 321\n", 0, 0, 0, 0, "fc::1:2:3:4", "fc::4:3:2:1", "123", "321"},
- {"PROXY TCP6 1.2.3.4 4.3.2.1 123 321\n", 0, 0, 0, "unexpected client address syntax"},
- {"PROXY TCP6 fc:00:00:00:1:2:3:4 4.3.2.1 123 321\n", 0, 0, 0, "unexpected server address syntax"},
+ {"PROXY TCP6 1.2.3.4 4.3.2.1 123 321\n", 0, 0, 0, "bad or missing client address"},
+ {"PROXY TCP6 fc:00:00:00:1:2:3:4 4.3.2.1 123 321\n", 0, 0, 0, "bad or missing server address"},
/* IPv4 in IPv6. */
{"PROXY TCP6 ::ffff:1.2.3.4 ::ffff:4.3.2.1 123 321\n", 0, 0, 0, 0, "1.2.3.4", "4.3.2.1", "123", "321"},
{"PROXY TCP6 ::FFFF:1.2.3.4 ::FFFF:4.3.2.1 123 321\n", 0, 0, 0, 0, "1.2.3.4", "4.3.2.1", "123", "321"},
- {"PROXY TCP4 ::ffff:1.2.3.4 ::ffff:4.3.2.1 123 321\n", 0, 0, 0, "unexpected client address syntax"},
- {"PROXY TCP4 1.2.3.4 ::ffff:4.3.2.1 123 321\n", 0, 0, 0, "unexpected server address syntax"},
+ {"PROXY TCP4 ::ffff:1.2.3.4 ::ffff:4.3.2.1 123 321\n", 0, 0, 0, "bad or missing client address"},
+ {"PROXY TCP4 1.2.3.4 ::ffff:4.3.2.1 123 321\n", 0, 0, 0, "bad or missing server address"},
/* IPv4. */
{"PROXY TCP4 1.2.3.4 4.3.2.1 123 321\n", 0, 0, 0, 0, "1.2.3.4", "4.3.2.1", "123", "321"},
{"PROXY TCP4 01.02.03.04 04.03.02.01 123 321\n", 0, 0, 0, 0, "1.2.3.4", "4.3.2.1", "123", "321"},
- {"PROXY TCP4 1.2.3.4 4.3.2.1 123456 321\n", 0, 0, 0, "unexpected client port syntax"},
- {"PROXY TCP4 1.2.3.4 4.3.2.1 123 654321\n", 0, 0, 0, "unexpected server port syntax"},
- {"PROXY TCP4 1.2.3.4 4.3.2.1 0123 321\n", 0, 0, 0, "unexpected client port syntax"},
- {"PROXY TCP4 1.2.3.4 4.3.2.1 123 0321\n", 0, 0, 0, "unexpected server port syntax"},
+ {"PROXY TCP4 1.2.3.4 4.3.2.1 123456 321\n", 0, 0, 0, "bad or missing client port"},
+ {"PROXY TCP4 1.2.3.4 4.3.2.1 123 654321\n", 0, 0, 0, "bad or missing server port"},
+ {"PROXY TCP4 1.2.3.4 4.3.2.1 0123 321\n", 0, 0, 0, "bad or missing client port"},
+ {"PROXY TCP4 1.2.3.4 4.3.2.1 123 0321\n", 0, 0, 0, "bad or missing server port"},
/* Missing fields. */
- {"PROXY TCP6 fc:00:00:00:1:2:3:4 fc:00:00:00:4:3:2:1 123\n", 0, 0, 0, "unexpected server port syntax"},
- {"PROXY TCP6 fc:00:00:00:1:2:3:4 fc:00:00:00:4:3:2:1\n", 0, 0, 0, "unexpected client port syntax"},
- {"PROXY TCP6 fc:00:00:00:1:2:3:4\n", 0, 0, 0, "unexpected server address syntax"},
- {"PROXY TCP6\n", 0, 0, 0, "unexpected client address syntax"},
- {"PROXY TCP4 1.2.3.4 4.3.2.1 123\n", 0, 0, 0, "unexpected server port syntax"},
- {"PROXY TCP4 1.2.3.4 4.3.2.1\n", 0, 0, 0, "unexpected client port syntax"},
- {"PROXY TCP4 1.2.3.4\n", 0, 0, 0, "unexpected server address syntax"},
- {"PROXY TCP4\n", 0, 0, 0, "unexpected client address syntax"},
+ {"PROXY TCP6 fc:00:00:00:1:2:3:4 fc:00:00:00:4:3:2:1 123\n", 0, 0, 0, "bad or missing server port"},
+ {"PROXY TCP6 fc:00:00:00:1:2:3:4 fc:00:00:00:4:3:2:1\n", 0, 0, 0, "bad or missing client port"},
+ {"PROXY TCP6 fc:00:00:00:1:2:3:4\n", 0, 0, 0, "bad or missing server address"},
+ {"PROXY TCP6\n", 0, 0, 0, "bad or missing client address"},
+ {"PROXY TCP4 1.2.3.4 4.3.2.1 123\n", 0, 0, 0, "bad or missing server port"},
+ {"PROXY TCP4 1.2.3.4 4.3.2.1\n", 0, 0, 0, "bad or missing client port"},
+ {"PROXY TCP4 1.2.3.4\n", 0, 0, 0, "bad or missing server address"},
+ {"PROXY TCP4\n", 0, 0, 0, "bad or missing client address"},
/* Other. */
- {"PROXY BLAH\n", 0, 0, 0, "unsupported protocol type"},
+ {"PROXY BLAH\n", 0, 0, 0, "bad or missing protocol type"},
+ {"PROXY\n", 0, 0, 0, "short protocol header"},
{"BLAH\n", 0, 0, 0, "short protocol header"},
+ {"\n", 0, 0, 0, "short protocol header"},
+ {"", 0, 0, 0, "short protocol header"},
0,
};
/* The result is overwritten with each call.
/*
/* A null argv0 argument requests that the current result is
-/* returned.
-/* DIAGNOSTICS
-/* Panic: argv0 is a null pointer, but no current result exists.
+/* returned, or "unknown" when no current result exists.
/* LICENSE
/* .ad
/* .fi
#include <vstring.h>
#include <safe.h>
-#include <msg.h>
/* Global library. */
const char *slash;
const char *tag;
+ if (argv0 == 0 && canon_name == 0)
+ argv0 = "unknown";
if (argv0) {
if (canon_name == 0)
canon_name = vstring_alloc(10);
mail_conf_eval(DEF_SYSLOG_NAME);
vstring_sprintf(canon_name, "%s/%s", tag, argv0);
}
- if (canon_name == 0)
- msg_panic("mail_task: no current result");
return (vstring_str(canon_name));
}
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20210410"
+#define MAIL_RELEASE_DATE "20210411"
#define MAIL_VERSION_NUMBER "3.6"
#ifdef SNAPSHOT