2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-29 13:18:12 +00:00

postfix-2.3-RC8

This commit is contained in:
Wietse Venema 2006-07-07 00:00:00 -05:00 committed by Viktor Dukhovni
parent 05249da535
commit cc94e64f58
25 changed files with 441 additions and 324 deletions

View File

@ -47,7 +47,6 @@ Web sites:
Mail addresses (PLEASE send questions to the mailing list)
postfix-users@postfix.org Postfix users mailing list
wietse@porcupine.org the original author
In order to subscribe to the mailing list, see http://www.postfix.org/.
@ -162,8 +161,9 @@ Miscellaneous:
auxiliary/ Auxiliary software etc.
bin/ Postfix command executables
conf/ Configuration files, run-time scripts
include/ Installed include files
lib/ Installed object libraries
include/ Include files
implementation-notes/ Background information
lib/ Object libraries
libexec/ Postfix daemon executables
mantools/ Manual page utilities
mantools/ Documentation utilities
proto/ Documentation source

View File

@ -8,12 +8,13 @@ address probing yes (optional persistent database)
aliases yes (can enable/disable mail to /file or |command)
bare newlines yes (but will send CRLF)
blacklisting yes (client name/addr; helo hostname; mail from; rcpt to)
connection caching yes (SMTP shared cache; LMTP in-process cache)
connection caching yes (SMTP shared cache; LMTP shared cache)
content filter yes (before and after queue, internal and external)
db tables yes (compile time option)
dbm tables yes (compile time option)
delivered-to yes (configurable with prepend_delivered_header)
dsn almost (supports enhanced status codes and DSN format bounces)
dsn yes
enhanced status codes yes
errors-to: no (removed with Postfix 2.2)
esmtp yes
etrn support yes (per-destination log for authorized destinations only)
@ -23,9 +24,9 @@ genericstable yes (Postfix 2.2 generic(5) table)
greylist yes (delegated policy script)
home mailbox yes
ident lookup no
ipv6 yes (compatibility for ipv4-only kernels/libraries)
ipv6 yes (compatibility for ipv4-only systems)
ldap tables yes (contributed)
lmtp support yes (client)
lmtp support yes (client only)
luser relay yes
m4 config no
mail to command yes (configurable for .forward, aliases, :include:)
@ -34,6 +35,7 @@ maildir yes (in home, system mailspool, /file/name/ alias)
mailertable yes (it's called transport)
mailq yes
majordomo yes (edit approve script to delete /^delivered-to:/i)
milter yes (except body replacement)
mime yes (including 8bit to quoted-printable conversion)
mysql tables yes (contributed)
netinfo tables yes (contributed)
@ -42,11 +44,11 @@ nis tables yes
nis+ tables yes (contributed)
no <> in smtp yes (most common address forms)
pgsql tables yes (contributed)
pipeline option yes (server and client)
pop/imap yes (with third-party daemons that use mailbox or maildir)
pipeline option yes (SMTP server and client; LMTP client)
pop/imap no
qmqp server yes (with verp support)
rbl support yes
return-receipt: no
return-receipt: no (use DSN NOTIFY=SUCCESS)
rhsbl support yes
sasl support yes (compile time option)
sendmail -bt no

View File

@ -12461,6 +12461,24 @@ Apologies for any names omitted.
Cleanup: comments, error messages, and crumbling interfaces.
20060707
Workaround: apparently, Solaris gettimeofday() can return
out-of range microsecond values. File: src/global/log_adhoc.c.
Robustness: the SMTPD policy client now encodes the
ccert_subject and ccert-issuer attributes as xtext. Some
characters are replaced by +XX, where XX is the two-digit
hexadecimal code for the character value. File:
smtpd/smtpd_check.c.
Safety: the SMTP/LMTP client now defers delivery when a
SASL password exists but the server does not offer SASL
authentication. Mail could be rejected otherwise. This
may become an issue now that Postfix retries delivery in
plaintext after an opportunistic TLS handshake fails. Specify
"smtp_sasl_auth_enforce = no" to deliver mail anyway.
Wish list:
The usage of TLScontext->cache_type is unclear. It specifies
@ -12474,37 +12492,27 @@ Wish list:
around as pointers. TLScontext->cache_type is a case in
point.
In the SMTPD policy client (encode or strip) non-printable
non-ASCII in (TLS or all) attributes.
Are transport:nexthop null fields the same as in the case
of default_transport etc. parameters?
Introduce structured API for tls_server_mumble() just like
with smtp(8): this eliminates ever-growing lists of arguments.
Defer delivery when a SASL password exists but the server
does not offer SASL authentication, as mail might otherwise
be bounced. This may become an issue now that Postfix will
retry in plaintext after optional TLS fails. Make this
configurable so people can get the old behavior.
Don't lose bits when converting st_dev into maildir file
name. It's 64 bits on Linux. Found with the BEAM source
code analyzer.
code analyzer. Is this really a problem, or are they just
using 64 bits for upwards compatibility with LP64 systems?
Do or don't introduce unknown_reverse_client_reject_code.
mail_addr/rcpt_addr should be externalized as they are in
Sendmail. Likewise, addresses in add/delete requests should
be internalized before updating the queue file.
In Milter events, mail_addr/rcpt_addr should be externalized
as they are in Sendmail. Likewise, addresses in add/delete
requests should be internalized before updating the queue
file.
Check that "UINT32 == unsigned int" choice is ok (i.e. LP64
UNIX).
Fix milter_argv() so it does not forget how much memory it
has.
Tempfail when a Milter application wants content access,
while it is configured in an SMTP server that runs before
the smtpd_proxy filter.
@ -12531,8 +12539,8 @@ Wish list:
Eliminate the (incoming,deferred)->active rename operation.
Softbounce fallback-to-ISP for SOHO users. This requires
playing with with the soft_error test in the smtp_trouble.c
module, and a way to avoid trying direct-to-backup-MX.
playing with the soft_error test in the smtp_trouble.c
module, and avoiding delivery to backup MX hosts.
select -> kqueue, epoll, /dev/poll, poll() ...

View File

@ -58,7 +58,7 @@ a delegated SMTPD access policy request:
sasl_sender=
size=12345
ccert_subject=solaris9.porcupine.org
ccert_issuer=Wietse Venema
ccert_issuer=Wietse+20Venema
ccert_fingerprint=C2:9D:F4:87:71:73:73:D9:18:E7:C2:F3:C1:DA:6E:04
PPoossttffiixx vveerrssiioonn 22..33 aanndd llaatteerr::
encryption_protocol=TLSv1/SSLv3
@ -114,7 +114,9 @@ Notes:
* The "ccert_*" attributes (Postfix 2.2 and later) specify information about
how the client was authenticated via TLS. These attributes are empty in
case of no certificate authentication.
case of no certificate authentication. As of Postfix 2.2.11 these attribute
values are encoded as xtext: some characters are represented by +XX, where
XX is the two-digit hecadecimal representation of the character value.
* The "encryption_*" attributes (Postfix 2.3 and later) specify information
about how the connection is encrypted. With plaintext connections the

View File

@ -11,20 +11,19 @@ instead, a new snapshot is released.
The mail_release_date configuration parameter (format: yyyymmdd)
specifies the release date of a stable release or snapshot release.
Major changes - critical
------------------------
Critical notes
--------------
See RELEASE_NOTES_2.2 if you upgrade from Postfix 2.1 or earlier.
Postfix internal protocols have has changed. You need to "postfix
Some Postfix internal protocols have changed. You need to "postfix
reload" or restart Postfix, otherwise many servers will log warning
messages with "unexpected attribute" or "problem talking to service
rewrite: Unknown error: 0", and mail will not be delivered.
[Incompat 20060515] Milter support introduces a three new queue
file record types. Queue files created with this Postfix version
will be understood by older Postfix versions ONLY if Milter support
is turned off, which is the default.
The Sendmail-compatible Milter support introduces three new queue
file record types. As long as you leave this feature turned off,
you can still go back to Postfix version 2.2 without losing mail.
Major changes - DNS lookups
---------------------------
@ -41,19 +40,11 @@ Major changes - DSN
This gives senders control over successful and failed delivery
notifications. DSN involves extra parameters to the SMTP MAIL FROM
and RCPT TO commands, as well as extra Postfix sendmail command
line options that provide a sub-set of the functions of those extra
SMTP command parameters.
line options for mail submission.
See DSN_README for details. Some implementation notes are in
implementation-notes/DSN.
[Incompat 20050828] When the cleanup server rejects the content or
size of mail that was submitted with the Postfix sendmail command,
forwarded with the local(8) delivery agent, or that was re-queued
with "postsuper -r", Postfix no longer sends DSN SUCCESS notification
of virtual alias expansions. Since all the recipients are reported
as failed, the SUCCESS notification seems redundant.
[Incompat 20050615] The new DSN support conflicts with VERP support.
For Sendmail compatibility, Postfix now uses the sendmail -V command
line option for DSN. In order to request VERP style delivery, you
@ -61,16 +52,23 @@ must now specify -XV instead of -V. The Postfix sendmail command
will recognize if you try to use -V for VERP-style delivery. It
will do the right thing and will remind you of the new syntax.
[Incompat 20050828] When the cleanup server rejects the content or
size of mail that was submitted with the Postfix sendmail command,
that was forwarded with the local(8) delivery agent, or that was
re-queued with "postsuper -r", Postfix no longer sends DSN SUCCESS
notification after virtual alias expansions. Since all the recipients
are reported as failed, the SUCCESS notification seems redundant.
Major changes - LMTP client
---------------------------
[Feature 20051208] The SMTP client now implements the LMTP protocol.
Most but not all smtp_xxx parameters have an lmtp_xxx "ghost"
parameter. This means there are lot of new LMTP features, including
support for TLS and for the shared connection cache.
See the "SASL authentication" and "TLS" sections for changes related
to SASL authentication and TLS support, respectively.
[Feature 20060614] The unified SMTP/LMTP client now has complete
sets of configuration parameters for each protocol.
[Feature 20051208] The SMTP client now implements the LMTP protocol.
Most but not all smtp_xxx parameters now have an lmtp_xxx equivalent.
This means there are lot of new LMTP features, including support
for TLS and for the shared connection cache.
[Incompat 20051208] The LMTP client now reports the server as
"myhostname[/path/name]". With the real server hostname in delivery
@ -81,19 +79,18 @@ Major changes - Milter support
[Feature 20060515] Milter (mail filter) application support,
compatible with Sendmail version 8.13.6 and earlier. This allows
you to run a large number of plug-ins to reject unwanted mail and
to sign mail with, for example, domain keys. All Milter functions
are implemented except replacing the message body, which will be
added later. Milters are before-queue filters, so they don't change
the queue ID.
you to run a large number of plug-ins to reject unwanted mail, and
to sign mail with for example domain keys. All Milter functions are
implemented except replacing the message body, which will be added
later. Milters are before-queue filters, so they don't change the
queue ID.
See the MILTER_README document for a discussion of how to use Milter
support with Postfix.
support with Postfix, and limitations of the current implementation.
[Incompat 20060515] Milter support introduces a three new queue
file record types. Queue files created with this Postfix version
will be understood by older Postfix versions ONLY if Milter support
is turned off, which is the default.
[Incompat 20060515] Milter support introduces three new queue file
record types. As long as you leave this feature turned off, you can
still go back to Postfix version 2.2 without losing mail.
[Incompat 20060515] Milter support introduces new logfile event
types: milter-reject, milter-discard and milter-hold, that identify
@ -103,8 +100,15 @@ software.
Major changes - SASL authentication
-----------------------------------
[Incompat 20060707] The SMTP/LMTP client now defers delivery when
a SASL password exists but the server does not offer SASL authentication.
Otherwise, the server could reject the mail. This may become an
issue now that Postfix retries delivery in plaintext after an
opportunistic TLS handshake fails. Specify "smtp_sasl_auth_enforce
= no" to deliver mail anyway.
[Feature 20051220] Plug-in support for SASL authentication in the
SMTP server and in the SMTP+LMTP client. With this, Postfix can
SMTP server and in the SMTP/LMTP client. With this, Postfix can
support multiple SASL implementations without source code patches.
Some distributors may even make SASL support a run-time linking
option, just like they already do with Postfix lookup tables.
@ -117,7 +121,7 @@ are slightly different, but these are generally improvements.
The "postconf -a" command shows what plug-in implementations are
available for the SMTP server, and "postconf -A" does the same for
the SMTP+LMTP client. Plug-in implementations are selected with
the SMTP/LMTP client. Plug-in implementations are selected with
the smtpd_sasl_type, smtp_sasl_type and lmtp_sasl_type configuration
parameters.
@ -163,15 +167,13 @@ ISP accounts.
Major changes - SMTP client
---------------------------
[Feature 20051208] The SMTP client now implements the LMTP protocol.
Most but not all smtp_xxx parameters have an lmtp_xxx "ghost"
parameter. This means there are lot of new LMTP features, including
support for TLS and for the shared connection cache. There are no
lmtp_xxx "ghost" parameters for the HELO or EHLO commands, because
those commands exist only in SMTP.
See the "SASL authentication" and "TLS" sections for changes related
to SASL authentication and TLS support, respectively.
[Feature 20060614] The unified SMTP/LMTP client now has complete
sets of configuration parameters for each protocol.
[Feature 20051208] The SMTP client now implements the LMTP protocol.
Most but not all smtp_xxx parameters now have an lmtp_xxx equivalent.
This means there are lot of new LMTP features, including support
for TLS and for the shared connection cache.
[Incompat 20060112] The Postfix SMTP/LMTP client by default no
longer allows DNS CNAME records to override the server hostname
@ -180,13 +182,13 @@ and TLS server certificate verification. Specify
"smtp_cname_overrides_servername = yes" to get the old behavior.
[Incompat 20060103] The Postfix SMTP/LMTP client no longer defers
mail when it receives a malformed SMTP server reply in a session
with command pipelining. When helpful warnings are enabled, it
will suggest that command pipelining be disabled for the affected
mail delivery when it receives a malformed SMTP server reply in a
session with command pipelining. When helpful warnings are enabled,
it will suggest that command pipelining be disabled for the affected
destination.
[Incompat 20051208] The fallback_relay feature is renamed to
smtp_fallback_relay, to make clear that the combined SMTP+LMTP
smtp_fallback_relay, to make clear that the combined SMTP/LMTP
client uses this setting only for SMTP deliveries. The old name
still works.
@ -274,29 +276,27 @@ this limit was disabled by default. The new limit prevents Postfix
from spending lots of time trying to connect to lots of bogus MX
servers.
[Incompat 20050622] The Postfix SMTP handling of [45]XX server
greetings was cleaned up. The server reply is now properly reported.
Major changes - SMTP server
---------------------------
[Incompat 20060207] The Postfix SMTP server no longer complains
when TLS support is not compiled in, but permit_tls_clientcerts,
permit_tls_all_clientcerts, or check_ccert_access are used. These
features now are effectively ignored. However, the
reject_plaintext_session feature is not ignored and will reject
mail.
See the "SASL authentication" and "TLS" sections for changes related
to SASL authentication and TLS support, respectively.
[Incompat 20051202] The Postfix SMTP daemon will not receive mail
from the network if it isn't running with postfix mail_owner
[Feature 20051222] You can now use "resolve_numeric_domain = yes"
to stop Postfix from rejecting user@ipaddress as an invalid
destination. It will deliver the mail to user@[ipaddress] instead.
[Incompat 20051202] The Postfix SMTP server now refuses to receive
mail from the network if it isn't running with postfix mail_owner
privileges. This prevents surprises when, for example, "sendmail
-bs" is configured to run as root from xinetd.
[Incompat 20051121] The permit_mx_backup feature still accepts mail
for authorized destinations (see permit_mx_backup for definition),
but with other destinations it requires that the local MTA is listed
as non-primary MX. This prevents mail loop problems when someone
points the primary MX record at Postfix.
[Incompat 20051121] Although the permit_mx_backup feature still
accepts mail for authorized destinations (see permit_mx_backup for
definition), with all other destinations it now requires that the
local MTA is listed as non-primary MX. This prevents mail loop
problems when someone points the primary MX record at a Postfix
system.
[Feature 20051011] Optional protection against SMTP clients that
hammer the server with too many new (i.e. uncached) SMTP-over-TLS
@ -339,8 +339,8 @@ parameters. The old parameters are still supported but will be
removed in a future Postfix release.
[Feature 20060614] New smtpd_tls_protocols parameter complements
the smtp_tls_mandatory_protocols parameter, only recommended for
MSA configurations, not MX hosts.
the smtp_tls_mandatory_protocols parameter. This recommended for
MSA configurations, not for MX for hosts that face the Internet.
[Feature 20060626] Both the SMTP client and server can be configured
without a client or server certificate. An SMTP server without
@ -356,11 +356,15 @@ is required (notably Postfix 2.3 in "opportunistic" mode) and the
administrator has not excluded the "aNULL" OpenSSL cipher type with
smtp_tls_exclude_ciphers.
[Feature 20060626] You can specify cipher grades with the
smtp_tls_mandatory_ciphers, lmtp_tls_mandatory_ciphers and
smtpd_tls_ciphers parameters. Specify
one of "high", "medium", "low", "export" or "null". See TLS_README
for details.
[Feature 20060626] You can specify cipher grades (instead of cipher
names) with the smtp_tls_mandatory_ciphers, lmtp_tls_mandatory_ciphers
and smtpd_tls_ciphers parameters. Specify one of "high", "medium",
"low", "export" or "null". See TLS_README for details.
[Incompat 20060707] The SMTPD policy client now encodes the
ccert_subject and ccert_issuer attributes as xtext. Some characters
are represented by +XX, where XX is the two-digit hexadecimal
representation of the character value.
[Incompat 20060614] The smtp_sasl_tls_verified_security_options
feature is not yet complete, and will therefore not appear in the
@ -378,9 +382,9 @@ now also logs TLS session cache activity. Use level 2 and higher
for debugging only, use levels 0 or 1 as production settings.
[Incompat 20060207] The Postfix SMTP server no longer complains
when TLS support is not compiled in, but permit_tls_clientcerts,
permit_tls_all_clientcerts, or check_ccert_access are used. These
features now are effectively ignored. However, the
when TLS support is not compiled in while permit_tls_clientcerts,
permit_tls_all_clientcerts, or check_ccert_access are specified in
main.cf. These features now are effectively ignored. However, the
reject_plaintext_session feature is not ignored and will reject
mail.
@ -388,7 +392,8 @@ mail.
smtp_tls_per_site feature, without changes to the user interface.
Some Postfix internals had to be re-structured in preparation for
a more general TLS policy mechanism; this required that smtp_tls_per_site
be re-implemented from scratch.
be re-implemented from scratch. The obscure behavior was found
during compatibility testing.
[Feature 20051011] Optional protection against SMTP clients that
hammer the server with too many new (i.e. uncached) SMTP-over-TLS
@ -412,13 +417,14 @@ Major changes - XCLIENT and XFORWARD
[Incompat 20060611] The SMTP server XCLIENT implementation has
changed. The SMTP server now resets state to the initial server
greeting stage, so that it can accurately simulate the effect of
connection-level access restrictions. Without this change, XCLIENT
will not work at all with Milter applications.
greeting stage, immediately before the EHLO/HELO greeting. This
was needed to correctly simulate the effect of connection-level
access restrictions. Without this change, XCLIENT would not work
with Milter applications.
[Incompat 20060611] The SMTP server XCLIENT and XFORWARD commands
now expect that attributes are xtext encoded (RFC 1891). For backwards
compatibility they will accept unencoded attribute values. The
compatibility they will also accept unencoded attribute values. The
XFORWARD client code in the SMTP client and in the SMTPD_PROXY
client will always encode attribute values. This change will have
effect only for malformed hostname and helo parameter values.
@ -426,8 +432,8 @@ effect only for malformed hostname and helo parameter values.
For more details, see the XCLIENT_README and XFORWARD_README
documents.
Major changes - address rewriting
---------------------------------
Major changes - address manipulation
------------------------------------
[Incompat 20060123] Postfix now preserves uppercase information
while mapping addresses with canonical, virtual, relocated or generic
@ -435,6 +441,10 @@ maps; this happens even with $number substitutions in regular
expression maps. However, the local(8) and virtual(8) delivery
agents still fold addresses to lower case.
As a side effect, Postfix now also does a better job at being case
insensitive where it should be, for example while searching per-host
TLS policies or SASL passwords.
By default, Postfix now folds the search string to lowercase only
with tables that have fixed-case lookup fields such as btree:,
hash:, dbm:, ldap:, or *sql:. The search string is no longer case
@ -444,13 +454,6 @@ case, such as regexp:, pcre:, or cidr:.
For safety reasons, Postfix no longer allows $number substitution
in regexp: or pcre: transport tables or per-sender relayhost tables.
[Feature 20060123] Postfix now does a better job at preserving
upper/lower case information while transforming addresses. The
table lookup code was revised, and is now more careful about when
it folds search strings to lower case. As a side effect, Postfix
now also does a better job at being case insensitive where it should,
for example while searching per-host TLS policies or SASL passwords.
Major changes - bounce message templates
----------------------------------------
@ -481,13 +484,6 @@ this:
The $mail_name program
EOF
Major changes - broken SMTP clients
-----------------------------------
[Feature 20051222] You can now use "resolve_numeric_domain = yes"
to stop Postfix from rejecting user@ipaddress as an invalid
destination. It will deliver the mail to user@[ipaddress] instead.
Major changes - built-in filters
--------------------------------
@ -503,55 +499,6 @@ command (or re-queued with "postsuper -r"), the returned message
is now limited to just the message headers, to avoid the risk of
exposure to harmful content in the message body or attachments.
Major changes - connection caching
----------------------------------
[Incompat 20051026] The smtp_connection_cache_reuse_limit parameter
(which limits the number of deliveries per SMTP connection) is
replaced by the new smtp_connection_reuse_time_limit parameter (the
time after which a connection is no longer stored into the connection
cache).
[Feature 20051026] This snapshot addresses a performance stability
problem with remote SMTP servers. The problem is not specific to
Postfix: it can happen when any MTA sends large amounts of SMTP
email to a site that has multiple MX hosts. The insight that led
to the solution, as well as an initial implementation, are due to
Victor Duchovni.
The problem starts when one of a set of MX hosts becomes slower
than the rest. Even though SMTP clients connect to fast and slow
MX hosts with equal probability, the slow MX host ends up with more
simultaneous inbound connections than the faster MX hosts, because
the slow MX host needs more time to serve each client request.
The slow MX host becomes a connection attractor. If one MX host
becomes N times slower than the rest, it dominates mail delivery
latency unless there are more than N fast MX hosts to counter the
effect. And if the number of MX hosts is smaller than N, the mail
delivery latency becomes effectively that of the slowest MX host
divided by the total number of MX hosts.
The solution uses connection caching in a way that differs from
Postfix 2.2. By limiting the amount of time during which a connection
can be used repeatedly (instead of limiting the number of deliveries
over that connection), Postfix not only restores fairness in the
distribution of simultaneous connections across a set of MX hosts,
it also favors deliveries over connections that perform well, which
is exactly what we want.
The smtp_connection_reuse_time_limit feature implements the connection
reuse time limit as discussed above. It limits the amount of time
after which an SMTP connection is no longer stored into the connection
cache. The default limit, 300s, can result in a huge number of
deliveries over a single connection.
This solution will be complete when Postfix logging is updated to
include information about the number of times that a connection was
used. This information is needed to diagnose inter-operability
problems with servers that exhibit bugs when they receive multiple
messages over the same connection.
Major changes - database support
--------------------------------
@ -639,18 +586,17 @@ software.
[Incompat 20051106] The relay=... logging has changed and now
includes the remote SMTP server port number as hostname[hostaddr]:port.
[Incompat 20060112] The Postfix SMTP/LMTP client by default no
longer allows DNS CNAME records to override the server hostname
that is used for logging, SASL password lookup, TLS policy selection
and TLS server certificate verification. Specify
"smtp_cname_overrides_servername = yes" to get the old behavior.
[Incompat 20051105] All delay logging now has sub-second resolution,
including the over-all "delay=nnn" logging. A patch is available
for pflogsumm (pflogsumm-conn-delays-dsn-patch). The qshape script
has been updated (auxiliary/qshape/qshape.pl).
At this point the Postfix logging for a recipient looks like this:
Nov 3 16:04:31 myname postfix/smtp[30840]: 19B6B2900FE:
to=<wietse@test.example.com>, orig_to=<wietse@test>,
relay=mail.example.com[1.2.3.4], conn_use=2, delay=0.22,
delays=0.04/0.01/0.05/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok)
[Feature 20051103] This release makes a beginning with a series of
new attributes in Postfix logfile records.
@ -664,8 +610,9 @@ new attributes in Postfix logfile records.
- Logging of the connection reuse count when SMTP connections are
used for more than one message delivery. This information is
needed because Postfix can now reuse connections hundreds of times
or more, and can help to diagnose inter-operability problems with
servers that suffer from memory leaks or other resource leaks.
or more. Logging of the connection reuse count can help to diagnose
inter-operability problems with servers that suffer from memory
leaks or other resource leaks.
At this point the Postfix logging for a recipient looks like this:
@ -696,6 +643,12 @@ where y and z can be up to three digits each.
Major changes - performance
---------------------------
[Incompat 20050622] The Postfix SMTP client by default limits the
number of MX server addresses to smtp_mx_address_limit=5. Previously
this limit was disabled by default. The new limit prevents Postfix
from spending lots of time trying to connect to lots of bogus MX
servers.
[Feature 20051026] This snapshot addresses a performance stability
problem with remote SMTP servers. The problem is not specific to
Postfix: it can happen when any MTA sends large amounts of SMTP
@ -752,42 +705,41 @@ Major changes - portability
---------------------------
[Incompat 20050716] Internal interfaces have changed; this may break
third-party patches because the text of function argument and result
type definitions has changed. The type of buffer lengths and offsets
were changed from "(unsigned) int" (32 bit on 32-bit and LP64
systems) to "(s)size_t" (64 bit on LP64 systems, 32 bit on 32-bit
systems).
third-party patches because the types of function arguments and of
result values have changed. The types of buffer lengths and offsets
were changed from "int" or "unsigned int" (32 bit on 32-bit and
LP64 systems) to "ssize_t" or "size_t" (64 bit on LP64 systems, 32
bit on 32-bit systems).
Otherwise, this change makes no difference on 32-bit systems. On
LP64 systems, however, software may mis-behave 1) when Postfix is
This change makes no difference in Postfix behavior on 32-bit
systems. On LP64 systems, however, this change not only eliminates
some obscure portability bugs, it also eliminates unnecessary
conversions between 32/64 bit integer types, because many system
library routines take "(s)size_t" arguments or return "(s)size_t"
values.
This change may break software on LP64 systems 1) when Postfix is
linked with pre-compiled code that was compiled with old Postfix
interface definitions and 2) when compiling Postfix source that was
modified by a third-party patch: incorrect code may be generated
modified by a third-party patch: incorrect code will be generated
when the patch passes the wrong integer argument type in contexts
that disable automatic argument type conversions. Examples of such
contexts are formatting with printf-like arguments, and invoking
functions that write Postfix request or reply attributes across
inter-process communication channels. Unfortunately, gcc does not
report "(unsigned) int" versus "(s)size_t" format string argument
mis-matches on 32-bit systems; they can be found only on 64-bit
mis-matches on 32-bit systems; it reports them only on 64-bit
systems.
[Feature 20050716] Improved portability to LP64 systems, by converting
the type of buffer lengths and offsets from "(unsigned) int" to
"(s)size_t". This change has zero effect on 32-bit systems. On
LP64 platforms, however, this change not only eliminates some obscure
portability bugs, it also eliminates unnecessary conversions between
32/64 bit integer types, because many system library routines take
"(s)size_t" arguments or return "(s)size_t" values.
Major changes - safety
----------------------
[Incompat 20051121] The permit_mx_backup feature still accepts mail
for authorized destinations (see permit_mx_backup for definition),
but with other destinations it requires that the local MTA is listed
as non-primary MX. This prevents mail loop problems when someone
points the primary MX record at Postfix.
[Incompat 20051121] Although the permit_mx_backup feature still
accepts mail for authorized destinations (see permit_mx_backup for
definition), with all other destinations it now requires that the
local MTA is listed as non-primary MX. This prevents mail loop
problems when someone points the primary MX record at a Postfix
system.
[Incompat 20051011] The Postfix local(8) delivery agent no longer
updates its idea of the Delivered-To: address while it expands
@ -808,8 +760,17 @@ command (or re-queued with "postsuper -r"), the returned message
is now limited to just the message headers, to avoid the risk of
exposure to harmful content in the message body or attachments.
[Incompat 20051202] The Postfix SMTP daemon will not receive mail
from the network if it isn't running with postfix mail_owner
[Incompat 20051202] The Postfix SMTP server now refuses to receive
mail from the network if it isn't running with postfix mail_owner
privileges. This prevents surprises when, for example, "sendmail
-bs" is configured to run as root from xinetd.
[Incompat 20060123] For safety reasons, Postfix no longer allows
$number substitution in regexp: or pcre: transport tables or
per-sender relayhost tables.
[Incompat 20060112] The Postfix SMTP/LMTP client by default no
longer allows DNS CNAME records to override the server hostname
that is used for logging, SASL password lookup, TLS policy selection
and TLS server certificate verification. Specify
"smtp_cname_overrides_servername = yes" to get the old behavior.

View File

@ -90,7 +90,7 @@ sasl_username=you
sasl_sender=
size=12345
ccert_subject=solaris9.porcupine.org
ccert_issuer=Wietse Venema
ccert_issuer=Wietse+20Venema
ccert_fingerprint=C2:9D:F4:87:71:73:73:D9:18:E7:C2:F3:C1:DA:6E:04
<b>Postfix version 2.3 and later:</b>
encryption_protocol=TLSv1/SSLv3
@ -161,6 +161,9 @@ etrn_domain=
<li> <p> The "ccert_*" attributes (Postfix 2.2 and later) specify
information about how the client was authenticated via TLS.
These attributes are empty in case of no certificate authentication.
As of Postfix 2.2.11 these attribute values are encoded as
xtext: some characters are represented by +XX, where XX is the
two-digit hecadecimal representation of the character value.
</p>
<li> <p> The "encryption_*" attributes (Postfix 2.3 and later)

View File

@ -3528,6 +3528,17 @@ Enable SASL authentication in the Postfix LMTP client.
</p>
</DD>
<DT><b><a name="lmtp_sasl_auth_enforce">lmtp_sasl_auth_enforce</a>
(default: yes)</b></DT><DD>
<p> The LMTP-specific version of the <a href="postconf.5.html#smtp_sasl_auth_enforce">smtp_sasl_auth_enforce</a>
configuration parameter. See there for details. </p>
<p> This feature is available in Postfix 2.3 and later. </p>
</DD>
<DT><b><a name="lmtp_sasl_mechanism_filter">lmtp_sasl_mechanism_filter</a>
@ -7550,6 +7561,18 @@ Example:
</pre>
</DD>
<DT><b><a name="smtp_sasl_auth_enforce">smtp_sasl_auth_enforce</a>
(default: yes)</b></DT><DD>
<p> Defer mail delivery when an SMTP server does not support SASL
authentication, while <a href="postconf.5.html#smtp_sasl_password_maps">smtp_sasl_password_maps</a> contains SASL
login/password information for that server. </p>
<p> This feature is available in Postfix 2.3 and later. </p>
</DD>
<DT><b><a name="smtp_sasl_mechanism_filter">smtp_sasl_mechanism_filter</a>

View File

@ -293,6 +293,12 @@ SMTP(8) SMTP(8)
Available in Postfix version 2.3 and later:
<b><a href="postconf.5.html#smtp_sasl_auth_enforce">smtp_sasl_auth_enforce</a> (yes)</b>
Defer mail delivery when an SMTP server does not
support SASL authentication, while <a href="postconf.5.html#smtp_sasl_password_maps">smtp_sasl_pass</a>-
<a href="postconf.5.html#smtp_sasl_password_maps">word_maps</a> contains SASL login/password information
for that server.
<b><a href="postconf.5.html#smtp_sender_dependent_authentication">smtp_sender_dependent_authentication</a> (no)</b>
Enable sender-dependent authentication in the SMTP
client; this is available only with SASL authenti-

View File

@ -1883,6 +1883,11 @@ Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
The default time unit is s (seconds).
.SH lmtp_sasl_auth_enable (default: no)
Enable SASL authentication in the Postfix LMTP client.
.SH lmtp_sasl_auth_enforce (default: yes)
The LMTP-specific version of the smtp_sasl_auth_enforce
configuration parameter. See there for details.
.PP
This feature is available in Postfix 2.3 and later.
.SH lmtp_sasl_mechanism_filter (default: empty)
The LMTP-specific version of the smtp_sasl_mechanism_filter
configuration parameter. See there for details.
@ -4194,6 +4199,12 @@ smtp_sasl_auth_enable = yes
.fi
.ad
.ft R
.SH smtp_sasl_auth_enforce (default: yes)
Defer mail delivery when an SMTP server does not support SASL
authentication, while smtp_sasl_password_maps contains SASL
login/password information for that server.
.PP
This feature is available in Postfix 2.3 and later.
.SH smtp_sasl_mechanism_filter (default: empty)
If non-empty, a Postfix SMTP client filter for the remote SMTP
server's list of offered SASL mechanisms. Different client and

View File

@ -262,6 +262,10 @@ If non-empty, a Postfix SMTP client filter for the remote SMTP
server's list of offered SASL mechanisms.
.PP
Available in Postfix version 2.3 and later:
.IP "\fBsmtp_sasl_auth_enforce (yes)\fR"
Defer mail delivery when an SMTP server does not support SASL
authentication, while smtp_sasl_password_maps contains SASL
login/password information for that server.
.IP "\fBsmtp_sender_dependent_authentication (no)\fR"
Enable sender-dependent authentication in the SMTP client; this is
available only with SASL authentication, and disables SMTP connection

View File

@ -252,6 +252,7 @@ while (<>) {
s;\blmtp_rcpt_timeout\b;<a href="postconf.5.html#lmtp_rcpt_timeout">$&</a>;g;
s;\blmtp_rset_timeout\b;<a href="postconf.5.html#lmtp_rset_timeout">$&</a>;g;
s;\blmtp_sasl_auth_enable\b;<a href="postconf.5.html#lmtp_sasl_auth_enable">$&</a>;g;
s;\blmtp_sasl_auth_enforce\b;<a href="postconf.5.html#lmtp_sasl_auth_enforce">$&</a>;g;
s;\blmtp_sasl_password_maps\b;<a href="postconf.5.html#lmtp_sasl_password_maps">$&</a>;g;
s;\blmtp_sasl_security_options\b;<a href="postconf.5.html#lmtp_sasl_security_options">$&</a>;g;
s;\blmtp_sasl_type\b;<a href="postconf.5.html#lmtp_sasl_type">$&</a>;g;
@ -418,7 +419,7 @@ while (<>) {
s;\bsmtp_rset_timeout\b;<a href="postconf.5.html#smtp_rset_timeout">$&</a>;g;
s;\bsmtp_sasl_auth_enable\b;<a href="postconf.5.html#smtp_sasl_auth_enable">$&</a>;g;
s;\bsmtp_sasl_mechanism_filter\b;<a href="postconf.5.html#smtp_sasl_mechanism_filter">$&</a>;g;
s;\bsmtp_sasl_password_maps\b;<a href="postconf.5.html#smtp_sasl_password_maps">$&</a>;g;
s;\bsmtp_sasl_pass[-</Bb>]*\n* *[<Bb>]*word_maps\b;<a href="postconf.5.html#smtp_sasl_password_maps">$&</a>;g;
s;\bsmtp_sasl_path\b;<a href="postconf.5.html#smtp_sasl_path">$&</a>;g;
s;\bsmtp_sasl_secu[-</Bb>]*\n* *[<Bb>]*rity_options\b;<a href="postconf.5.html#smtp_sasl_security_options">$&</a>;g;
s;\bsmtp_send_xforward_command\b;<a href="postconf.5.html#smtp_send_xforward_command">$&</a>;g;
@ -524,6 +525,7 @@ while (<>) {
s;\bsmtp_[-</Bb>]*\n* *[<Bb>]*sasl_[-</Bb>]*\n* *[<Bb>]*tls_[-</Bb>]*\n* *[<Bb>]*secu[-</Bb>]*\n* *[<Bb>]*rity_options\b;<a href="postconf.5.html#smtp_sasl_tls_security_options">$&</a>;g;
s;\bsmtp_sasl_tls_verified_secu[-</Bb>]*\n* *[<Bb>]*rity_options\b;<a href="postconf.5.html#smtp_sasl_tls_verified_security_options">$&</a>;g;
s;\bsmtp_sasl_type\b;<a href="postconf.5.html#smtp_sasl_type">$&</a>;g;
s;\bsmtp_sasl_auth_enforce\b;<a href="postconf.5.html#smtp_sasl_auth_enforce">$&</a>;g;
s;\bsmtp_starttls_timeout\b;<a href="postconf.5.html#smtp_starttls_timeout">$&</a>;g;
s;\bsmtp_tls_CAfile\b;<a href="postconf.5.html#smtp_tls_CAfile">$&</a>;g;
s;\bsmtp_tls_CApath\b;<a href="postconf.5.html#smtp_tls_CApath">$&</a>;g;

View File

@ -90,7 +90,7 @@ sasl_username=you
sasl_sender=
size=12345
ccert_subject=solaris9.porcupine.org
ccert_issuer=Wietse Venema
ccert_issuer=Wietse+20Venema
ccert_fingerprint=C2:9D:F4:87:71:73:73:D9:18:E7:C2:F3:C1:DA:6E:04
<b>Postfix version 2.3 and later:</b>
encryption_protocol=TLSv1/SSLv3
@ -161,6 +161,9 @@ etrn_domain=
<li> <p> The "ccert_*" attributes (Postfix 2.2 and later) specify
information about how the client was authenticated via TLS.
These attributes are empty in case of no certificate authentication.
As of Postfix 2.2.11 these attribute values are encoded as
xtext: some characters are represented by +XX, where XX is the
two-digit hecadecimal representation of the character value.
</p>
<li> <p> The "encryption_*" attributes (Postfix 2.3 and later)

View File

@ -10345,3 +10345,18 @@ configuration parameter. See there for details. </p>
configuration parameter. See there for details. </p>
<p> This feature is available in Postfix 2.3 and later. </p>
%PARAM smtp_sasl_auth_enforce yes
<p> Defer mail delivery when an SMTP server does not support SASL
authentication, while smtp_sasl_password_maps contains SASL
login/password information for that server. </p>
<p> This feature is available in Postfix 2.3 and later. </p>
%PARAM lmtp_sasl_auth_enforce yes
<p> The LMTP-specific version of the smtp_sasl_auth_enforce
configuration parameter. See there for details. </p>
<p> This feature is available in Postfix 2.3 and later. </p>

View File

@ -1187,6 +1187,11 @@ static const char *cleanup_milter_eval(const char *name, void *ptr)
{
CLEANUP_STATE *state = (CLEANUP_STATE *) ptr;
/*
* Note: if we use XFORWARD attributes here, then consistency requires
* that we forward all Sendmail macros via XFORWARD.
*/
/*
* Canonicalize the name.
*/

View File

@ -133,15 +133,22 @@ void log_adhoc(const char *id, MSG_STATS *stats, RECIPIENT *recipient,
*
* Don't compute the sdelay (connection setup latency) if there is no time
* stamp for connection setup completion.
*
* XXX Apparently, Solaris gettimeofday() can return out-of-range
* microsecond values.
*/
#define DELTA(x, y, z) \
do { \
(x).dt_sec = (y).tv_sec - (z).tv_sec; \
(x).dt_usec = (y).tv_usec - (z).tv_usec; \
if ((x).dt_usec < 0) { \
while ((x).dt_usec < 0) { \
(x).dt_usec += 1000000; \
(x).dt_sec -= 1; \
} \
while ((x).dt_usec >= 1000000) { \
(x).dt_usec -= 1000000; \
(x).dt_sec += 1; \
} \
if ((x).dt_sec < 0) \
(x).dt_sec = (x).dt_usec = 0; \
} while (0)

View File

@ -1384,6 +1384,10 @@ extern bool var_smtp_sasl_enable;
#define DEF_SMTP_SASL_PASSWD ""
extern char *var_smtp_sasl_passwd;
#define VAR_SMTP_SASL_ENFORCE "smtp_sasl_auth_enforce"
#define DEF_SMTP_SASL_ENFORCE 1
extern bool var_smtp_sasl_enforce;
#define VAR_SMTP_SASL_OPTS "smtp_sasl_security_options"
#define DEF_SMTP_SASL_OPTS "noplaintext, noanonymous"
extern char *var_smtp_sasl_opts;
@ -1479,6 +1483,9 @@ extern bool var_lmtp_sasl_enable;
#define DEF_LMTP_SASL_PASSWD ""
extern char *var_lmtp_sasl_passwd;
#define VAR_LMTP_SASL_ENFORCE "lmtp_sasl_auth_enforce"
#define DEF_LMTP_SASL_ENFORCE 1
#define VAR_LMTP_SASL_OPTS "lmtp_sasl_security_options"
#define DEF_LMTP_SASL_OPTS "noplaintext, noanonymous"
extern char *var_lmtp_sasl_opts;

View File

@ -135,7 +135,7 @@ extern char *mail_pathname(const char *, const char *);
#define MAIL_ATTR_LABEL "label"
#define MAIL_ATTR_PROP "property"
#define MAIL_ATTR_CCERT_SUBJECT "ccert_subject"
#define MAIL_ATTR_CCERT_ISSSUER "ccert_issuer"
#define MAIL_ATTR_CCERT_ISSUER "ccert_issuer"
#define MAIL_ATTR_CCERT_FINGERPRINT "ccert_fingerprint"
#define MAIL_ATTR_CRYPTO_PROTOCOL "encryption_protocol"
#define MAIL_ATTR_CRYPTO_CIPHER "encryption_cipher"

View File

@ -20,8 +20,8 @@
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
#define MAIL_RELEASE_DATE "20060706"
#define MAIL_VERSION_NUMBER "2.3-RC7"
#define MAIL_RELEASE_DATE "20060707"
#define MAIL_VERSION_NUMBER "2.3-RC8"
#define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION MAIL_VERSION_NUMBER

View File

@ -95,5 +95,6 @@
#endif
VAR_LMTP_SENDER_AUTH, DEF_LMTP_SENDER_AUTH, &var_smtp_sender_auth,
VAR_LMTP_CNAME_OVERR, DEF_LMTP_CNAME_OVERR, &var_smtp_cname_overr,
VAR_LMTP_SASL_ENFORCE, DEF_LMTP_SASL_ENFORCE, &var_smtp_sasl_enforce,
0,
};

View File

@ -234,6 +234,10 @@
/* server's list of offered SASL mechanisms.
/* .PP
/* Available in Postfix version 2.3 and later:
/* .IP "\fBsmtp_sasl_auth_enforce (yes)\fR"
/* Defer mail delivery when an SMTP server does not support SASL
/* authentication, while smtp_sasl_password_maps contains SASL
/* login/password information for that server.
/* .IP "\fBsmtp_sender_dependent_authentication (no)\fR"
/* Enable sender-dependent authentication in the SMTP client; this is
/* available only with SASL authentication, and disables SMTP connection
@ -691,6 +695,7 @@ bool var_smtp_sender_auth;
char *var_lmtp_tcp_port;
int var_scache_proto_tmout;
bool var_smtp_cname_overr;
bool var_smtp_sasl_enforce;
/*
* Global variables.

View File

@ -99,5 +99,6 @@
#endif
VAR_SMTP_SENDER_AUTH, DEF_SMTP_SENDER_AUTH, &var_smtp_sender_auth,
VAR_SMTP_CNAME_OVERR, DEF_SMTP_CNAME_OVERR, &var_smtp_cname_overr,
VAR_SMTP_SASL_ENFORCE, DEF_SMTP_SASL_ENFORCE, &var_smtp_sasl_enforce,
0,
};

View File

@ -600,6 +600,15 @@ int smtp_helo(SMTP_STATE *state)
#ifdef USE_SASL_AUTH
if (var_smtp_sasl_enable && (session->features & SMTP_FEATURE_AUTH))
return (smtp_sasl_helo_login(state));
else if (var_smtp_sasl_enable
&& *var_smtp_sasl_passwd
&& var_smtp_sasl_enforce
&& smtp_sasl_passwd_lookup(session) != 0)
return (smtp_site_fail(state, DSN_BY_LOCAL_MTA,
SMTP_RESP_FAKE(&fake, "4.7.0"),
"SASL login/password exists, but host %s "
"does not announce SASL authentication support",
session->namaddr));
#endif
return (0);

View File

@ -286,6 +286,7 @@ smtpd_check.o: ../../include/vbuf.h
smtpd_check.o: ../../include/verify_clnt.h
smtpd_check.o: ../../include/vstream.h
smtpd_check.o: ../../include/vstring.h
smtpd_check.o: ../../include/xtext.h
smtpd_check.o: smtpd.h
smtpd_check.o: smtpd_check.c
smtpd_check.o: smtpd_check.h

View File

@ -236,6 +236,7 @@
#include <valid_mailhost_addr.h>
#include <dsn_util.h>
#include <conv_time.h>
#include <xtext.h>
/* Application-specific. */
@ -3251,6 +3252,15 @@ static int check_policy_service(SMTPD_STATE *state, const char *server,
static VSTRING *action = 0;
ATTR_CLNT *policy_clnt;
#ifdef USE_TLS
VSTRING *subject_buf;
VSTRING *issuer_buf;
const char *subject;
const char *issuer;
#endif
int ret;
/*
* Sanity check.
*/
@ -3265,6 +3275,23 @@ static int check_policy_service(SMTPD_STATE *state, const char *server,
if (action == 0)
action = vstring_alloc(10);
#ifdef USE_TLS
#define ENCODE_CN(coded_CN, coded_CN_buf, CN) do { \
if (state->tls_context == 0 \
|| state->tls_context->peer_verified == 0 || (CN) == 0) { \
coded_CN_buf = 0; \
coded_CN = ""; \
} else { \
coded_CN_buf = vstring_alloc(strlen(CN)); \
xtext_quote(coded_CN_buf, CN, ""); \
coded_CN = STR(coded_CN_buf); \
} \
} while (0);
ENCODE_CN(subject, subject_buf, state->tls_context->peer_CN);
ENCODE_CN(issuer, issuer_buf, state->tls_context->issuer_CN);
#endif
if (attr_clnt_request(policy_clnt,
ATTR_FLAG_NONE, /* Query attributes. */
ATTR_TYPE_STR, MAIL_ATTR_REQ, "smtpd_access_policy",
@ -3308,10 +3335,8 @@ static int check_policy_service(SMTPD_STATE *state, const char *server,
#define IF_VERIFIED(x) \
((state->tls_context && \
state->tls_context->peer_verified && ((x) != 0)) ? (x) : "")
ATTR_TYPE_STR, MAIL_ATTR_CCERT_SUBJECT,
IF_VERIFIED(state->tls_context->peer_CN),
ATTR_TYPE_STR, MAIL_ATTR_CCERT_ISSSUER,
IF_VERIFIED(state->tls_context->issuer_CN),
ATTR_TYPE_STR, MAIL_ATTR_CCERT_SUBJECT, subject,
ATTR_TYPE_STR, MAIL_ATTR_CCERT_ISSUER, issuer,
ATTR_TYPE_STR, MAIL_ATTR_CCERT_FINGERPRINT,
IF_VERIFIED(state->tls_context->peer_fingerprint),
#define IF_ENCRYPTED(x, y) ((state->tls_context && ((x) != 0)) ? (x) : (y))
@ -3326,19 +3351,26 @@ static int check_policy_service(SMTPD_STATE *state, const char *server,
ATTR_FLAG_MISSING, /* Reply attributes. */
ATTR_TYPE_STR, MAIL_ATTR_ACTION, action,
ATTR_TYPE_END) != 1) {
return (smtpd_check_reject(state, MAIL_ERROR_POLICY,
ret = smtpd_check_reject(state, MAIL_ERROR_POLICY,
451, "4.3.5",
"Server configuration problem"));
"Server configuration problem");
} else {
/*
* XXX This produces bogus error messages when the reply is
* malformed.
*/
return (check_table_result(state, server, STR(action),
ret = check_table_result(state, server, STR(action),
"policy query", reply_name,
reply_class, def_acl));
reply_class, def_acl);
}
#ifdef USE_TLS
if (subject_buf)
vstring_free(subject_buf);
if (issuer_buf)
vstring_free(issuer_buf);
#endif
return (ret);
}
/* is_map_command - restriction has form: check_xxx_access type:name */

View File

@ -138,6 +138,15 @@ void smtpd_peer_init(SMTPD_STATE *state)
/*
* Look up the peer address information.
*
* XXX If we make local endpoint (getsockname) information available to
* Milter applications as {if_name} and {if_addr}, then we also must be
* able to provide this via the XCLIENT command for Milter testing.
*
* XXX If support were to be added for Milter applications in down-stream
* MTAs, then consistency demands that we propagate a lot of Sendmail
* macro information via the XFORWARD command. Otherwise we could end up
* with a very confusing situation.
*/
if (getpeername(vstream_fileno(state->client), sa, &sa_length) >= 0) {
errno = 0;