]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.12-20260429
authorWietse Z Venema <wietse@porcupine.org>
Wed, 29 Apr 2026 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Fri, 1 May 2026 06:47:23 +0000 (16:47 +1000)
52 files changed:
postfix/.indent.pro
postfix/HISTORY
postfix/html/lmtp.8.html
postfix/html/postconf.5.html
postfix/html/postscreen.8.html
postfix/html/smtp.8.html
postfix/html/smtpd.8.html
postfix/makedefs
postfix/man/man5/postconf.5
postfix/man/man8/postscreen.8
postfix/man/man8/smtp.8
postfix/man/man8/smtpd.8
postfix/mantools/postlink
postfix/proto/postconf.proto
postfix/proto/stop
postfix/proto/stop.double-history
postfix/proto/stop.double-proto-html
postfix/src/global/Makefile.in
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/global/yana_policy.c [new file with mode: 0644]
postfix/src/global/yana_policy.h [new file with mode: 0644]
postfix/src/global/yana_policy_test.c [new file with mode: 0644]
postfix/src/postscreen/Makefile.in
postfix/src/postscreen/postscreen.c
postfix/src/postscreen/postscreen.h
postfix/src/postscreen/postscreen_dnsbl_test.c
postfix/src/postscreen/postscreen_starttls.c
postfix/src/postscreen/postscreen_state.c
postfix/src/postscreen/postscreen_tls_conf.c
postfix/src/posttls-finger/posttls-finger.c
postfix/src/smtp/Makefile.in
postfix/src/smtp/lmtp_params.c
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp.h
postfix/src/smtp/smtp_params.c
postfix/src/smtp/smtp_proto.c
postfix/src/smtpd/Makefile.in
postfix/src/smtpd/smtpd.c
postfix/src/testing/mock_myaddrinfo_test.c
postfix/src/tls/tls.h
postfix/src/tls/tls_client.c
postfix/src/tls/tls_misc.c
postfix/src/tls/tls_proxy_client_init_proto.c
postfix/src/tls/tls_proxy_client_param_proto.c
postfix/src/tls/tls_proxy_client_start_proto.c
postfix/src/tls/tls_proxy_client_start_proto.h
postfix/src/tls/tls_proxy_server_start_proto.c
postfix/src/tls/tls_proxy_server_start_proto.h
postfix/src/tls/tls_server.c
postfix/src/util/sys_defs.h
postfix/src/util/wrap_netdb.c

index ff511fea19b43defa1a5ad0e8056277c454b0dc6..9ece20998e1acaab808392289b3109a96d6e8364 100644 (file)
 -TXSASL_SERVER_CREATE_ARGS
 -TXSASL_SERVER_IMPL
 -TXSASL_SERVER_IMPL_INFO
+-TYANA_POLICY
 -Taddrinfo
 -Tbind_props
 -Tbson_iter_t
index 0af1781dbd5b976ab1329ff2c54174cf0c87b440..c302bc772855a046939118a38163ba7b83cfaa31 100644 (file)
@@ -31014,6 +31014,40 @@ Apologies for any names omitted.
        value in the configuration parameter dictionary. File:
        global/mail_params.c.
 
+20260426
+
+       Portability: support for recent FreeBSD, NetBSD and OpenBSD
+       versions. Brad Smith. Files: makedefs, util/sys_defs.h.
+
+       Future proofing: eliminate duplicate makedefs sections for
+       similar OS versions, and reduce OS version toil. Major OS
+       versions still need to be blessed in <sys_defs.h>. File:
+       makedefs.
+
+20260428
+
+       Feature: per-peer TLS logging support, configurable with
+       smtp_tls_loglevel_maps, smtpd_tls_loglevel_maps, and
+       postscreen_tls_loglevel_maps. This adds two arguments to
+       each tls_client_start() and tls_server_start() call. Files:
+       mantools/postlink, proto/postconf.proto, global/mail_params.h,
+       global/yana_policy.c, global/yana_policy.h,
+       global/yana_policy_test.c postscreen/postscreen.c,
+       postscreen/postscreen.h, postscreen/postscreen_starttls.c,
+       postscreen/postscreen_state.c, postscreen/postscreen_tls_conf.c,
+       posttls-finger/posttls-finger.c, smtp/smtp.c, smtp/smtp.h,
+       smtp/smtp_proto.c, smtpd/smtpd.c, tls/tls_client.c, tls/tls.h,
+       tls/tls_misc.c, tls/tls_proxy_client_start_proto.[hc],
+       tls/tls_proxy_server_start_proto.[hc], tls/tls_server.c.
+
+       Next up is replacing a large number of "[%s]:%s" format strings
+       in postscreen code.
+
+20240629
+
+       Testing: portability. Files: postscreen/postscreen_dnsbl_test.c,
+       testing/mock_myaddrinfo_test.c.
+
 TODO
 
        Reorganize PTEST_LIB, PMOCK_LIB, TESTLIB, TESTLIBS, etc.
index a0bebb0e376f074db46fe3046c3eb9e8e543aa8a..04e8ed84aae63c15af79c935853bcf461d545c25 100644 (file)
@@ -788,41 +788,47 @@ SMTP(8)                                                                SMTP(8)
               Enable  logging  of  TLS  feature information in delivery status
               logging.
 
+       Available in Postfix version 3.12 and later:
+
+       <b><a href="postconf.5.html#smtp_tls_loglevel_maps">smtp_tls_loglevel_maps</a> (empty)</b>
+              Optional TLS loglevel override that depends on the  remote  peer
+              host name or IP address.
+
 <b><a name="obsolete_tls_controls">OBSOLETE TLS CONTROLS</a></b>
-       The following configuration parameters  exist  for  compatibility  with
-       Postfix  versions  before  2.3.  Support for these will be removed in a
+       The  following  configuration  parameters  exist for compatibility with
+       Postfix versions before 2.3. Support for these will  be  removed  in  a
        future release.
 
        <b><a href="postconf.5.html#smtp_use_tls">smtp_use_tls</a> (no)</b>
-              Opportunistic mode: use TLS when a remote SMTP server  announces
+              Opportunistic  mode: use TLS when a remote SMTP server announces
               STARTTLS support, otherwise send the mail in the clear.
 
        <b><a href="postconf.5.html#smtp_enforce_tls">smtp_enforce_tls</a> (no)</b>
-              Enforcement  mode:  require  that  remote  SMTP  servers use TLS
+              Enforcement mode: require  that  remote  SMTP  servers  use  TLS
               encryption, and never send mail in the clear.
 
        <b><a href="postconf.5.html#smtp_tls_enforce_peername">smtp_tls_enforce_peername</a> (yes)</b>
-              With mandatory TLS encryption,  require  that  the  remote  SMTP
-              server  hostname  matches  the  information  in  the remote SMTP
+              With  mandatory  TLS  encryption,  require  that the remote SMTP
+              server hostname matches  the  information  in  the  remote  SMTP
               server certificate.
 
        <b><a href="postconf.5.html#smtp_tls_per_site">smtp_tls_per_site</a> (empty)</b>
-              Optional lookup tables with the Postfix SMTP  client  TLS  usage
-              policy  by  next-hop destination and by remote SMTP server host-
+              Optional  lookup  tables  with the Postfix SMTP client TLS usage
+              policy by next-hop destination and by remote SMTP  server  host-
               name.
 
        <b><a href="postconf.5.html#smtp_tls_cipherlist">smtp_tls_cipherlist</a> (empty)</b>
-              Obsolete Postfix &lt; 2.3 control for the Postfix SMTP  client  TLS
+              Obsolete  Postfix  &lt; 2.3 control for the Postfix SMTP client TLS
               cipher list.
 
 <b><a name="resource_and_rate_controls">RESOURCE AND RATE CONTROLS</a></b>
        <b><a href="postconf.5.html#smtp_connect_timeout">smtp_connect_timeout</a> (30s)</b>
-              The  Postfix SMTP client time limit for completing a TCP connec-
+              The Postfix SMTP client time limit for completing a TCP  connec-
               tion, or zero (use the operating system built-in time limit).
 
        <b><a href="postconf.5.html#smtp_helo_timeout">smtp_helo_timeout</a> (300s)</b>
-              The Postfix SMTP client time limit for sending the HELO or  EHLO
-              command,  and  for  receiving  the  initial  remote  SMTP server
+              The  Postfix SMTP client time limit for sending the HELO or EHLO
+              command, and  for  receiving  the  initial  remote  SMTP  server
               response.
 
        <b><a href="postconf.5.html#lmtp_lhlo_timeout">lmtp_lhlo_timeout</a> (300s)</b>
@@ -834,19 +840,19 @@ SMTP(8)                                                                SMTP(8)
               mand, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_mail_timeout">smtp_mail_timeout</a> (300s)</b>
-              The Postfix SMTP client time limit for  sending  the  MAIL  FROM
+              The  Postfix  SMTP  client  time limit for sending the MAIL FROM
               command, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_rcpt_timeout">smtp_rcpt_timeout</a> (300s)</b>
-              The  Postfix SMTP client time limit for sending the SMTP RCPT TO
+              The Postfix SMTP client time limit for sending the SMTP RCPT  TO
               command, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_data_init_timeout">smtp_data_init_timeout</a> (120s)</b>
-              The Postfix SMTP client time limit for  sending  the  SMTP  DATA
+              The  Postfix  SMTP  client  time limit for sending the SMTP DATA
               command, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_data_xfer_timeout">smtp_data_xfer_timeout</a> (180s)</b>
-              The  Postfix SMTP client time limit for sending the SMTP message
+              The Postfix SMTP client time limit for sending the SMTP  message
               content.
 
        <b><a href="postconf.5.html#smtp_data_done_timeout">smtp_data_done_timeout</a> (600s)</b>
@@ -860,13 +866,13 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtp_mx_address_limit">smtp_mx_address_limit</a> (5)</b>
-              The maximal number of MX (mail exchanger) IP addresses that  can
-              result  from Postfix SMTP client mail exchanger lookups, or zero
+              The  maximal number of MX (mail exchanger) IP addresses that can
+              result from Postfix SMTP client mail exchanger lookups, or  zero
               (no limit).
 
        <b><a href="postconf.5.html#smtp_mx_session_limit">smtp_mx_session_limit</a> (2)</b>
-              The maximal number of SMTP sessions per delivery request  before
-              the  Postfix  SMTP  client  gives  up or delivers to a fall-back
+              The  maximal number of SMTP sessions per delivery request before
+              the Postfix SMTP client gives up  or  delivers  to  a  fall-back
               <a href="postconf.5.html#relayhost">relay host</a>, or zero (no limit).
 
        <b><a href="postconf.5.html#smtp_rset_timeout">smtp_rset_timeout</a> (20s)</b>
@@ -876,17 +882,17 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.2 and earlier:
 
        <b><a href="postconf.5.html#lmtp_cache_connection">lmtp_cache_connection</a> (yes)</b>
-              Keep  Postfix  LMTP  client connections open for up to $<a href="postconf.5.html#max_idle">max_idle</a>
+              Keep Postfix LMTP client connections open for  up  to  $<a href="postconf.5.html#max_idle">max_idle</a>
               seconds.
 
        Available in Postfix version 2.2 and later:
 
        <b><a href="postconf.5.html#smtp_connection_cache_destinations">smtp_connection_cache_destinations</a> (empty)</b>
-              Permanently enable SMTP connection  caching  for  the  specified
+              Permanently  enable  SMTP  connection  caching for the specified
               destinations.
 
        <b><a href="postconf.5.html#smtp_connection_cache_on_demand">smtp_connection_cache_on_demand</a> (yes)</b>
-              Temporarily  enable  SMTP connection caching while a destination
+              Temporarily enable SMTP connection caching while  a  destination
               has a high volume of mail in the <a href="QSHAPE_README.html#active_queue">active queue</a>.
 
        <b><a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> (300s)</b>
@@ -900,23 +906,23 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.3 and later:
 
        <b><a href="postconf.5.html#connection_cache_protocol_timeout">connection_cache_protocol_timeout</a> (5s)</b>
-              Time limit for connection cache connect, send or receive  opera-
+              Time  limit for connection cache connect, send or receive opera-
               tions.
 
        Available in Postfix version 2.9 - 3.6:
 
        <b><a href="postconf.5.html#smtp_per_record_deadline">smtp_per_record_deadline</a> (no)</b>
-              Change  the  behavior  of the smtp_*_timeout time limits, from a
-              time limit per read or write system call, to  a  time  limit  to
-              send  or  receive  a complete record (an SMTP command line, SMTP
-              response line, SMTP message content line, or TLS  protocol  mes-
+              Change the behavior of the smtp_*_timeout time  limits,  from  a
+              time  limit  per  read  or write system call, to a time limit to
+              send or receive a complete record (an SMTP  command  line,  SMTP
+              response  line,  SMTP message content line, or TLS protocol mes-
               sage).
 
        Available in Postfix version 2.11 and later:
 
        <b><a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a> (0)</b>
-              When  SMTP  connection  caching  is enabled, the number of times
-              that an SMTP session may be reused before it is closed, or  zero
+              When SMTP connection caching is enabled,  the  number  of  times
+              that  an SMTP session may be reused before it is closed, or zero
               (no limit).
 
        Available in Postfix version 3.4 and later:
@@ -927,13 +933,13 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 3.7 and later:
 
        <b><a href="postconf.5.html#smtp_per_request_deadline">smtp_per_request_deadline</a> (no)</b>
-              Change  the  behavior  of the smtp_*_timeout time limits, from a
-              time limit per plaintext or TLS read or write call,  to  a  com-
-              bined  time  limit  for  sending a complete SMTP request and for
+              Change the behavior of the smtp_*_timeout time  limits,  from  a
+              time  limit  per  plaintext or TLS read or write call, to a com-
+              bined time limit for sending a complete  SMTP  request  and  for
               receiving a complete SMTP response.
 
        <b><a href="postconf.5.html#smtp_min_data_rate">smtp_min_data_rate</a> (500)</b>
-              The minimum plaintext data transfer  rate  in  bytes/second  for
+              The  minimum  plaintext  data  transfer rate in bytes/second for
               DATA    requests,    when    deadlines    are    enabled    with
               <a href="postconf.5.html#smtp_per_request_deadline">smtp_per_request_deadline</a>.
 
@@ -941,54 +947,54 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#transport_destination_concurrency_limit">transport_destination_concurrency_limit</a>   ($<a href="postconf.5.html#default_destination_concurrency_limit">default_destination_concur</a>-</b>
        <b><a href="postconf.5.html#default_destination_concurrency_limit">rency_limit</a>)</b>
-              A transport-specific override for  the  <a href="postconf.5.html#default_destination_concurrency_limit">default_destination_con</a>-
+              A  transport-specific  override for the <a href="postconf.5.html#default_destination_concurrency_limit">default_destination_con</a>-
               <a href="postconf.5.html#default_destination_concurrency_limit">currency_limit</a> parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
               name of the message delivery transport.
 
        <b><a href="postconf.5.html#transport_destination_recipient_limit">transport_destination_recipient_limit</a>     ($<a href="postconf.5.html#default_destination_recipient_limit">default_destination_recipi</a>-</b>
        <b><a href="postconf.5.html#default_destination_recipient_limit">ent_limit</a>)</b>
               A transport-specific override for the <a href="postconf.5.html#default_destination_recipient_limit">default_destination_recip</a>-
-              <a href="postconf.5.html#default_destination_recipient_limit">ient_limit</a>  parameter  value,  where  <i>transport</i> is the <a href="master.5.html">master.cf</a>
+              <a href="postconf.5.html#default_destination_recipient_limit">ient_limit</a> parameter value, where  <i>transport</i>  is  the  <a href="master.5.html">master.cf</a>
               name of the message delivery transport.
 
 <b><a name="smtputf8_controls">SMTPUTF8 CONTROLS</a></b>
        Preliminary SMTPUTF8 support is introduced with Postfix 3.0.
 
        <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
-              Enable preliminary SMTPUTF8 support for the protocols  described
+              Enable  preliminary SMTPUTF8 support for the protocols described
               in <a href="https://tools.ietf.org/html/rfc6531">RFC 6531</a>, <a href="https://tools.ietf.org/html/rfc6532">RFC 6532</a>, and <a href="https://tools.ietf.org/html/rfc6533">RFC 6533</a>.
 
        <b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
-              Detect  that  a message requires SMTPUTF8 support for the speci-
+              Detect that a message requires SMTPUTF8 support for  the  speci-
               fied mail origin classes.
 
        Available in Postfix version 3.2 and later:
 
        <b><a href="postconf.5.html#enable_idna2003_compatibility">enable_idna2003_compatibility</a> (no)</b>
-              Enable  'transitional'  compatibility   between   IDNA2003   and
-              IDNA2008,  when  converting UTF-8 domain names to/from the ASCII
+              Enable   'transitional'   compatibility   between  IDNA2003  and
+              IDNA2008, when converting UTF-8 domain names to/from  the  ASCII
               form that is used for DNS lookups.
 
 <b><a name="trouble_shooting_controls">TROUBLE SHOOTING CONTROLS</a></b>
        <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
-              The increment in verbose logging level when a  nexthop  destina-
-              tion,  remote client or server name or network address matches a
+              The  increment  in verbose logging level when a nexthop destina-
+              tion, remote client or server name or network address matches  a
               pattern given with the <a href="postconf.5.html#debug_peer_list">debug_peer_list</a> parameter.
 
        <b><a href="postconf.5.html#debug_peer_list">debug_peer_list</a> (empty)</b>
-              Optional list of nexthop destination, remote  client  or  server
-              name  or  network  address  patterns that, if matched, cause the
-              verbose logging level to increase by  the  amount  specified  in
+              Optional  list  of  nexthop destination, remote client or server
+              name or network address patterns that,  if  matched,  cause  the
+              verbose  logging  level  to  increase by the amount specified in
               $<a href="postconf.5.html#debug_peer_level">debug_peer_level</a>.
 
        <b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
-              The  recipient  of  postmaster notifications about mail delivery
+              The recipient of postmaster notifications  about  mail  delivery
               problems that are caused by policy, resource, software or proto-
               col errors.
 
        <b><a href="postconf.5.html#internal_mail_filter_classes">internal_mail_filter_classes</a> (empty)</b>
-              What   categories  of  Postfix-generated  mail  are  subject  to
-              before-queue   content    inspection    by    <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
+              What  categories  of  Postfix-generated  mail  are  subject   to
+              before-queue    content    inspection    by   <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
               <a href="postconf.5.html#header_checks">header_checks</a> and <a href="postconf.5.html#body_checks">body_checks</a>.
 
        <b><a href="postconf.5.html#notify_classes">notify_classes</a> (resource, software)</b>
@@ -996,46 +1002,46 @@ SMTP(8)                                                                SMTP(8)
 
 <b><a name="miscellaneous_controls">MISCELLANEOUS CONTROLS</a></b>
        <b><a href="postconf.5.html#best_mx_transport">best_mx_transport</a> (empty)</b>
-              Where  the  Postfix  SMTP  client  should  deliver  mail when it
+              Where the Postfix  SMTP  client  should  deliver  mail  when  it
               detects a "mail loops back to myself" error condition.
 
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The default location of the Postfix <a href="postconf.5.html">main.cf</a> and  <a href="master.5.html">master.cf</a>  con-
+              The  default  location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
               figuration files.
 
        <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
-              How  much  time  a  Postfix  daemon process may take to handle a
+              How much time a Postfix daemon process  may  take  to  handle  a
               request before it is terminated by a built-in watchdog timer.
 
        <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
-              The maximal number of digits after the decimal point  when  log-
+              The  maximal  number of digits after the decimal point when log-
               ging delay values.
 
        <b><a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> (no)</b>
               Disable DNS lookups in the Postfix SMTP and LMTP clients.
 
        <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> (all)</b>
-              The  local  network  interface  addresses  that this mail system
+              The local network interface  addresses  that  this  mail  system
               receives mail on.
 
        <b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (see 'postconf -d' output)</b>
-              The Internet protocols Postfix will attempt to use  when  making
+              The  Internet  protocols Postfix will attempt to use when making
               or accepting connections.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
-              The  time  limit  for  sending  or receiving information over an
+              The time limit for sending  or  receiving  information  over  an
               internal communication channel.
 
        <b><a href="postconf.5.html#lmtp_assume_final">lmtp_assume_final</a> (no)</b>
-              When a remote LMTP server announces no DSN support, assume  that
-              the  server performs final delivery, and send "delivered" deliv-
+              When  a remote LMTP server announces no DSN support, assume that
+              the server performs final delivery, and send "delivered"  deliv-
               ery status notifications instead of "relayed".
 
        <b><a href="postconf.5.html#lmtp_tcp_port">lmtp_tcp_port</a> (24)</b>
               The default TCP port that the Postfix LMTP client connects to.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The maximum amount of time that an idle Postfix  daemon  process
+              The  maximum  amount of time that an idle Postfix daemon process
               waits for an incoming connection before terminating voluntarily.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
@@ -1049,21 +1055,21 @@ SMTP(8)                                                                SMTP(8)
               The process name of a Postfix command or daemon process.
 
        <b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> (empty)</b>
-              The  remote  network  interface  addresses that this mail system
-              receives mail on by way of a proxy or network  address  transla-
+              The remote network interface addresses  that  this  mail  system
+              receives  mail  on by way of a proxy or network address transla-
               tion unit.
 
        <b><a href="postconf.5.html#smtp_address_preference">smtp_address_preference</a> (any)</b>
               The address type ("ipv6", "ipv4" or "any") that the Postfix SMTP
-              client will try first, when a  destination  has  IPv6  and  IPv4
+              client  will  try  first,  when  a destination has IPv6 and IPv4
               addresses with equal MX preference.
 
        <b><a href="postconf.5.html#smtp_bind_address">smtp_bind_address</a> (empty)</b>
-              An  optional  numerical  network  address  that the Postfix SMTP
+              An optional numerical network  address  that  the  Postfix  SMTP
               client should bind to when making an IPv4 connection.
 
        <b><a href="postconf.5.html#smtp_bind_address6">smtp_bind_address6</a> (empty)</b>
-              An optional numerical network  address  that  the  Postfix  SMTP
+              An  optional  numerical  network  address  that the Postfix SMTP
               client should bind to when making an IPv6 connection.
 
        <b><a href="postconf.5.html#smtp_helo_name">smtp_helo_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
@@ -1083,7 +1089,7 @@ SMTP(8)                                                                SMTP(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              A prefix that  is  prepended  to  the  process  name  in  syslog
+              A  prefix  that  is  prepended  to  the  process  name in syslog
               records, so that, for example, "smtpd" becomes "prefix/smtpd".
 
        Available with Postfix 2.2 and earlier:
@@ -1095,14 +1101,14 @@ SMTP(8)                                                                SMTP(8)
        Available with Postfix 2.3 and later:
 
        <b><a href="postconf.5.html#smtp_fallback_relay">smtp_fallback_relay</a> ($<a href="postconf.5.html#fallback_relay">fallback_relay</a>)</b>
-              Optional list of relay destinations that will be  used  when  an
-              SMTP  destination  is not found, or when delivery fails due to a
+              Optional  list  of  relay destinations that will be used when an
+              SMTP destination is not found, or when delivery fails due  to  a
               non-permanent error.
 
        Available with Postfix 3.0 and later:
 
        <b><a href="postconf.5.html#smtp_address_verify_target">smtp_address_verify_target</a> (rcpt)</b>
-              In the context of email address verification, the SMTP  protocol
+              In  the context of email address verification, the SMTP protocol
               stage that determines whether an email address is deliverable.
 
        Available with Postfix 3.1 and later:
@@ -1124,7 +1130,7 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix 3.7 and later:
 
        <b><a href="postconf.5.html#smtp_bind_address_enforce">smtp_bind_address_enforce</a> (no)</b>
-              Defer delivery when the Postfix SMTP  client  cannot  apply  the
+              Defer  delivery  when  the  Postfix SMTP client cannot apply the
               <a href="postconf.5.html#smtp_bind_address">smtp_bind_address</a> or <a href="postconf.5.html#smtp_bind_address6">smtp_bind_address6</a> setting.
 
 <b><a name="see_also">SEE ALSO</a></b>
index 71b2b9e06e2e8eff3f8730441066b0b095066570..b3cf3373c4172815181db6dd859ffd7612031737 100644 (file)
@@ -5974,6 +5974,16 @@ 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_tls_loglevel_maps">lmtp_tls_loglevel_maps</a>
+(default: $<a href="postconf.5.html#smtp_tls_loglevel_maps">smtp_tls_loglevel_maps</a>)</b></DT><DD>
+
+<p> The <a href="lmtp.8.html">lmtp(8)</a> equivalent of <a href="postconf.5.html#smtp_tls_loglevel_maps">smtp_tls_loglevel_maps</a>. </p>
+
+<p> This feature is available in Postfix 3.12 and later. </p>
+
+
 </DD>
 
 <DT><b><a name="lmtp_tls_mandatory_ciphers">lmtp_tls_mandatory_ciphers</a>
@@ -9827,6 +9837,18 @@ further details. </p>
 <p> This feature is available in Postfix 3.12 and later. </p>
 
 
+</DD>
+
+<DT><b><a name="postscreen_tls_loglevel_maps">postscreen_tls_loglevel_maps</a>
+(default: $<a href="postconf.5.html#smtpd_tls_loglevel_maps">smtpd_tls_loglevel_maps</a>)</b></DT><DD>
+
+<p> Optional TLS loglevel override that depends on the remote peer
+host name or IP address. See <a href="postconf.5.html#smtp_tls_loglevel_maps">smtp_tls_loglevel_maps</a> for a detailed
+description.
+
+<p> This feature is available in Postfix 3.12 and later. </p>
+
+
 </DD>
 
 <DT><b><a name="postscreen_tls_mandatory_ciphers">postscreen_tls_mandatory_ciphers</a>
@@ -14986,6 +15008,83 @@ problems. Use of loglevel 4 is strongly discouraged. </p>
 <p> This feature is available in Postfix 2.2 and later.  </p>
 
 
+</DD>
+
+<DT><b><a name="smtp_tls_loglevel_maps">smtp_tls_loglevel_maps</a>
+(default: empty)</b></DT><DD>
+
+<p> Optional TLS loglevel override that depends on the remote peer
+host name or IP address. The text below also covers <a href="postconf.5.html#smtpd_tls_loglevel_maps">smtpd_tls_loglevel_maps</a>
+and <a href="postconf.5.html#postscreen_tls_loglevel_maps">postscreen_tls_loglevel_maps</a>. </p>
+
+<p> Specify zero or more lookup tables separated by comma or
+whitespace. The table syntax is as follows: <p>
+
+<ul>
+
+<li> <p> On the left-hand side, specify a domain name, IPv4 or IPv6
+network address, or a substring pattern as described below. An
+internationalized domain name MUST be in A-label form (xn--mumble).
+An IPv4 address MUST be in dotted-quad form; an IPv6 address MUST
+be in compressed form (text::text). Do not enclose any of these
+inputs with "[" and "]". </p>
+
+<li> <p> On the right-hand side, specify a valid TLS loglevel value,
+or "DUNNO" for a "quick exit" as described below. </p>
+
+</ul>
+
+<p> The over-all search strategy is as follows: </p>
+
+<ul>
+
+<li> <p> Look up the peer name in all specified lookup tables, and
+stop at the first match. If no match was found, this may be followed
+by substring lookups as described below. Note: peer name lookup is
+not applicable for <a href="postscreen.8.html">postscreen(8)</a> because that service does not have
+the remote SMTP client name. </p>
+
+<li> <p> If no peer name match is found, look up the peer IP address
+in all specified lookup tables, and stop at the first match. If no
+match was found, this may be followed by substring lookups as
+described below. </p>
+
+<li> <p> If any lookup result returns "DUNNO", terminate the search
+and pretend that no name match and no address match were found.
+</p>
+
+</ul>
+
+<p> This feature may generate substring queries for a fixed-string
+lookup table (examples: <a href="DATABASE_README.html#types">hash</a>:, <a href="lmdb_table.5.html">lmdb</a>:, <a href="pgsql_table.5.html">pgsql</a>:). Substring queries
+do not happen with <a href="regexp_table.5.html">regexp</a>:, <a href="pcre_table.5.html">pcre</a>:, and <a href="cidr_table.5.html">cidr</a>: tables. </p>
+
+<ul>
+
+<li> <p> By default, after all table queries with a full domain
+name (example: "mail.example.com") produce "not found", the next
+queries will use the parent domains with '.' prepended (examples:
+".example.com" and ".com") until a match is found or until all
+substrings have been tried. </p>
+
+<li> <p> To generate domain name substring queries without the
+leading '.' (examples: "example.com" and "com"), specify the
+applicable configuration parameter name ("smtpd_tls_policy_maps",
+"<a href="postconf.5.html#smtp_tls_policy_maps">smtp_tls_policy_maps</a>", or "postscreen_tls_policy_maps") in the
+<a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a> parameter value. </p>
+
+<li> <p> After all table queries with a full IP address produce
+"not found", the next queries will use subnetworks, by repeatedly
+removing the last ".text" component from a dotted-quad IPv4 address,
+or the last ":text" component from a compressed-form IPv6 address,
+until a match is found or until all subnetworks have been tried.
+</p>
+
+</ul>
+
+<p> This feature is available in Postfix 3.12 and later. </p>
+
+
 </DD>
 
 <DT><b><a name="smtp_tls_mandatory_ciphers">smtp_tls_mandatory_ciphers</a>
@@ -20504,6 +20603,18 @@ of problems. Use of loglevel 4 is strongly discouraged. </p>
 <p> This feature is available in Postfix 2.2 and later.  </p>
 
 
+</DD>
+
+<DT><b><a name="smtpd_tls_loglevel_maps">smtpd_tls_loglevel_maps</a>
+(default: empty)</b></DT><DD>
+
+<p> Optional TLS loglevel override that depends on the remote peer
+host name or IP address. See <a href="postconf.5.html#smtp_tls_loglevel_maps">smtp_tls_loglevel_maps</a> for a detailed
+description.
+
+<p> This feature is available in Postfix 3.12 and later. </p>
+
+
 </DD>
 
 <DT><b><a name="smtpd_tls_mandatory_ciphers">smtpd_tls_mandatory_ciphers</a>
index cbb409a5628ede9d5acab504607ae36a6400a98e..1f603e910daa966b13fcc3af59ea0cc8828a3967 100644 (file)
@@ -455,6 +455,10 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
        <b><a href="postconf.5.html#postscreen_tls_loglevel">postscreen_tls_loglevel</a> ($<a href="postconf.5.html#smtpd_tls_loglevel">smtpd_tls_loglevel</a>)</b>
               The <a href="postscreen.8.html"><b>postscreen</b>(8)</a> equivalent of <a href="postconf.5.html#smtpd_tls_loglevel">smtpd_tls_loglevel</a>.
 
+       <b><a href="postconf.5.html#postscreen_tls_loglevel_maps">postscreen_tls_loglevel_maps</a> ($<a href="postconf.5.html#smtpd_tls_loglevel_maps">smtpd_tls_loglevel_maps</a>)</b>
+              Optional  TLS  loglevel override that depends on the remote peer
+              host name or IP address.
+
        <b><a href="postconf.5.html#postscreen_tls_mandatory_ciphers">postscreen_tls_mandatory_ciphers</a> ($<a href="postconf.5.html#smtpd_tls_mandatory_ciphers">smtpd_tls_mandatory_ciphers</a>)</b>
               The <a href="postscreen.8.html"><b>postscreen</b>(8)</a> equivalent of <a href="postconf.5.html#smtpd_tls_mandatory_ciphers">smtpd_tls_mandatory_ciphers</a>.
 
@@ -473,11 +477,11 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
               The <a href="postscreen.8.html"><b>postscreen</b>(8)</a> equivalent of <a href="postconf.5.html#smtpd_tls_req_ccert">smtpd_tls_req_ccert</a>.
 
 <b><a name="obsolete_starttls_support_controls">OBSOLETE STARTTLS SUPPORT CONTROLS</a></b>
-       These parameters are supported for compatibility with  <a href="smtpd.8.html"><b>smtpd</b>(8)</a>  legacy
+       These  parameters  are supported for compatibility with <a href="smtpd.8.html"><b>smtpd</b>(8)</a> legacy
        parameters.
 
        <b><a href="postconf.5.html#postscreen_use_tls">postscreen_use_tls</a> ($<a href="postconf.5.html#smtpd_use_tls">smtpd_use_tls</a>)</b>
-              Opportunistic  TLS:  announce  STARTTLS  support  to remote SMTP
+              Opportunistic TLS: announce  STARTTLS  support  to  remote  SMTP
               clients, but do not require that clients use TLS encryption.
 
        <b><a href="postconf.5.html#postscreen_enforce_tls">postscreen_enforce_tls</a> ($<a href="postconf.5.html#smtpd_enforce_tls">smtpd_enforce_tls</a>)</b>
@@ -486,18 +490,18 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
 
 <b><a name="miscellaneous_controls">MISCELLANEOUS CONTROLS</a></b>
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The  default  location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
+              The default location of the Postfix <a href="postconf.5.html">main.cf</a> and  <a href="master.5.html">master.cf</a>  con-
               figuration files.
 
        <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
-              The maximal number of digits after the decimal point  when  log-
+              The  maximal  number of digits after the decimal point when log-
               ging delay values.
 
        <b><a href="postconf.5.html#command_directory">command_directory</a> (see 'postconf -d' output)</b>
               The location of all postfix administrative commands.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The  maximum  amount of time that an idle Postfix daemon process
+              The maximum amount of time that an idle Postfix  daemon  process
               waits for an incoming connection before terminating voluntarily.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
@@ -510,7 +514,7 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              A  prefix  that  is  prepended  to  the  process  name in syslog
+              A prefix that  is  prepended  to  the  process  name  in  syslog
               records, so that, for example, "smtpd" becomes "prefix/smtpd".
 
        Available in Postfix 3.3 and later:
@@ -521,7 +525,7 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
        Available in Postfix 3.5 and later:
 
        <b><a href="postconf.5.html#info_log_address_format">info_log_address_format</a> (external)</b>
-              The email address form that will be used  in  non-debug  logging
+              The  email  address  form that will be used in non-debug logging
               (info, warning, etc.).
 
 <b><a name="see_also">SEE ALSO</a></b>
@@ -540,7 +544,7 @@ POSTSCREEN(8)                                                    POSTSCREEN(8)
 <b><a name="history">HISTORY</a></b>
        This service was introduced with Postfix version 2.8.
 
-       Many ideas in <a href="postscreen.8.html"><b>postscreen</b>(8)</a> were explored in earlier  work  by  Michael
+       Many  ideas  in  <a href="postscreen.8.html"><b>postscreen</b>(8)</a> were explored in earlier work by Michael
        Tokarev, in OpenBSD spamd, and in MailChannels Traffic Control.
 
 <b>AUTHOR(S)</b>
index a0bebb0e376f074db46fe3046c3eb9e8e543aa8a..04e8ed84aae63c15af79c935853bcf461d545c25 100644 (file)
@@ -788,41 +788,47 @@ SMTP(8)                                                                SMTP(8)
               Enable  logging  of  TLS  feature information in delivery status
               logging.
 
+       Available in Postfix version 3.12 and later:
+
+       <b><a href="postconf.5.html#smtp_tls_loglevel_maps">smtp_tls_loglevel_maps</a> (empty)</b>
+              Optional TLS loglevel override that depends on the  remote  peer
+              host name or IP address.
+
 <b><a name="obsolete_tls_controls">OBSOLETE TLS CONTROLS</a></b>
-       The following configuration parameters  exist  for  compatibility  with
-       Postfix  versions  before  2.3.  Support for these will be removed in a
+       The  following  configuration  parameters  exist for compatibility with
+       Postfix versions before 2.3. Support for these will  be  removed  in  a
        future release.
 
        <b><a href="postconf.5.html#smtp_use_tls">smtp_use_tls</a> (no)</b>
-              Opportunistic mode: use TLS when a remote SMTP server  announces
+              Opportunistic  mode: use TLS when a remote SMTP server announces
               STARTTLS support, otherwise send the mail in the clear.
 
        <b><a href="postconf.5.html#smtp_enforce_tls">smtp_enforce_tls</a> (no)</b>
-              Enforcement  mode:  require  that  remote  SMTP  servers use TLS
+              Enforcement mode: require  that  remote  SMTP  servers  use  TLS
               encryption, and never send mail in the clear.
 
        <b><a href="postconf.5.html#smtp_tls_enforce_peername">smtp_tls_enforce_peername</a> (yes)</b>
-              With mandatory TLS encryption,  require  that  the  remote  SMTP
-              server  hostname  matches  the  information  in  the remote SMTP
+              With  mandatory  TLS  encryption,  require  that the remote SMTP
+              server hostname matches  the  information  in  the  remote  SMTP
               server certificate.
 
        <b><a href="postconf.5.html#smtp_tls_per_site">smtp_tls_per_site</a> (empty)</b>
-              Optional lookup tables with the Postfix SMTP  client  TLS  usage
-              policy  by  next-hop destination and by remote SMTP server host-
+              Optional  lookup  tables  with the Postfix SMTP client TLS usage
+              policy by next-hop destination and by remote SMTP  server  host-
               name.
 
        <b><a href="postconf.5.html#smtp_tls_cipherlist">smtp_tls_cipherlist</a> (empty)</b>
-              Obsolete Postfix &lt; 2.3 control for the Postfix SMTP  client  TLS
+              Obsolete  Postfix  &lt; 2.3 control for the Postfix SMTP client TLS
               cipher list.
 
 <b><a name="resource_and_rate_controls">RESOURCE AND RATE CONTROLS</a></b>
        <b><a href="postconf.5.html#smtp_connect_timeout">smtp_connect_timeout</a> (30s)</b>
-              The  Postfix SMTP client time limit for completing a TCP connec-
+              The Postfix SMTP client time limit for completing a TCP  connec-
               tion, or zero (use the operating system built-in time limit).
 
        <b><a href="postconf.5.html#smtp_helo_timeout">smtp_helo_timeout</a> (300s)</b>
-              The Postfix SMTP client time limit for sending the HELO or  EHLO
-              command,  and  for  receiving  the  initial  remote  SMTP server
+              The  Postfix SMTP client time limit for sending the HELO or EHLO
+              command, and  for  receiving  the  initial  remote  SMTP  server
               response.
 
        <b><a href="postconf.5.html#lmtp_lhlo_timeout">lmtp_lhlo_timeout</a> (300s)</b>
@@ -834,19 +840,19 @@ SMTP(8)                                                                SMTP(8)
               mand, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_mail_timeout">smtp_mail_timeout</a> (300s)</b>
-              The Postfix SMTP client time limit for  sending  the  MAIL  FROM
+              The  Postfix  SMTP  client  time limit for sending the MAIL FROM
               command, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_rcpt_timeout">smtp_rcpt_timeout</a> (300s)</b>
-              The  Postfix SMTP client time limit for sending the SMTP RCPT TO
+              The Postfix SMTP client time limit for sending the SMTP RCPT  TO
               command, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_data_init_timeout">smtp_data_init_timeout</a> (120s)</b>
-              The Postfix SMTP client time limit for  sending  the  SMTP  DATA
+              The  Postfix  SMTP  client  time limit for sending the SMTP DATA
               command, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_data_xfer_timeout">smtp_data_xfer_timeout</a> (180s)</b>
-              The  Postfix SMTP client time limit for sending the SMTP message
+              The Postfix SMTP client time limit for sending the SMTP  message
               content.
 
        <b><a href="postconf.5.html#smtp_data_done_timeout">smtp_data_done_timeout</a> (600s)</b>
@@ -860,13 +866,13 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtp_mx_address_limit">smtp_mx_address_limit</a> (5)</b>
-              The maximal number of MX (mail exchanger) IP addresses that  can
-              result  from Postfix SMTP client mail exchanger lookups, or zero
+              The  maximal number of MX (mail exchanger) IP addresses that can
+              result from Postfix SMTP client mail exchanger lookups, or  zero
               (no limit).
 
        <b><a href="postconf.5.html#smtp_mx_session_limit">smtp_mx_session_limit</a> (2)</b>
-              The maximal number of SMTP sessions per delivery request  before
-              the  Postfix  SMTP  client  gives  up or delivers to a fall-back
+              The  maximal number of SMTP sessions per delivery request before
+              the Postfix SMTP client gives up  or  delivers  to  a  fall-back
               <a href="postconf.5.html#relayhost">relay host</a>, or zero (no limit).
 
        <b><a href="postconf.5.html#smtp_rset_timeout">smtp_rset_timeout</a> (20s)</b>
@@ -876,17 +882,17 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.2 and earlier:
 
        <b><a href="postconf.5.html#lmtp_cache_connection">lmtp_cache_connection</a> (yes)</b>
-              Keep  Postfix  LMTP  client connections open for up to $<a href="postconf.5.html#max_idle">max_idle</a>
+              Keep Postfix LMTP client connections open for  up  to  $<a href="postconf.5.html#max_idle">max_idle</a>
               seconds.
 
        Available in Postfix version 2.2 and later:
 
        <b><a href="postconf.5.html#smtp_connection_cache_destinations">smtp_connection_cache_destinations</a> (empty)</b>
-              Permanently enable SMTP connection  caching  for  the  specified
+              Permanently  enable  SMTP  connection  caching for the specified
               destinations.
 
        <b><a href="postconf.5.html#smtp_connection_cache_on_demand">smtp_connection_cache_on_demand</a> (yes)</b>
-              Temporarily  enable  SMTP connection caching while a destination
+              Temporarily enable SMTP connection caching while  a  destination
               has a high volume of mail in the <a href="QSHAPE_README.html#active_queue">active queue</a>.
 
        <b><a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> (300s)</b>
@@ -900,23 +906,23 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.3 and later:
 
        <b><a href="postconf.5.html#connection_cache_protocol_timeout">connection_cache_protocol_timeout</a> (5s)</b>
-              Time limit for connection cache connect, send or receive  opera-
+              Time  limit for connection cache connect, send or receive opera-
               tions.
 
        Available in Postfix version 2.9 - 3.6:
 
        <b><a href="postconf.5.html#smtp_per_record_deadline">smtp_per_record_deadline</a> (no)</b>
-              Change  the  behavior  of the smtp_*_timeout time limits, from a
-              time limit per read or write system call, to  a  time  limit  to
-              send  or  receive  a complete record (an SMTP command line, SMTP
-              response line, SMTP message content line, or TLS  protocol  mes-
+              Change the behavior of the smtp_*_timeout time  limits,  from  a
+              time  limit  per  read  or write system call, to a time limit to
+              send or receive a complete record (an SMTP  command  line,  SMTP
+              response  line,  SMTP message content line, or TLS protocol mes-
               sage).
 
        Available in Postfix version 2.11 and later:
 
        <b><a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a> (0)</b>
-              When  SMTP  connection  caching  is enabled, the number of times
-              that an SMTP session may be reused before it is closed, or  zero
+              When SMTP connection caching is enabled,  the  number  of  times
+              that  an SMTP session may be reused before it is closed, or zero
               (no limit).
 
        Available in Postfix version 3.4 and later:
@@ -927,13 +933,13 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 3.7 and later:
 
        <b><a href="postconf.5.html#smtp_per_request_deadline">smtp_per_request_deadline</a> (no)</b>
-              Change  the  behavior  of the smtp_*_timeout time limits, from a
-              time limit per plaintext or TLS read or write call,  to  a  com-
-              bined  time  limit  for  sending a complete SMTP request and for
+              Change the behavior of the smtp_*_timeout time  limits,  from  a
+              time  limit  per  plaintext or TLS read or write call, to a com-
+              bined time limit for sending a complete  SMTP  request  and  for
               receiving a complete SMTP response.
 
        <b><a href="postconf.5.html#smtp_min_data_rate">smtp_min_data_rate</a> (500)</b>
-              The minimum plaintext data transfer  rate  in  bytes/second  for
+              The  minimum  plaintext  data  transfer rate in bytes/second for
               DATA    requests,    when    deadlines    are    enabled    with
               <a href="postconf.5.html#smtp_per_request_deadline">smtp_per_request_deadline</a>.
 
@@ -941,54 +947,54 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#transport_destination_concurrency_limit">transport_destination_concurrency_limit</a>   ($<a href="postconf.5.html#default_destination_concurrency_limit">default_destination_concur</a>-</b>
        <b><a href="postconf.5.html#default_destination_concurrency_limit">rency_limit</a>)</b>
-              A transport-specific override for  the  <a href="postconf.5.html#default_destination_concurrency_limit">default_destination_con</a>-
+              A  transport-specific  override for the <a href="postconf.5.html#default_destination_concurrency_limit">default_destination_con</a>-
               <a href="postconf.5.html#default_destination_concurrency_limit">currency_limit</a> parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
               name of the message delivery transport.
 
        <b><a href="postconf.5.html#transport_destination_recipient_limit">transport_destination_recipient_limit</a>     ($<a href="postconf.5.html#default_destination_recipient_limit">default_destination_recipi</a>-</b>
        <b><a href="postconf.5.html#default_destination_recipient_limit">ent_limit</a>)</b>
               A transport-specific override for the <a href="postconf.5.html#default_destination_recipient_limit">default_destination_recip</a>-
-              <a href="postconf.5.html#default_destination_recipient_limit">ient_limit</a>  parameter  value,  where  <i>transport</i> is the <a href="master.5.html">master.cf</a>
+              <a href="postconf.5.html#default_destination_recipient_limit">ient_limit</a> parameter value, where  <i>transport</i>  is  the  <a href="master.5.html">master.cf</a>
               name of the message delivery transport.
 
 <b><a name="smtputf8_controls">SMTPUTF8 CONTROLS</a></b>
        Preliminary SMTPUTF8 support is introduced with Postfix 3.0.
 
        <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
-              Enable preliminary SMTPUTF8 support for the protocols  described
+              Enable  preliminary SMTPUTF8 support for the protocols described
               in <a href="https://tools.ietf.org/html/rfc6531">RFC 6531</a>, <a href="https://tools.ietf.org/html/rfc6532">RFC 6532</a>, and <a href="https://tools.ietf.org/html/rfc6533">RFC 6533</a>.
 
        <b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
-              Detect  that  a message requires SMTPUTF8 support for the speci-
+              Detect that a message requires SMTPUTF8 support for  the  speci-
               fied mail origin classes.
 
        Available in Postfix version 3.2 and later:
 
        <b><a href="postconf.5.html#enable_idna2003_compatibility">enable_idna2003_compatibility</a> (no)</b>
-              Enable  'transitional'  compatibility   between   IDNA2003   and
-              IDNA2008,  when  converting UTF-8 domain names to/from the ASCII
+              Enable   'transitional'   compatibility   between  IDNA2003  and
+              IDNA2008, when converting UTF-8 domain names to/from  the  ASCII
               form that is used for DNS lookups.
 
 <b><a name="trouble_shooting_controls">TROUBLE SHOOTING CONTROLS</a></b>
        <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
-              The increment in verbose logging level when a  nexthop  destina-
-              tion,  remote client or server name or network address matches a
+              The  increment  in verbose logging level when a nexthop destina-
+              tion, remote client or server name or network address matches  a
               pattern given with the <a href="postconf.5.html#debug_peer_list">debug_peer_list</a> parameter.
 
        <b><a href="postconf.5.html#debug_peer_list">debug_peer_list</a> (empty)</b>
-              Optional list of nexthop destination, remote  client  or  server
-              name  or  network  address  patterns that, if matched, cause the
-              verbose logging level to increase by  the  amount  specified  in
+              Optional  list  of  nexthop destination, remote client or server
+              name or network address patterns that,  if  matched,  cause  the
+              verbose  logging  level  to  increase by the amount specified in
               $<a href="postconf.5.html#debug_peer_level">debug_peer_level</a>.
 
        <b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
-              The  recipient  of  postmaster notifications about mail delivery
+              The recipient of postmaster notifications  about  mail  delivery
               problems that are caused by policy, resource, software or proto-
               col errors.
 
        <b><a href="postconf.5.html#internal_mail_filter_classes">internal_mail_filter_classes</a> (empty)</b>
-              What   categories  of  Postfix-generated  mail  are  subject  to
-              before-queue   content    inspection    by    <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
+              What  categories  of  Postfix-generated  mail  are  subject   to
+              before-queue    content    inspection    by   <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
               <a href="postconf.5.html#header_checks">header_checks</a> and <a href="postconf.5.html#body_checks">body_checks</a>.
 
        <b><a href="postconf.5.html#notify_classes">notify_classes</a> (resource, software)</b>
@@ -996,46 +1002,46 @@ SMTP(8)                                                                SMTP(8)
 
 <b><a name="miscellaneous_controls">MISCELLANEOUS CONTROLS</a></b>
        <b><a href="postconf.5.html#best_mx_transport">best_mx_transport</a> (empty)</b>
-              Where  the  Postfix  SMTP  client  should  deliver  mail when it
+              Where the Postfix  SMTP  client  should  deliver  mail  when  it
               detects a "mail loops back to myself" error condition.
 
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The default location of the Postfix <a href="postconf.5.html">main.cf</a> and  <a href="master.5.html">master.cf</a>  con-
+              The  default  location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
               figuration files.
 
        <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
-              How  much  time  a  Postfix  daemon process may take to handle a
+              How much time a Postfix daemon process  may  take  to  handle  a
               request before it is terminated by a built-in watchdog timer.
 
        <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
-              The maximal number of digits after the decimal point  when  log-
+              The  maximal  number of digits after the decimal point when log-
               ging delay values.
 
        <b><a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> (no)</b>
               Disable DNS lookups in the Postfix SMTP and LMTP clients.
 
        <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> (all)</b>
-              The  local  network  interface  addresses  that this mail system
+              The local network interface  addresses  that  this  mail  system
               receives mail on.
 
        <b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (see 'postconf -d' output)</b>
-              The Internet protocols Postfix will attempt to use  when  making
+              The  Internet  protocols Postfix will attempt to use when making
               or accepting connections.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
-              The  time  limit  for  sending  or receiving information over an
+              The time limit for sending  or  receiving  information  over  an
               internal communication channel.
 
        <b><a href="postconf.5.html#lmtp_assume_final">lmtp_assume_final</a> (no)</b>
-              When a remote LMTP server announces no DSN support, assume  that
-              the  server performs final delivery, and send "delivered" deliv-
+              When  a remote LMTP server announces no DSN support, assume that
+              the server performs final delivery, and send "delivered"  deliv-
               ery status notifications instead of "relayed".
 
        <b><a href="postconf.5.html#lmtp_tcp_port">lmtp_tcp_port</a> (24)</b>
               The default TCP port that the Postfix LMTP client connects to.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The maximum amount of time that an idle Postfix  daemon  process
+              The  maximum  amount of time that an idle Postfix daemon process
               waits for an incoming connection before terminating voluntarily.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
@@ -1049,21 +1055,21 @@ SMTP(8)                                                                SMTP(8)
               The process name of a Postfix command or daemon process.
 
        <b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> (empty)</b>
-              The  remote  network  interface  addresses that this mail system
-              receives mail on by way of a proxy or network  address  transla-
+              The remote network interface addresses  that  this  mail  system
+              receives  mail  on by way of a proxy or network address transla-
               tion unit.
 
        <b><a href="postconf.5.html#smtp_address_preference">smtp_address_preference</a> (any)</b>
               The address type ("ipv6", "ipv4" or "any") that the Postfix SMTP
-              client will try first, when a  destination  has  IPv6  and  IPv4
+              client  will  try  first,  when  a destination has IPv6 and IPv4
               addresses with equal MX preference.
 
        <b><a href="postconf.5.html#smtp_bind_address">smtp_bind_address</a> (empty)</b>
-              An  optional  numerical  network  address  that the Postfix SMTP
+              An optional numerical network  address  that  the  Postfix  SMTP
               client should bind to when making an IPv4 connection.
 
        <b><a href="postconf.5.html#smtp_bind_address6">smtp_bind_address6</a> (empty)</b>
-              An optional numerical network  address  that  the  Postfix  SMTP
+              An  optional  numerical  network  address  that the Postfix SMTP
               client should bind to when making an IPv6 connection.
 
        <b><a href="postconf.5.html#smtp_helo_name">smtp_helo_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
@@ -1083,7 +1089,7 @@ SMTP(8)                                                                SMTP(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              A prefix that  is  prepended  to  the  process  name  in  syslog
+              A  prefix  that  is  prepended  to  the  process  name in syslog
               records, so that, for example, "smtpd" becomes "prefix/smtpd".
 
        Available with Postfix 2.2 and earlier:
@@ -1095,14 +1101,14 @@ SMTP(8)                                                                SMTP(8)
        Available with Postfix 2.3 and later:
 
        <b><a href="postconf.5.html#smtp_fallback_relay">smtp_fallback_relay</a> ($<a href="postconf.5.html#fallback_relay">fallback_relay</a>)</b>
-              Optional list of relay destinations that will be  used  when  an
-              SMTP  destination  is not found, or when delivery fails due to a
+              Optional  list  of  relay destinations that will be used when an
+              SMTP destination is not found, or when delivery fails due  to  a
               non-permanent error.
 
        Available with Postfix 3.0 and later:
 
        <b><a href="postconf.5.html#smtp_address_verify_target">smtp_address_verify_target</a> (rcpt)</b>
-              In the context of email address verification, the SMTP  protocol
+              In  the context of email address verification, the SMTP protocol
               stage that determines whether an email address is deliverable.
 
        Available with Postfix 3.1 and later:
@@ -1124,7 +1130,7 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix 3.7 and later:
 
        <b><a href="postconf.5.html#smtp_bind_address_enforce">smtp_bind_address_enforce</a> (no)</b>
-              Defer delivery when the Postfix SMTP  client  cannot  apply  the
+              Defer  delivery  when  the  Postfix SMTP client cannot apply the
               <a href="postconf.5.html#smtp_bind_address">smtp_bind_address</a> or <a href="postconf.5.html#smtp_bind_address6">smtp_bind_address6</a> setting.
 
 <b><a name="see_also">SEE ALSO</a></b>
index b0516764692abae719e98fa04d92bc248eda7e01..75800d0e9e6a34052ba9a90b85e2dcd474ff45f9 100644 (file)
@@ -672,109 +672,115 @@ SMTPD(8)                                                              SMTPD(8)
               (EKU) lists only <b>serverAuth</b> and  not  <b>clientAuth</b>  as  valid  TLS
               client certificates.
 
+       Available in Postfix version 3.12 and later:
+
+       <b><a href="postconf.5.html#smtpd_tls_loglevel_maps">smtpd_tls_loglevel_maps</a> (empty)</b>
+              Optional  TLS  loglevel override that depends on the remote peer
+              host name or IP address.
+
 <b><a name="obsolete_tls_controls">OBSOLETE TLS CONTROLS</a></b>
-       The  following  configuration  parameters  exist for compatibility with
-       Postfix versions before 2.3. Support for these will  be  removed  in  a
+       The following configuration parameters  exist  for  compatibility  with
+       Postfix  versions  before  2.3.  Support for these will be removed in a
        future release.
 
        <b><a href="postconf.5.html#smtpd_use_tls">smtpd_use_tls</a> (no)</b>
-              Opportunistic  TLS:  announce  STARTTLS  support  to remote SMTP
+              Opportunistic TLS: announce  STARTTLS  support  to  remote  SMTP
               clients, but do not require that clients use TLS encryption.
 
        <b><a href="postconf.5.html#smtpd_enforce_tls">smtpd_enforce_tls</a> (no)</b>
               Mandatory TLS: announce STARTTLS support to remote SMTP clients,
-              and  reject  all  plaintext commands except HELO, EHLO, XCLIENT,
+              and reject all plaintext commands except  HELO,  EHLO,  XCLIENT,
               STARTTLS, NOOP, QUIT, and (Postfix &gt;= 3.9) HELP.
 
        <b><a href="postconf.5.html#smtpd_tls_cipherlist">smtpd_tls_cipherlist</a> (empty)</b>
-              Obsolete Postfix &lt; 2.3 control for the Postfix SMTP  server  TLS
+              Obsolete  Postfix  &lt; 2.3 control for the Postfix SMTP server TLS
               cipher list.
 
 <b><a name="smtputf8_controls">SMTPUTF8 CONTROLS</a></b>
        Preliminary SMTPUTF8 support is introduced with Postfix 3.0.
 
        <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
-              Enable  preliminary SMTPUTF8 support for the protocols described
+              Enable preliminary SMTPUTF8 support for the protocols  described
               in <a href="https://tools.ietf.org/html/rfc6531">RFC 6531</a>, <a href="https://tools.ietf.org/html/rfc6532">RFC 6532</a>, and <a href="https://tools.ietf.org/html/rfc6533">RFC 6533</a>.
 
        <b><a href="postconf.5.html#strict_smtputf8">strict_smtputf8</a> (no)</b>
               Enable stricter enforcement of the SMTPUTF8 protocol.
 
        <b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
-              Detect that a message requires SMTPUTF8 support for  the  speci-
+              Detect  that  a message requires SMTPUTF8 support for the speci-
               fied mail origin classes.
 
        Available in Postfix version 3.2 and later:
 
        <b><a href="postconf.5.html#enable_idna2003_compatibility">enable_idna2003_compatibility</a> (no)</b>
-              Enable   'transitional'   compatibility   between  IDNA2003  and
-              IDNA2008, when converting UTF-8 domain names to/from  the  ASCII
+              Enable  'transitional'  compatibility   between   IDNA2003   and
+              IDNA2008,  when  converting UTF-8 domain names to/from the ASCII
               form that is used for DNS lookups.
 
 <b><a name="verp_support_controls">VERP SUPPORT CONTROLS</a></b>
-       With  VERP  style delivery, each recipient of a message receives a cus-
-       tomized copy of the message with his/her own recipient address  encoded
+       With VERP style delivery, each recipient of a message receives  a  cus-
+       tomized  copy of the message with his/her own recipient address encoded
        in the envelope sender address.  The <a href="VERP_README.html">VERP_README</a> file describes config-
-       uration and operation details of Postfix support for variable  envelope
-       return  path addresses.  VERP style delivery is requested with the SMTP
-       XVERP command or with the "sendmail  -V"  command-line  option  and  is
+       uration  and operation details of Postfix support for variable envelope
+       return path addresses.  VERP style delivery is requested with the  SMTP
+       XVERP  command  or  with  the  "sendmail -V" command-line option and is
        available in Postfix version 1.1 and later.
 
        <b><a href="postconf.5.html#default_verp_delimiters">default_verp_delimiters</a> (+=)</b>
               The two default VERP delimiter characters.
 
        <b><a href="postconf.5.html#verp_delimiter_filter">verp_delimiter_filter</a> (-=+)</b>
-              The  characters  Postfix accepts as VERP delimiter characters on
+              The characters Postfix accepts as VERP delimiter  characters  on
               the Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command line and in SMTP commands.
 
        Available in Postfix version 1.1 and 2.0:
 
        <b><a href="postconf.5.html#authorized_verp_clients">authorized_verp_clients</a> ($<a href="postconf.5.html#mynetworks">mynetworks</a>)</b>
-              What remote SMTP clients are allowed to specify the  XVERP  com-
+              What  remote  SMTP clients are allowed to specify the XVERP com-
               mand.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_authorized_verp_clients">smtpd_authorized_verp_clients</a> ($<a href="postconf.5.html#authorized_verp_clients">authorized_verp_clients</a>)</b>
-              What  remote  SMTP clients are allowed to specify the XVERP com-
+              What remote SMTP clients are allowed to specify the  XVERP  com-
               mand.
 
 <b><a name="trouble_shooting_controls">TROUBLE SHOOTING CONTROLS</a></b>
-       The <a href="DEBUG_README.html">DEBUG_README</a> document describes how to debug parts of  the  Postfix
-       mail  system.  The  methods  vary from making the software log a lot of
+       The  <a href="DEBUG_README.html">DEBUG_README</a>  document describes how to debug parts of the Postfix
+       mail system. The methods vary from making the software  log  a  lot  of
        detail, to running some daemon processes under control of a call tracer
        or debugger.
 
        <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
-              The  increment  in verbose logging level when a nexthop destina-
-              tion, remote client or server name or network address matches  a
+              The increment in verbose logging level when a  nexthop  destina-
+              tion,  remote client or server name or network address matches a
               pattern given with the <a href="postconf.5.html#debug_peer_list">debug_peer_list</a> parameter.
 
        <b><a href="postconf.5.html#debug_peer_list">debug_peer_list</a> (empty)</b>
-              Optional  list  of  nexthop destination, remote client or server
-              name or network address patterns that,  if  matched,  cause  the
-              verbose  logging  level  to  increase by the amount specified in
+              Optional list of nexthop destination, remote  client  or  server
+              name  or  network  address  patterns that, if matched, cause the
+              verbose logging level to increase by  the  amount  specified  in
               $<a href="postconf.5.html#debug_peer_level">debug_peer_level</a>.
 
        <b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
-              The recipient of postmaster notifications  about  mail  delivery
+              The  recipient  of  postmaster notifications about mail delivery
               problems that are caused by policy, resource, software or proto-
               col errors.
 
        <b><a href="postconf.5.html#internal_mail_filter_classes">internal_mail_filter_classes</a> (empty)</b>
-              What  categories  of  Postfix-generated  mail  are  subject   to
-              before-queue    content    inspection    by   <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
+              What   categories  of  Postfix-generated  mail  are  subject  to
+              before-queue   content    inspection    by    <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
               <a href="postconf.5.html#header_checks">header_checks</a> and <a href="postconf.5.html#body_checks">body_checks</a>.
 
        <b><a href="postconf.5.html#notify_classes">notify_classes</a> (resource, software)</b>
               The list of error classes that are reported to the postmaster.
 
        <b><a href="postconf.5.html#smtpd_reject_footer">smtpd_reject_footer</a> (empty)</b>
-              Optional information that is appended after  each  Postfix  SMTP
+              Optional  information  that  is appended after each Postfix SMTP
               server 4XX or 5XX response.
 
        <b><a href="postconf.5.html#soft_bounce">soft_bounce</a> (no)</b>
-              Safety  net to keep mail queued that would otherwise be returned
+              Safety net to keep mail queued that would otherwise be  returned
               to the sender.
 
        Available in Postfix version 2.1 and later:
@@ -785,49 +791,49 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.10 and later:
 
        <b><a href="postconf.5.html#smtpd_log_access_permit_actions">smtpd_log_access_permit_actions</a> (empty)</b>
-              Enable  logging  of  the  named  "permit" actions in SMTP server
-              access lists (by default, the SMTP server logs "reject"  actions
+              Enable logging of the named  "permit"  actions  in  SMTP  server
+              access  lists (by default, the SMTP server logs "reject" actions
               but not "permit" actions).
 
 <b><a name="known_versus_unknown_recipient_controls">KNOWN VERSUS UNKNOWN RECIPIENT CONTROLS</a></b>
-       As  of  Postfix  version  2.0, the SMTP server rejects mail for unknown
+       As of Postfix version 2.0, the SMTP server  rejects  mail  for  unknown
        recipients. This prevents the mail queue from clogging up with undeliv-
-       erable  MAILER-DAEMON messages. Additional information on this topic is
+       erable MAILER-DAEMON messages. Additional information on this topic  is
        in the <a href="LOCAL_RECIPIENT_README.html">LOCAL_RECIPIENT_README</a> and <a href="ADDRESS_CLASS_README.html">ADDRESS_CLASS_README</a> documents.
 
        <b><a href="postconf.5.html#show_user_unknown_table_name">show_user_unknown_table_name</a> (yes)</b>
-              Display the name of the recipient table in  the  "User  unknown"
+              Display  the  name  of the recipient table in the "User unknown"
               responses.
 
        <b><a href="postconf.5.html#canonical_maps">canonical_maps</a> (empty)</b>
-              Optional  address  mapping lookup tables for message headers and
+              Optional address mapping lookup tables for message  headers  and
               envelopes.
 
        <b><a href="postconf.5.html#recipient_canonical_maps">recipient_canonical_maps</a> (empty)</b>
-              Optional address mapping lookup tables for envelope  and  header
+              Optional  address  mapping lookup tables for envelope and header
               recipient addresses.
 
        <b><a href="postconf.5.html#sender_canonical_maps">sender_canonical_maps</a> (empty)</b>
-              Optional  address  mapping lookup tables for envelope and header
+              Optional address mapping lookup tables for envelope  and  header
               sender addresses.
 
        Parameters concerning known/unknown local recipients:
 
        <b><a href="postconf.5.html#mydestination">mydestination</a> ($<a href="postconf.5.html#myhostname">myhostname</a>, localhost.$<a href="postconf.5.html#mydomain">mydomain</a>, localhost)</b>
-              The list of domains that are delivered via the  $<a href="postconf.5.html#local_transport">local_transport</a>
+              The  list of domains that are delivered via the $<a href="postconf.5.html#local_transport">local_transport</a>
               mail delivery transport.
 
        <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> (all)</b>
-              The  local  network  interface  addresses  that this mail system
+              The local network interface  addresses  that  this  mail  system
               receives mail on.
 
        <b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> (empty)</b>
-              The remote network interface addresses  that  this  mail  system
-              receives  mail  on by way of a proxy or network address transla-
+              The  remote  network  interface  addresses that this mail system
+              receives mail on by way of a proxy or network  address  transla-
               tion unit.
 
        <b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (see 'postconf -d' output)</b>
-              The Internet protocols Postfix will attempt to use  when  making
+              The  Internet  protocols Postfix will attempt to use when making
               or accepting connections.
 
        <b><a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> (<a href="proxymap.8.html">proxy</a>:unix:passwd.byname $<a href="postconf.5.html#alias_maps">alias_maps</a>)</b>
@@ -836,61 +842,61 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#unknown_local_recipient_reject_code">unknown_local_recipient_reject_code</a> (550)</b>
               The numerical Postfix SMTP server response code when a recipient
-              address  is local, and $<a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> specifies a list of
+              address is local, and $<a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> specifies a list  of
               lookup tables that does not match the recipient.
 
        Parameters concerning known/unknown recipients of relay destinations:
 
        <b><a href="postconf.5.html#relay_domains">relay_domains</a> (Postfix</b> &gt;<b>= 3.0: empty, Postfix</b> &lt; <b>3.0: $<a href="postconf.5.html#mydestination">mydestination</a>)</b>
-              What destination domains (and subdomains  thereof)  this  system
+              What  destination  domains  (and subdomains thereof) this system
               will relay mail to.
 
        <b><a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> (empty)</b>
-              Optional  lookup  tables with all valid addresses in the domains
+              Optional lookup tables with all valid addresses in  the  domains
               that match $<a href="postconf.5.html#relay_domains">relay_domains</a>.
 
        <b><a href="postconf.5.html#unknown_relay_recipient_reject_code">unknown_relay_recipient_reject_code</a> (550)</b>
-              The numerical Postfix SMTP server reply code  when  a  recipient
-              address  matches $<a href="postconf.5.html#relay_domains">relay_domains</a>, and <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> speci-
-              fies a list of lookup tables that does not match  the  recipient
+              The  numerical  Postfix  SMTP server reply code when a recipient
+              address matches $<a href="postconf.5.html#relay_domains">relay_domains</a>, and <a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a>  speci-
+              fies  a  list of lookup tables that does not match the recipient
               address.
 
-       Parameters   concerning   known/unknown  recipients  in  virtual  alias
+       Parameters  concerning  known/unknown  recipients  in   virtual   alias
        domains:
 
        <b><a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a> ($<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>)</b>
-              Postfix is the final destination for the specified list of  vir-
+              Postfix  is the final destination for the specified list of vir-
               tual alias domains, that is, domains for which all addresses are
               aliased to addresses in other local or remote domains.
 
        <b><a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> ($<a href="postconf.5.html#virtual_maps">virtual_maps</a>)</b>
               Optional lookup tables that are often searched with a full email
-              address  (including  domain)  and  that apply to all recipients:
-              <a href="local.8.html"><b>local</b>(8)</a>, virtual, and remote; this is  unlike  <a href="postconf.5.html#alias_maps">alias_maps</a>  that
-              are  only  searched  with an email address localpart (no domain)
+              address (including domain) and that  apply  to  all  recipients:
+              <a href="local.8.html"><b>local</b>(8)</a>,  virtual,  and  remote; this is unlike <a href="postconf.5.html#alias_maps">alias_maps</a> that
+              are only searched with an email address  localpart  (no  domain)
               and that apply only to <a href="local.8.html"><b>local</b>(8)</a> recipients.
 
        <b><a href="postconf.5.html#unknown_virtual_alias_reject_code">unknown_virtual_alias_reject_code</a> (550)</b>
-              The Postfix SMTP server reply  code  when  a  recipient  address
-              matches  $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>,  and $<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> speci-
-              fies a list of lookup tables that does not match  the  recipient
+              The  Postfix  SMTP  server  reply  code when a recipient address
+              matches $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>, and  $<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>  speci-
+              fies  a  list of lookup tables that does not match the recipient
               address.
 
        Parameters  concerning  known/unknown  recipients  in  virtual  mailbox
        domains:
 
        <b><a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> ($<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>)</b>
-              Postfix is the final  destination  for  the  specified  list  of
-              domains;  mail  is  delivered  via  the  $<a href="postconf.5.html#virtual_transport">virtual_transport</a> mail
+              Postfix  is  the  final  destination  for  the specified list of
+              domains; mail  is  delivered  via  the  $<a href="postconf.5.html#virtual_transport">virtual_transport</a>  mail
               delivery transport.
 
        <b><a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a> (empty)</b>
-              Optional lookup tables with all valid addresses in  the  domains
+              Optional  lookup  tables with all valid addresses in the domains
               that match $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.
 
        <b><a href="postconf.5.html#unknown_virtual_mailbox_reject_code">unknown_virtual_mailbox_reject_code</a> (550)</b>
-              The  Postfix  SMTP  server  reply  code when a recipient address
-              matches  $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>,   and   $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>
+              The Postfix SMTP server reply  code  when  a  recipient  address
+              matches   $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>,   and  $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>
               specifies a list of lookup tables that does not match the recip-
               ient address.
 
@@ -899,7 +905,7 @@ SMTPD(8)                                                              SMTPD(8)
        control client request rates.
 
        <b><a href="postconf.5.html#line_length_limit">line_length_limit</a> (2048)</b>
-              Upon  input,  long  lines  are chopped up into pieces of at most
+              Upon input, long lines are chopped up into  pieces  of  at  most
               this length; upon delivery, long lines are reconstructed.
 
        <b><a href="postconf.5.html#queue_minfree">queue_minfree</a> (0)</b>
@@ -907,62 +913,62 @@ SMTPD(8)                                                              SMTPD(8)
               tem that is needed to receive mail.
 
        <b><a href="postconf.5.html#message_size_limit">message_size_limit</a> (10240000)</b>
-              The  maximal  size  in  bytes  of  a message, including envelope
+              The maximal size in  bytes  of  a  message,  including  envelope
               information.
 
        <b><a href="postconf.5.html#smtpd_recipient_limit">smtpd_recipient_limit</a> (1000)</b>
-              The maximal number of recipients that the  Postfix  SMTP  server
+              The  maximal  number  of recipients that the Postfix SMTP server
               accepts per message delivery request.
 
        <b><a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a> (normal: 300s, <a href="STRESS_README.html">overload</a>: 10s)</b>
-              When  the  Postfix  SMTP  server  wants  to  send an SMTP server
-              response, how long the Postfix SMTP  server  will  wait  for  an
-              underlying  network  write  operation  to complete; and when the
-              Postfix SMTP server Postfix wants  to  receive  an  SMTP  client
-              request,  how  long  the  Postfix  SMTP  server will wait for an
+              When the Postfix SMTP  server  wants  to  send  an  SMTP  server
+              response,  how  long  the  Postfix  SMTP server will wait for an
+              underlying network write operation to  complete;  and  when  the
+              Postfix  SMTP  server  Postfix  wants  to receive an SMTP client
+              request, how long the Postfix  SMTP  server  will  wait  for  an
               underlying network read operation to complete.
 
        <b><a href="postconf.5.html#smtpd_history_flush_threshold">smtpd_history_flush_threshold</a> (100)</b>
-              The maximal number of lines in the Postfix SMTP  server  command
-              history  before it is flushed upon receipt of EHLO, RSET, or end
+              The  maximal  number of lines in the Postfix SMTP server command
+              history before it is flushed upon receipt of EHLO, RSET, or  end
               of DATA.
 
        Available in Postfix version 2.3 and later:
 
        <b><a href="postconf.5.html#smtpd_peername_lookup">smtpd_peername_lookup</a> (yes)</b>
-              Attempt to look up the remote SMTP client hostname,  and  verify
+              Attempt  to  look up the remote SMTP client hostname, and verify
               that the name matches the client IP address.
 
        The per SMTP client connection count and request rate limits are imple-
-       mented in co-operation with the <a href="anvil.8.html"><b>anvil</b>(8)</a> service, and are available  in
+       mented  in co-operation with the <a href="anvil.8.html"><b>anvil</b>(8)</a> service, and are available in
        Postfix version 2.2 and later.
 
        <b><a href="postconf.5.html#smtpd_client_connection_count_limit">smtpd_client_connection_count_limit</a> (50)</b>
-              How  many simultaneous connections any client is allowed to make
+              How many simultaneous connections any client is allowed to  make
               to this service.
 
        <b><a href="postconf.5.html#smtpd_client_connection_rate_limit">smtpd_client_connection_rate_limit</a> (0)</b>
-              The maximal number of connection attempts any client is  allowed
+              The  maximal number of connection attempts any client is allowed
               to make to this service per time unit.
 
        <b><a href="postconf.5.html#smtpd_client_message_rate_limit">smtpd_client_message_rate_limit</a> (0)</b>
-              The  maximal number of message delivery requests that any client
-              is allowed to make to this service per time unit, regardless  of
+              The maximal number of message delivery requests that any  client
+              is  allowed to make to this service per time unit, regardless of
               whether or not Postfix actually accepts those messages.
 
        <b><a href="postconf.5.html#smtpd_client_recipient_rate_limit">smtpd_client_recipient_rate_limit</a> (0)</b>
-              The  maximal  number  of  recipient addresses that any client is
-              allowed to send to this service per  time  unit,  regardless  of
+              The maximal number of recipient addresses  that  any  client  is
+              allowed  to  send  to  this service per time unit, regardless of
               whether or not Postfix actually accepts those recipients.
 
        <b><a href="postconf.5.html#smtpd_client_event_limit_exceptions">smtpd_client_event_limit_exceptions</a> ($<a href="postconf.5.html#mynetworks">mynetworks</a>)</b>
-              Clients  that  are excluded from smtpd_client_*_count/rate_limit
+              Clients that are excluded  from  smtpd_client_*_count/rate_limit
               restrictions.
 
        Available in Postfix version 2.3 and later:
 
        <b><a href="postconf.5.html#smtpd_client_new_tls_session_rate_limit">smtpd_client_new_tls_session_rate_limit</a> (0)</b>
-              The maximal number of new (i.e., uncached) TLS sessions  that  a
+              The  maximal  number of new (i.e., uncached) TLS sessions that a
               remote SMTP client is allowed to negotiate with this service per
               time unit.
 
@@ -970,29 +976,29 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_per_record_deadline">smtpd_per_record_deadline</a> (normal: no, <a href="STRESS_README.html">overload</a>: yes)</b>
               Change  the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  and  <a href="postconf.5.html#smtpd_starttls_timeout">smtpd_start</a>-
-              <a href="postconf.5.html#smtpd_starttls_timeout">tls_timeout</a>  time  limits,  from  a time limit per read or write
-              system call, to a time limit  to  send  or  receive  a  complete
-              record  (an  SMTP command line, SMTP response line, SMTP message
+              <a href="postconf.5.html#smtpd_starttls_timeout">tls_timeout</a> time limits, from a time limit  per  read  or  write
+              system  call,  to  a  time  limit  to send or receive a complete
+              record (an SMTP command line, SMTP response line,  SMTP  message
               content line, or TLS protocol message).
 
        Available in Postfix version 3.1 and later:
 
        <b><a href="postconf.5.html#smtpd_client_auth_rate_limit">smtpd_client_auth_rate_limit</a> (0)</b>
-              The maximal number of AUTH commands that any client  is  allowed
-              to  send to this service per time unit, regardless of whether or
+              The  maximal  number of AUTH commands that any client is allowed
+              to send to this service per time unit, regardless of whether  or
               not Postfix actually accepts those commands.
 
        Available in Postfix version 3.7 and later:
 
        <b><a href="postconf.5.html#smtpd_per_request_deadline">smtpd_per_request_deadline</a> (normal: no, <a href="STRESS_README.html">overload</a>: yes)</b>
               Change  the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  and  <a href="postconf.5.html#smtpd_starttls_timeout">smtpd_start</a>-
-              <a href="postconf.5.html#smtpd_starttls_timeout">tls_timeout</a>  time limits, from a time limit per plaintext or TLS
-              read or write call, to a combined time  limit  for  receiving  a
-              complete  SMTP request and for sending a complete SMTP response.
+              <a href="postconf.5.html#smtpd_starttls_timeout">tls_timeout</a> time limits, from a time limit per plaintext or  TLS
+              read  or  write  call,  to a combined time limit for receiving a
+              complete SMTP request and for sending a complete SMTP  response.
 
        <b><a href="postconf.5.html#smtpd_min_data_rate">smtpd_min_data_rate</a> (500)</b>
-              The minimum plaintext data transfer  rate  in  bytes/second  for
-              DATA   and  BDAT  requests,  when  deadlines  are  enabled  with
+              The  minimum  plaintext  data  transfer rate in bytes/second for
+              DATA  and  BDAT  requests,  when  deadlines  are  enabled   with
               <a href="postconf.5.html#smtpd_per_request_deadline">smtpd_per_request_deadline</a>.
 
        <b><a href="postconf.5.html#header_from_format">header_from_format</a> (standard)</b>
@@ -1001,27 +1007,27 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 3.8 and later:
 
        <b><a href="postconf.5.html#smtpd_client_ipv4_prefix_length">smtpd_client_ipv4_prefix_length</a> (32)</b>
-              Aggregate smtpd_client_*_count and  smtpd_client_*_rate  statis-
+              Aggregate  smtpd_client_*_count  and smtpd_client_*_rate statis-
               tics by IPv4 network blocks with the specified network prefix.
 
        <b><a href="postconf.5.html#smtpd_client_ipv6_prefix_length">smtpd_client_ipv6_prefix_length</a> (84)</b>
-              Aggregate  smtpd_client_*_count  and smtpd_client_*_rate statis-
+              Aggregate smtpd_client_*_count and  smtpd_client_*_rate  statis-
               tics by IPv6 network blocks with the specified network prefix.
 
        Available in Postfix 3.9, 3.8.1, 3.7.6, 3.6.10, 3.5.20 and later:
 
        <b><a href="postconf.5.html#smtpd_forbid_unauth_pipelining">smtpd_forbid_unauth_pipelining</a> (Postfix</b> &gt;<b>= 3.9: yes)</b>
-              Disconnect remote SMTP clients that violate <a href="https://tools.ietf.org/html/rfc2920">RFC 2920</a>  (or  5321)
+              Disconnect  remote  SMTP clients that violate <a href="https://tools.ietf.org/html/rfc2920">RFC 2920</a> (or 5321)
               command pipelining constraints.
 
        Available in Postfix 3.9, 3.8.4, 3.7.9, 3.6.13, 3.5.23 and later:
 
        <b><a href="postconf.5.html#smtpd_forbid_bare_newline">smtpd_forbid_bare_newline</a> (Postfix</b> &gt;<b>= 3.9: normalize)</b>
-              Reject  or  restrict input lines from an SMTP client that end in
+              Reject or restrict input lines from an SMTP client that  end  in
               &lt;LF&gt; instead of the standard &lt;CR&gt;&lt;LF&gt;.
 
        <b><a href="postconf.5.html#smtpd_forbid_bare_newline_exclusions">smtpd_forbid_bare_newline_exclusions</a> ($<a href="postconf.5.html#mynetworks">mynetworks</a>)</b>
-              Exclude the  specified  clients  from  <a href="postconf.5.html#smtpd_forbid_bare_newline">smtpd_forbid_bare_newline</a>
+              Exclude  the  specified  clients  from <a href="postconf.5.html#smtpd_forbid_bare_newline">smtpd_forbid_bare_newline</a>
               enforcement.
 
        Available in Postfix 3.9, 3.8.5, 3.7.10, 3.6.14, 3.5.24 and later:
@@ -1031,55 +1037,55 @@ SMTPD(8)                                                              SMTPD(8)
               request with "<a href="postconf.5.html#smtpd_forbid_bare_newline">smtpd_forbid_bare_newline</a> = reject".
 
 <b><a name="tarpit_controls">TARPIT CONTROLS</a></b>
-       When a remote SMTP client makes errors, the  Postfix  SMTP  server  can
-       insert  delays  before  responding. This can help to slow down run-away
-       software.  The behavior is controlled by an error counter  that  counts
+       When  a  remote  SMTP  client makes errors, the Postfix SMTP server can
+       insert delays before responding. This can help to  slow  down  run-away
+       software.   The  behavior is controlled by an error counter that counts
        the number of errors within an SMTP session that a client makes without
        delivering mail.
 
        <b><a href="postconf.5.html#smtpd_error_sleep_time">smtpd_error_sleep_time</a> (1s)</b>
-              With Postfix version 2.1 and later:  the  SMTP  server  response
-              delay  after a client has made more than $<a href="postconf.5.html#smtpd_soft_error_limit">smtpd_soft_error_limit</a>
-              errors, and fewer than $<a href="postconf.5.html#smtpd_hard_error_limit">smtpd_hard_error_limit</a>  errors,  without
+              With  Postfix  version  2.1  and later: the SMTP server response
+              delay after a client has made more than  $<a href="postconf.5.html#smtpd_soft_error_limit">smtpd_soft_error_limit</a>
+              errors,  and  fewer than $<a href="postconf.5.html#smtpd_hard_error_limit">smtpd_hard_error_limit</a> errors, without
               delivering mail.
 
        <b><a href="postconf.5.html#smtpd_soft_error_limit">smtpd_soft_error_limit</a> (10)</b>
-              The  number  of  errors  a remote SMTP client is allowed to make
-              without delivering mail before the  Postfix  SMTP  server  slows
+              The number of errors a remote SMTP client  is  allowed  to  make
+              without  delivering  mail  before  the Postfix SMTP server slows
               down all its responses.
 
        <b><a href="postconf.5.html#smtpd_hard_error_limit">smtpd_hard_error_limit</a> (normal: 20, <a href="STRESS_README.html">overload</a>: 1)</b>
-              The  maximal number of errors a remote SMTP client is allowed to
+              The maximal number of errors a remote SMTP client is allowed  to
               make without delivering mail.
 
        <b><a href="postconf.5.html#smtpd_junk_command_limit">smtpd_junk_command_limit</a> (normal: 100, <a href="STRESS_README.html">overload</a>: 1)</b>
-              The number of junk commands (NOOP, VRFY, ETRN or  RSET)  that  a
-              remote  SMTP  client  can  send  before  the Postfix SMTP server
+              The  number  of  junk commands (NOOP, VRFY, ETRN or RSET) that a
+              remote SMTP client can  send  before  the  Postfix  SMTP  server
               starts to increment the error counter with each junk command.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_recipient_overshoot_limit">smtpd_recipient_overshoot_limit</a> (1000)</b>
-              The number of recipients that a remote SMTP client can  send  in
+              The  number  of recipients that a remote SMTP client can send in
               excess  of  the  limit  specified  with  $<a href="postconf.5.html#smtpd_recipient_limit">smtpd_recipient_limit</a>,
-              before the Postfix SMTP server increments the per-session  error
+              before  the Postfix SMTP server increments the per-session error
               count for each excess recipient.
 
 <b><a name="access_policy_delegation_controls">ACCESS POLICY DELEGATION CONTROLS</a></b>
-       As  of version 2.1, Postfix can be configured to delegate access policy
-       decisions to an external server that runs  outside  Postfix.   See  the
+       As of version 2.1, Postfix can be configured to delegate access  policy
+       decisions  to  an  external  server that runs outside Postfix.  See the
        file <a href="SMTPD_POLICY_README.html">SMTPD_POLICY_README</a> for more information.
 
        <b><a href="postconf.5.html#smtpd_policy_service_max_idle">smtpd_policy_service_max_idle</a> (300s)</b>
-              The  time after which an idle SMTPD policy service connection is
+              The time after which an idle SMTPD policy service connection  is
               closed.
 
        <b><a href="postconf.5.html#smtpd_policy_service_max_ttl">smtpd_policy_service_max_ttl</a> (1000s)</b>
-              The time after which an active SMTPD policy  service  connection
+              The  time  after which an active SMTPD policy service connection
               is closed.
 
        <b><a href="postconf.5.html#smtpd_policy_service_timeout">smtpd_policy_service_timeout</a> (100s)</b>
-              The  time limit for connecting to, writing to, or receiving from
+              The time limit for connecting to, writing to, or receiving  from
               a delegated SMTPD policy server.
 
        Available in Postfix version 3.0 and later:
@@ -1089,81 +1095,81 @@ SMTPD(8)                                                              SMTPD(8)
               The default action when an SMTPD policy service request fails.
 
        <b><a href="postconf.5.html#smtpd_policy_service_request_limit">smtpd_policy_service_request_limit</a> (0)</b>
-              The maximal number of requests per SMTPD policy service  connec-
+              The  maximal number of requests per SMTPD policy service connec-
               tion, or zero (no limit).
 
        <b><a href="postconf.5.html#smtpd_policy_service_try_limit">smtpd_policy_service_try_limit</a> (2)</b>
-              The  maximal  number of attempts to send an SMTPD policy service
+              The maximal number of attempts to send an SMTPD  policy  service
               request before giving up.
 
        <b><a href="postconf.5.html#smtpd_policy_service_retry_delay">smtpd_policy_service_retry_delay</a> (1s)</b>
-              The delay between attempts to resend a failed SMTPD policy  ser-
+              The  delay between attempts to resend a failed SMTPD policy ser-
               vice request.
 
        Available in Postfix version 3.1 and later:
 
        <b><a href="postconf.5.html#smtpd_policy_service_policy_context">smtpd_policy_service_policy_context</a> (empty)</b>
-              Optional  information  that the Postfix SMTP server specifies in
-              the "policy_context"  attribute  of  a  policy  service  request
-              (originally,  to  share the same service endpoint among multiple
+              Optional information that the Postfix SMTP server  specifies  in
+              the  "policy_context"  attribute  of  a  policy  service request
+              (originally, to share the same service endpoint  among  multiple
               <a href="postconf.5.html#check_policy_service">check_policy_service</a> clients).
 
 <b><a name="access_controls">ACCESS CONTROLS</a></b>
-       The <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a> document gives an introduction to all the  SMTP
+       The  <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a> document gives an introduction to all the SMTP
        server access control features.
 
        <b><a href="postconf.5.html#smtpd_delay_reject">smtpd_delay_reject</a> (yes)</b>
-              Wait    until    the   RCPT   TO   command   before   evaluating
+              Wait   until   the   RCPT   TO   command    before    evaluating
               $<a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a>,     $<a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a>     and
               $<a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a>,  or  wait  until  the  ETRN  command
-              before      evaluating      $<a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a>       and
+              before       evaluating      $<a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a>      and
               $<a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a>.
 
        <b><a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a> (see 'postconf -d' output)</b>
-              A  list of Postfix features where the pattern "example.com" also
-              matches subdomains  of  example.com,  instead  of  requiring  an
+              A list of Postfix features where the pattern "example.com"  also
+              matches  subdomains  of  example.com,  instead  of  requiring an
               explicit ".example.com" pattern.
 
        <b><a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> (empty)</b>
-              Optional  restrictions  that  the Postfix SMTP server applies in
+              Optional restrictions that the Postfix SMTP  server  applies  in
               the context of a client connection request.
 
        <b><a href="postconf.5.html#smtpd_helo_required">smtpd_helo_required</a> (no)</b>
-              Require that a remote SMTP client  introduces  itself  with  the
-              HELO  or  EHLO  command before sending the MAIL command or other
+              Require  that  a  remote  SMTP client introduces itself with the
+              HELO or EHLO command before sending the MAIL  command  or  other
               commands that require EHLO negotiation.
 
        <b><a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a> (empty)</b>
-              Optional restrictions that the Postfix SMTP  server  applies  in
+              Optional  restrictions  that  the Postfix SMTP server applies in
               the context of a client HELO command.
 
        <b><a href="postconf.5.html#smtpd_sender_restrictions">smtpd_sender_restrictions</a> (empty)</b>
-              Optional  restrictions  that  the Postfix SMTP server applies in
+              Optional restrictions that the Postfix SMTP  server  applies  in
               the context of a client MAIL FROM command.
 
        <b><a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> (see 'postconf -d' output)</b>
-              Optional restrictions that the Postfix SMTP  server  applies  in
-              the    context    of   a   client   RCPT   TO   command,   after
+              Optional  restrictions  that  the Postfix SMTP server applies in
+              the   context   of   a   client   RCPT   TO    command,    after
               <a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a>.
 
        <b><a href="postconf.5.html#smtpd_etrn_restrictions">smtpd_etrn_restrictions</a> (empty)</b>
-              Optional restrictions that the Postfix SMTP  server  applies  in
+              Optional  restrictions  that  the Postfix SMTP server applies in
               the context of a client ETRN command.
 
        <b><a href="postconf.5.html#allow_untrusted_routing">allow_untrusted_routing</a> (no)</b>
-              Forward       mail       with      sender-specified      routing
-              (user[@%!]remote[@%!]site) from untrusted  clients  to  destina-
+              Forward      mail      with       sender-specified       routing
+              (user[@%!]remote[@%!]site)  from  untrusted  clients to destina-
               tions matching $<a href="postconf.5.html#relay_domains">relay_domains</a>.
 
        <b><a href="postconf.5.html#smtpd_restriction_classes">smtpd_restriction_classes</a> (empty)</b>
               User-defined aliases for groups of access restrictions.
 
        <b><a href="postconf.5.html#smtpd_null_access_lookup_key">smtpd_null_access_lookup_key</a> (</b>&lt;&gt;<b>)</b>
-              The  lookup  key  to be used in SMTP <a href="access.5.html"><b>access</b>(5)</a> tables instead of
+              The lookup key to be used in SMTP <a href="access.5.html"><b>access</b>(5)</a>  tables  instead  of
               the null sender address.
 
        <b><a href="postconf.5.html#permit_mx_backup_networks">permit_mx_backup_networks</a> (empty)</b>
-              Restrict the use of the <a href="postconf.5.html#permit_mx_backup">permit_mx_backup</a> SMTP access feature  to
+              Restrict  the use of the <a href="postconf.5.html#permit_mx_backup">permit_mx_backup</a> SMTP access feature to
               only domains whose primary MX hosts match the listed networks.
 
        Available in Postfix version 2.0 and later:
@@ -1173,19 +1179,19 @@ SMTPD(8)                                                              SMTPD(8)
               applies in the context of the SMTP DATA command.
 
        <b><a href="postconf.5.html#smtpd_expansion_filter">smtpd_expansion_filter</a> (see 'postconf -d' output)</b>
-              What characters are allowed in $name  expansions  of  RBL  reply
+              What  characters  are  allowed  in $name expansions of RBL reply
               templates.
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_reject_unlisted_sender">smtpd_reject_unlisted_sender</a> (no)</b>
-              Request  that  the Postfix SMTP server rejects mail from unknown
-              sender addresses, even when no  explicit  <a href="postconf.5.html#reject_unlisted_sender">reject_unlisted_sender</a>
+              Request that the Postfix SMTP server rejects mail  from  unknown
+              sender  addresses,  even when no explicit <a href="postconf.5.html#reject_unlisted_sender">reject_unlisted_sender</a>
               access restriction is specified.
 
        <b><a href="postconf.5.html#smtpd_reject_unlisted_recipient">smtpd_reject_unlisted_recipient</a> (yes)</b>
-              Request  that  the  Postfix SMTP server rejects mail for unknown
-              recipient     addresses,     even     when      no      explicit
+              Request that the Postfix SMTP server rejects  mail  for  unknown
+              recipient      addresses,      even     when     no     explicit
               <a href="postconf.5.html#reject_unlisted_recipient">reject_unlisted_recipient</a> access restriction is specified.
 
        Available in Postfix version 2.2 and later:
@@ -1199,17 +1205,17 @@ SMTPD(8)                                                              SMTPD(8)
        <b><a href="postconf.5.html#smtpd_relay_restrictions">smtpd_relay_restrictions</a> (<a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, <a href="postconf.5.html#permit_sasl_authenticated">permit_sasl_authenticated</a>,</b>
        <b><a href="postconf.5.html#defer_unauth_destination">defer_unauth_destination</a>)</b>
               Access restrictions for mail relay control that the Postfix SMTP
-              server  applies  in  the  context of the RCPT TO command, before
+              server applies in the context of the  RCPT  TO  command,  before
               <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.
 
 <b><a name="sender_and_recipient_address_verification_controls">SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS</a></b>
-       Postfix version 2.1 introduces sender and recipient  address  verifica-
+       Postfix  version  2.1 introduces sender and recipient address verifica-
        tion.  This feature is implemented by sending probe email messages that
        are  not  actually  delivered.   This  feature  is  requested  via  the
-       <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a>    and    <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>   access
-       restrictions.  The status of verification probes is maintained  by  the
-       <a href="verify.8.html"><b>verify</b>(8)</a>  server.  See the file <a href="ADDRESS_VERIFICATION_README.html">ADDRESS_VERIFICATION_README</a> for infor-
-       mation about how to configure and operate the Postfix  sender/recipient
+       <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a>   and    <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>    access
+       restrictions.   The  status of verification probes is maintained by the
+       <a href="verify.8.html"><b>verify</b>(8)</a> server.  See the file <a href="ADDRESS_VERIFICATION_README.html">ADDRESS_VERIFICATION_README</a> for  infor-
+       mation  about how to configure and operate the Postfix sender/recipient
        address verification service.
 
        <b><a href="postconf.5.html#address_verify_poll_count">address_verify_poll_count</a> (normal: 3, <a href="STRESS_README.html">overload</a>: 1)</b>
@@ -1221,7 +1227,7 @@ SMTPD(8)                                                              SMTPD(8)
               fication request in progress.
 
        <b><a href="postconf.5.html#address_verify_sender">address_verify_sender</a> ($<a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a>)</b>
-              The  sender address to use in address verification probes; prior
+              The sender address to use in address verification probes;  prior
               to Postfix 2.5 the default was "postmaster".
 
        <b><a href="postconf.5.html#unverified_sender_reject_code">unverified_sender_reject_code</a> (450)</b>
@@ -1229,18 +1235,18 @@ SMTPD(8)                                                              SMTPD(8)
               address is rejected by the <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a> restriction.
 
        <b><a href="postconf.5.html#unverified_recipient_reject_code">unverified_recipient_reject_code</a> (450)</b>
-              The numerical Postfix SMTP  server  response  when  a  recipient
-              address  is rejected by the <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a> restric-
+              The  numerical  Postfix  SMTP  server  response when a recipient
+              address is rejected by the <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>  restric-
               tion.
 
        Available in Postfix version 2.6 and later:
 
        <b><a href="postconf.5.html#unverified_sender_defer_code">unverified_sender_defer_code</a> (450)</b>
-              The numerical Postfix SMTP server response code  when  a  sender
+              The  numerical  Postfix  SMTP server response code when a sender
               address probe fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unverified_recipient_defer_code">unverified_recipient_defer_code</a> (450)</b>
-              The  numerical  Postfix  SMTP  server  response when a recipient
+              The numerical Postfix SMTP  server  response  when  a  recipient
               address probe fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unverified_sender_reject_reason">unverified_sender_reject_reason</a> (empty)</b>
@@ -1252,17 +1258,17 @@ SMTPD(8)                                                              SMTPD(8)
               <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipient</a>.
 
        <b><a href="postconf.5.html#unverified_sender_tempfail_action">unverified_sender_tempfail_action</a> ($<a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a>)</b>
-              The Postfix SMTP server's action  when  <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a>
+              The  Postfix  SMTP server's action when <a href="postconf.5.html#reject_unverified_sender">reject_unverified_sender</a>
               fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unverified_recipient_tempfail_action">unverified_recipient_tempfail_action</a> ($<a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a>)</b>
-              The  Postfix SMTP server's action when <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipi</a>-
+              The Postfix SMTP server's action when  <a href="postconf.5.html#reject_unverified_recipient">reject_unverified_recipi</a>-
               <a href="postconf.5.html#reject_unverified_recipient">ent</a> fails due to a temporary error condition.
 
        Available with Postfix 2.9 and later:
 
        <b><a href="postconf.5.html#address_verify_sender_ttl">address_verify_sender_ttl</a> (0s)</b>
-              The time  between  changes  in  the  time-dependent  portion  of
+              The  time  between  changes  in  the  time-dependent  portion of
               address verification probe sender addresses.
 
 <b><a name="access_control_responses">ACCESS CONTROL RESPONSES</a></b>
@@ -1274,36 +1280,36 @@ SMTPD(8)                                                              SMTPD(8)
               map "reject" action.
 
        <b><a href="postconf.5.html#defer_code">defer_code</a> (450)</b>
-              The  numerical  Postfix  SMTP server response code when a remote
+              The numerical Postfix SMTP server response code  when  a  remote
               SMTP client request is rejected by the "defer" restriction.
 
        <b><a href="postconf.5.html#invalid_hostname_reject_code">invalid_hostname_reject_code</a> (501)</b>
-              The numerical Postfix SMTP server response code when the  client
-              HELO   or   EHLO   command   parameter   is   rejected   by  the
+              The  numerical Postfix SMTP server response code when the client
+              HELO  or   EHLO   command   parameter   is   rejected   by   the
               <a href="postconf.5.html#reject_invalid_helo_hostname">reject_invalid_helo_hostname</a> restriction.
 
        <b><a href="postconf.5.html#maps_rbl_reject_code">maps_rbl_reject_code</a> (554)</b>
-              The numerical Postfix SMTP server response code  when  a  remote
-              SMTP   client  request  is  blocked  by  the  <a href="postconf.5.html#reject_rbl_client">reject_rbl_client</a>,
+              The  numerical  Postfix  SMTP server response code when a remote
+              SMTP  client  request  is  blocked  by  the   <a href="postconf.5.html#reject_rbl_client">reject_rbl_client</a>,
               <a href="postconf.5.html#reject_rhsbl_client">reject_rhsbl_client</a>,                <a href="postconf.5.html#reject_rhsbl_reverse_client">reject_rhsbl_reverse_client</a>,
               <a href="postconf.5.html#reject_rhsbl_sender">reject_rhsbl_sender</a> or <a href="postconf.5.html#reject_rhsbl_recipient">reject_rhsbl_recipient</a> restriction.
 
        <b><a href="postconf.5.html#non_fqdn_reject_code">non_fqdn_reject_code</a> (504)</b>
-              The  numerical  Postfix  SMTP  server  reply  code when a client
-              request  is  rejected  by   the   <a href="postconf.5.html#reject_non_fqdn_helo_hostname">reject_non_fqdn_helo_hostname</a>,
+              The numerical Postfix SMTP  server  reply  code  when  a  client
+              request   is   rejected  by  the  <a href="postconf.5.html#reject_non_fqdn_helo_hostname">reject_non_fqdn_helo_hostname</a>,
               <a href="postconf.5.html#reject_non_fqdn_sender">reject_non_fqdn_sender</a> or <a href="postconf.5.html#reject_non_fqdn_recipient">reject_non_fqdn_recipient</a> restriction.
 
        <b><a href="postconf.5.html#plaintext_reject_code">plaintext_reject_code</a> (450)</b>
-              The numerical Postfix SMTP server response code when  a  request
+              The  numerical  Postfix SMTP server response code when a request
               is rejected by the <b><a href="postconf.5.html#reject_plaintext_session">reject_plaintext_session</a></b> restriction.
 
        <b><a href="postconf.5.html#reject_code">reject_code</a> (554)</b>
-              The  numerical  Postfix  SMTP server response code when a remote
+              The numerical Postfix SMTP server response code  when  a  remote
               SMTP client request is rejected by the "reject" restriction.
 
        <b><a href="postconf.5.html#relay_domains_reject_code">relay_domains_reject_code</a> (554)</b>
-              The numerical Postfix SMTP server response code  when  a  client
-              request  is  rejected by the <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a> recipient
+              The  numerical  Postfix  SMTP server response code when a client
+              request is rejected by the  <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>  recipient
               restriction.
 
        <b><a href="postconf.5.html#unknown_address_reject_code">unknown_address_reject_code</a> (450)</b>
@@ -1311,24 +1317,24 @@ SMTPD(8)                                                              SMTPD(8)
               a sender or recipient address because its domain is unknown.
 
        <b><a href="postconf.5.html#unknown_client_reject_code">unknown_client_reject_code</a> (450)</b>
-              The  numerical  Postfix  SMTP server response code when a client
-              without valid address  &lt;=&gt;  name  mapping  is  rejected  by  the
+              The numerical Postfix SMTP server response code  when  a  client
+              without  valid  address  &lt;=&gt;  name  mapping  is  rejected by the
               <a href="postconf.5.html#reject_unknown_client_hostname">reject_unknown_client_hostname</a> restriction.
 
        <b><a href="postconf.5.html#unknown_hostname_reject_code">unknown_hostname_reject_code</a> (450)</b>
-              The  numerical  Postfix SMTP server response code when the host-
-              name specified with the HELO or EHLO command is rejected by  the
+              The numerical Postfix SMTP server response code when  the  host-
+              name  specified with the HELO or EHLO command is rejected by the
               <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_hostname</a> restriction.
 
        Available in Postfix version 2.0 and later:
 
        <b><a href="postconf.5.html#default_rbl_reply">default_rbl_reply</a> (see 'postconf -d' output)</b>
-              The  default Postfix SMTP server response template for a request
+              The default Postfix SMTP server response template for a  request
               that is rejected by an RBL-based restriction.
 
        <b><a href="postconf.5.html#multi_recipient_bounce_reject_code">multi_recipient_bounce_reject_code</a> (550)</b>
-              The numerical Postfix SMTP server response code  when  a  remote
-              SMTP  client  request  is  blocked  by  the <a href="postconf.5.html#reject_multi_recipient_bounce">reject_multi_recipi</a>-
+              The  numerical  Postfix  SMTP server response code when a remote
+              SMTP client  request  is  blocked  by  the  <a href="postconf.5.html#reject_multi_recipient_bounce">reject_multi_recipi</a>-
               <a href="postconf.5.html#reject_multi_recipient_bounce">ent_bounce</a> restriction.
 
        <b><a href="postconf.5.html#rbl_reply_maps">rbl_reply_maps</a> (empty)</b>
@@ -1338,52 +1344,52 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#access_map_defer_code">access_map_defer_code</a> (450)</b>
               The numerical Postfix SMTP server response code for an <a href="access.5.html"><b>access</b>(5)</a>
-              map    "defer"    action,    including    "<a href="postconf.5.html#defer_if_permit">defer_if_permit</a>"   or
+              map   "defer"    action,    including    "<a href="postconf.5.html#defer_if_permit">defer_if_permit</a>"    or
               "<a href="postconf.5.html#defer_if_reject">defer_if_reject</a>".
 
        <b><a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a> (<a href="postconf.5.html#defer_if_permit">defer_if_permit</a>)</b>
-              The Postfix SMTP server's action when a reject-type  restriction
+              The  Postfix SMTP server's action when a reject-type restriction
               fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unknown_helo_hostname_tempfail_action">unknown_helo_hostname_tempfail_action</a> ($<a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a>)</b>
-              The  Postfix SMTP server's action when <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_host</a>-
+              The Postfix SMTP server's action when  <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_host</a>-
               <a href="postconf.5.html#reject_unknown_helo_hostname">name</a> fails due to a temporary error condition.
 
        <b><a href="postconf.5.html#unknown_address_tempfail_action">unknown_address_tempfail_action</a> ($<a href="postconf.5.html#reject_tempfail_action">reject_tempfail_action</a>)</b>
-              The      Postfix      SMTP      server's       action       when
-              <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a>  or <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a>
+              The       Postfix       SMTP      server's      action      when
+              <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a> or  <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a>
               fail due to a temporary error condition.
 
 <b><a name="miscellaneous_controls">MISCELLANEOUS CONTROLS</a></b>
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The default location of the Postfix <a href="postconf.5.html">main.cf</a> and  <a href="master.5.html">master.cf</a>  con-
+              The  default  location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
               figuration files.
 
        <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
-              How  much  time  a  Postfix  daemon process may take to handle a
+              How much time a Postfix daemon process  may  take  to  handle  a
               request before it is terminated by a built-in watchdog timer.
 
        <b><a href="postconf.5.html#command_directory">command_directory</a> (see 'postconf -d' output)</b>
               The location of all postfix administrative commands.
 
        <b><a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a> (double-bounce)</b>
-              The sender address of postmaster notifications that  are  gener-
+              The  sender  address of postmaster notifications that are gener-
               ated by the mail system.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
-              The  time  limit  for  sending  or receiving information over an
+              The time limit for sending  or  receiving  information  over  an
               internal communication channel.
 
        <b><a href="postconf.5.html#mail_name">mail_name</a> (Postfix)</b>
-              The mail system name that is displayed in Received: headers,  in
+              The  mail system name that is displayed in Received: headers, in
               the SMTP greeting banner, and in bounced mail.
 
        <b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b>
-              The  UNIX  system  account  that owns the Postfix queue and most
+              The UNIX system account that owns the  Postfix  queue  and  most
               Postfix daemon processes.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The maximum amount of time that an idle Postfix  daemon  process
+              The  maximum  amount of time that an idle Postfix daemon process
               waits for an incoming connection before terminating voluntarily.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
@@ -1394,11 +1400,11 @@ SMTPD(8)                                                              SMTPD(8)
               The internet hostname of this mail system.
 
        <b><a href="postconf.5.html#mynetworks">mynetworks</a> (see 'postconf -d' output)</b>
-              The  list of "trusted" remote SMTP clients that have more privi-
+              The list of "trusted" remote SMTP clients that have more  privi-
               leges than "strangers".
 
        <b><a href="postconf.5.html#myorigin">myorigin</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
-              The domain name that locally-posted mail appears to  come  from,
+              The  domain  name that locally-posted mail appears to come from,
               and that locally posted mail is delivered to.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
@@ -1411,24 +1417,24 @@ SMTPD(8)                                                              SMTPD(8)
               The location of the Postfix top-level queue directory.
 
        <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
-              The  set of characters that can separate an email address local-
+              The set of characters that can separate an email address  local-
               part, user name, or a .forward file name from its extension.
 
        <b><a href="postconf.5.html#smtpd_banner">smtpd_banner</a> ($<a href="postconf.5.html#myhostname">myhostname</a> ESMTP $<a href="postconf.5.html#mail_name">mail_name</a>)</b>
-              The text that follows the 220 status code in the  SMTP  greeting
+              The  text  that follows the 220 status code in the SMTP greeting
               banner.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              A  prefix  that  is  prepended  to  the  process  name in syslog
+              A prefix that  is  prepended  to  the  process  name  in  syslog
               records, so that, for example, "smtpd" becomes "prefix/smtpd".
 
        Available in Postfix version 2.2 and later:
 
        <b><a href="postconf.5.html#smtpd_forbidden_commands">smtpd_forbidden_commands</a> (CONNECT GET POST <a href="regexp_table.5.html">regexp</a>:{{/^[^A-Z]/ Bogus}})</b>
-              List of commands that cause the Postfix SMTP server  to  immedi-
+              List  of  commands that cause the Postfix SMTP server to immedi-
               ately terminate the session with a 221 code.
 
        Available in Postfix version 2.5 and later:
@@ -1445,20 +1451,20 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix 3.4 and later:
 
        <b><a href="postconf.5.html#smtpd_reject_footer_maps">smtpd_reject_footer_maps</a> (empty)</b>
-              Lookup tables, indexed by the complete Postfix SMTP  server  4xx
+              Lookup  tables,  indexed by the complete Postfix SMTP server 4xx
               or 5xx response, with reject footer templates.
 
        Available in Postfix 3.10 and later:
 
        <b><a href="postconf.5.html#smtpd_hide_client_session">smtpd_hide_client_session</a> (no)</b>
-              Do  not  include  SMTP client session information in the Postfix
+              Do not include SMTP client session information  in  the  Postfix
               SMTP server's Received: message header.
 
        Available in Postfix version 3.11 and later:
 
        <b><a href="postconf.5.html#smtpd_reject_filter_maps">smtpd_reject_filter_maps</a> (empty)</b>
-              An optional filter that can replace a reject response  from  the
-              Postfix  SMTP  server  itself,  or  from  a program that replies
+              An  optional  filter that can replace a reject response from the
+              Postfix SMTP server itself,  or  from  a  program  that  replies
               through the Postfix SMTP server.
 
 <b><a name="see_also">SEE ALSO</a></b>
index 79f32656a24afa9f24ecb8e4479cea4b1a66d740..d21749a23f0662eb44366a7caf6968bf1743cb13 100644 (file)
@@ -280,27 +280,9 @@ case "$SYSTEM.$RELEASE" in
              *) error "Seems to be UnixWare`uname -v`. Untested.";;
                esac
                ;;
-  FreeBSD.2*)  SYSTYPE=FREEBSD2
+FreeBSD.[2-7].*) SYSTYPE=FREEBSD$RELEASE_MAJOR
                ;;
-  FreeBSD.3*)  SYSTYPE=FREEBSD3
-               ;;
-  FreeBSD.4*)  SYSTYPE=FREEBSD4
-               ;;
-  FreeBSD.5*)  SYSTYPE=FREEBSD5
-               ;;
-  FreeBSD.6*)  SYSTYPE=FREEBSD6
-               ;;
-  FreeBSD.7*)  SYSTYPE=FREEBSD7
-               ;;
-  FreeBSD.8*)  SYSTYPE=FREEBSD8
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC-gcc} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC-gcc} -shared"}
-               ;;
-  FreeBSD.9*)  SYSTYPE=FREEBSD9
+FreeBSD.[89].*)        SYSTYPE=FREEBSD$RELEASE_MAJOR
                : ${SHLIB_SUFFIX=.so}
                : ${SHLIB_CFLAGS=-fPIC}
                : ${SHLIB_LD="${CC-gcc} -shared"' -Wl,-soname,${LIB}'}
@@ -308,43 +290,7 @@ case "$SYSTEM.$RELEASE" in
                : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
                : ${PLUGIN_LD="${CC-gcc} -shared"}
                ;;
-  FreeBSD.10*) SYSTYPE=FREEBSD10
-               : ${CC=cc}
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC} -shared"}
-               ;;
-   FreeBSD.11*) SYSTYPE=FREEBSD11
-               : ${CC=cc}
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC} -shared"}
-               ;;
-   FreeBSD.12*) SYSTYPE=FREEBSD12
-               : ${CC=cc}
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC} -shared"}
-               ;;
-   FreeBSD.13*)        SYSTYPE=FREEBSD13
-               : ${CC=cc}
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC} -shared"}
-               ;;
-   FreeBSD.14*)        SYSTYPE=FREEBSD14
+  FreeBSD.*)   SYSTYPE=FREEBSD$RELEASE_MAJOR
                : ${CC=cc}
                : ${SHLIB_SUFFIX=.so}
                : ${SHLIB_CFLAGS=-fPIC}
@@ -355,31 +301,9 @@ case "$SYSTEM.$RELEASE" in
                ;;
  DragonFly.*)  SYSTYPE=DRAGONFLY
                ;;
-  OpenBSD.2*)  SYSTYPE=OPENBSD2
-               ;;
-  OpenBSD.3*)  SYSTYPE=OPENBSD3
-               ;;
-  OpenBSD.4*)  SYSTYPE=OPENBSD4
-               ;;
-  OpenBSD.5*)  SYSTYPE=OPENBSD5
-               : ${CC=cc}
-               : ${SHLIB_SUFFIX=.so.1.0}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC} -shared"}
-               ;;
-  OpenBSD.6*)  SYSTYPE=OPENBSD6
-               : ${CC=cc}
-               : ${SHLIB_SUFFIX=.so.1.0}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC} -shared"}
+OpenBSD.[2-4].*) SYSTYPE=OPENBSD$RELEASE_MAJOR
                ;;
-  OpenBSD.7*)  SYSTYPE=OPENBSD7
+  OpenBSD.*)   SYSTYPE=OPENBSD$RELEASE_MAJOR
                : ${CC=cc}
                : ${SHLIB_SUFFIX=.so.1.0}
                : ${SHLIB_CFLAGS=-fPIC}
@@ -390,49 +314,9 @@ case "$SYSTEM.$RELEASE" in
                ;;
   ekkoBSD.1*)  SYSTYPE=EKKOBSD1
                ;;
-   NetBSD.1*)  SYSTYPE=NETBSD1
-               ;;
-   NetBSD.2*)  SYSTYPE=NETBSD2
-               ;;
-   NetBSD.3*)  SYSTYPE=NETBSD3
-               ;;
-   NetBSD.4*)  SYSTYPE=NETBSD4
-               ;;
-   NetBSD.5*)  SYSTYPE=NETBSD5
-               ;;
-   NetBSD.6*)  SYSTYPE=NETBSD6
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC-gcc} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC-gcc} -shared"}
-               ;;
-   NetBSD.7*)  SYSTYPE=NETBSD7
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC-gcc} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC-gcc} -shared"}
-               ;;
-   NetBSD.8*)  SYSTYPE=NETBSD8
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC-gcc} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC-gcc} -shared"}
-               ;;
-   NetBSD.9*)  SYSTYPE=NETBSD9
-               : ${SHLIB_SUFFIX=.so}
-               : ${SHLIB_CFLAGS=-fPIC}
-               : ${SHLIB_LD="${CC-gcc} -shared"' -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
-               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
-               : ${PLUGIN_LD="${CC-gcc} -shared"}
+NetBSD.[1-5].*)        SYSTYPE=NETBSD$RELEASE_MAJOR
                ;;
-   NetBSD.10*) SYSTYPE=NETBSD10
+   NetBSD.*)   SYSTYPE=NETBSD$RELEASE_MAJOR
                : ${SHLIB_SUFFIX=.so}
                : ${SHLIB_CFLAGS=-fPIC}
                : ${SHLIB_LD="${CC-gcc} -shared"' -Wl,-soname,${LIB}'}
@@ -454,10 +338,10 @@ case "$SYSTEM.$RELEASE" in
                V[0-4].*) CCARGS="$CCARGS -DNO_IPV6";;
                esac
                ;;
-    SunOS.4*)  SYSTYPE=SUNOS4
+    SunOS.4.*) SYSTYPE=SUNOS4
                SYSLIBS=-lresolv
                ;;
-    SunOS.5*)  SYSTYPE=SUNOS5
+    SunOS.5.*) SYSTYPE=SUNOS5
                RANLIB=echo
                SYSLIBS="-lresolv -lsocket -lnsl -ldl"
                : ${SHLIB_SUFFIX=.so}
@@ -554,14 +438,14 @@ case "$SYSTEM.$RELEASE" in
                *)      error "Unknown AIX version: `uname -v`.";;
                esac;;
                # Tested with RedHat 3.03 on 20020729.
-    Linux.1*)  SYSTYPE=LINUX1
+    Linux.1.*) SYSTYPE=LINUX1
                case "$CCARGS" in
                 *-DNO_DB*) ;;
                 *-DHAS_DB*) ;;
                 *) SYSLIBS="-ldb";;
                esac
                ;;
-    Linux.2*)  SYSTYPE=LINUX2
+    Linux.2.*) SYSTYPE=LINUX2
                case "$CCARGS" in
                 *-DNO_DB*) ;;
                 *-DHAS_DB*) ;;
@@ -642,8 +526,7 @@ EOF
                : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
                : ${PLUGIN_LD="${CC-gcc} -shared"}
                ;;
-    Linux.[34567].*)
-               SYSTYPE=LINUX$RELEASE_MAJOR
+    Linux.*)   SYSTYPE=LINUX$RELEASE_MAJOR
                case "$CCARGS" in
                 *-DNO_DB*) ;;
                 *-DHAS_DB*) case "$AUXLIBS_DB" in
index a1765cac52f85f37c55d78735173d38b0d62d765..a4b25a0e6aa20306900f8e698a9d4f7888003798 100644 (file)
@@ -3630,6 +3630,10 @@ The LMTP\-specific version of the smtp_tls_loglevel
 configuration parameter.  See there for details.
 .PP
 This feature is available in Postfix 2.3 and later.
+.SH lmtp_tls_loglevel_maps (default: $smtp_tls_loglevel_maps)
+The \fBlmtp\fR(8) equivalent of smtp_tls_loglevel_maps.
+.PP
+This feature is available in Postfix 3.12 and later.
 .SH lmtp_tls_mandatory_ciphers (default: medium)
 The LMTP\-specific version of the smtp_tls_mandatory_ciphers
 configuration parameter.  See there for details.
@@ -6106,6 +6110,12 @@ This feature is available in Postfix 3.12 and later.
 The \fBpostscreen\fR(8) equivalent of smtpd_tls_loglevel.
 .PP
 This feature is available in Postfix 3.12 and later.
+.SH postscreen_tls_loglevel_maps (default: $smtpd_tls_loglevel_maps)
+Optional TLS loglevel override that depends on the remote peer
+host name or IP address. See smtp_tls_loglevel_maps for a detailed
+description.
+.PP
+This feature is available in Postfix 3.12 and later.
 .SH postscreen_tls_mandatory_ciphers (default: $smtpd_tls_mandatory_ciphers)
 The \fBpostscreen\fR(8) equivalent of smtpd_tls_mandatory_ciphers.
 .PP
@@ -9885,6 +9895,66 @@ Do not use "smtp_tls_loglevel = 2" or higher except in case of
 problems. Use of loglevel 4 is strongly discouraged.
 .PP
 This feature is available in Postfix 2.2 and later.
+.SH smtp_tls_loglevel_maps (default: empty)
+Optional TLS loglevel override that depends on the remote peer
+host name or IP address. The text below also covers smtpd_tls_loglevel_maps
+and postscreen_tls_loglevel_maps.
+.PP
+Specify zero or more lookup tables separated by comma or
+whitespace. The table syntax is as follows:
+.IP \(bu
+On the left\-hand side, specify a domain name, IPv4 or IPv6
+network address, or a substring pattern as described below. An
+internationalized domain name MUST be in A\-label form (xn\-\-mumble).
+An IPv4 address MUST be in dotted\-quad form; an IPv6 address MUST
+be in compressed form (text::text). Do not enclose any of these
+inputs with "[" and "]".
+.IP \(bu
+On the right\-hand side, specify a valid TLS loglevel value,
+or "DUNNO" for a "quick exit" as described below.
+.br
+.PP
+The over\-all search strategy is as follows:
+.IP \(bu
+Look up the peer name in all specified lookup tables, and
+stop at the first match. If no match was found, this may be followed
+by substring lookups as described below. Note: peer name lookup is
+not applicable for \fBpostscreen\fR(8) because that service does not have
+the remote SMTP client name.
+.IP \(bu
+If no peer name match is found, look up the peer IP address
+in all specified lookup tables, and stop at the first match. If no
+match was found, this may be followed by substring lookups as
+described below.
+.IP \(bu
+If any lookup result returns "DUNNO", terminate the search
+and pretend that no name match and no address match were found.
+.br
+.PP
+This feature may generate substring queries for a fixed\-string
+lookup table (examples: hash:, lmdb:, pgsql:). Substring queries
+do not happen with regexp:, pcre:, and cidr: tables.
+.IP \(bu
+By default, after all table queries with a full domain
+name (example: "mail.example.com") produce "not found", the next
+queries will use the parent domains with '.' prepended (examples:
+".example.com" and ".com") until a match is found or until all
+substrings have been tried.
+.IP \(bu
+To generate domain name substring queries without the
+leading '.' (examples: "example.com" and "com"), specify the
+applicable configuration parameter name ("smtpd_tls_policy_maps",
+"smtp_tls_policy_maps", or "postscreen_tls_policy_maps") in the
+parent_domain_matches_subdomains parameter value.
+.IP \(bu
+After all table queries with a full IP address produce
+"not found", the next queries will use subnetworks, by repeatedly
+removing the last ".text" component from a dotted\-quad IPv4 address,
+or the last ":text" component from a compressed\-form IPv6 address,
+until a match is found or until all subnetworks have been tried.
+.br
+.PP
+This feature is available in Postfix 3.12 and later.
 .SH smtp_tls_mandatory_ciphers (default: medium)
 The minimum TLS cipher grade that the Postfix SMTP client will
 use with
@@ -14353,6 +14423,12 @@ Do not use "smtpd_tls_loglevel = 2" or higher except in case
 of problems. Use of loglevel 4 is strongly discouraged.
 .PP
 This feature is available in Postfix 2.2 and later.
+.SH smtpd_tls_loglevel_maps (default: empty)
+Optional TLS loglevel override that depends on the remote peer
+host name or IP address. See smtp_tls_loglevel_maps for a detailed
+description.
+.PP
+This feature is available in Postfix 3.12 and later.
 .SH smtpd_tls_mandatory_ciphers (default: medium)
 The minimum TLS cipher grade that the Postfix SMTP server will
 use with mandatory TLS encryption. The default grade ("medium") is
index bec651ffb019f11920716d3e648f181ff13d7eda..73a338e77a87f739bf831016bd14e6a6862febbb 100644 (file)
@@ -431,6 +431,9 @@ The \fBpostscreen\fR(8) equivalent of smtpd_tls_fingerprint_digest.
 The \fBpostscreen\fR(8) equivalent of smtpd_tls_key_file.
 .IP "\fBpostscreen_tls_loglevel ($smtpd_tls_loglevel)\fR"
 The \fBpostscreen\fR(8) equivalent of smtpd_tls_loglevel.
+.IP "\fBpostscreen_tls_loglevel_maps ($smtpd_tls_loglevel_maps)\fR"
+Optional TLS loglevel override that depends on the remote peer
+host name or IP address.
 .IP "\fBpostscreen_tls_mandatory_ciphers ($smtpd_tls_mandatory_ciphers)\fR"
 The \fBpostscreen\fR(8) equivalent of smtpd_tls_mandatory_ciphers.
 .IP "\fBpostscreen_tls_mandatory_exclude_ciphers ($smtpd_tls_mandatory_exclude_ciphers)\fR"
index 20a6734d088f367c6595effd584095ebdaa606c3..11da44d31630973d47e5fcd790d54d04a62ddc9e 100644 (file)
@@ -704,6 +704,11 @@ for messages received with the REQUIRETLS option.
 .IP "\fBsmtp_log_tls_feature_status (yes)\fR"
 Enable logging of TLS feature information in delivery status
 logging.
+.PP
+Available in Postfix version 3.12 and later:
+.IP "\fBsmtp_tls_loglevel_maps (empty)\fR"
+Optional TLS loglevel override that depends on the remote peer
+host name or IP address.
 .SH "OBSOLETE TLS CONTROLS"
 .na
 .nf
index 349faf222c3e9c776e0b4d1a628cff9701230617..f79feab31ea76e2974f3d820f75143c25c9e2e36 100644 (file)
@@ -591,6 +591,11 @@ yes" message header.
 Whether to trust client certificates whose extended key usage (EKU) lists
 only \fBserverAuth\fR and not \fBclientAuth\fR as valid TLS client
 certificates.
+.PP
+Available in Postfix version 3.12 and later:
+.IP "\fBsmtpd_tls_loglevel_maps (empty)\fR"
+Optional TLS loglevel override that depends on the remote peer
+host name or IP address.
 .SH "OBSOLETE TLS CONTROLS"
 .na
 .nf
index 8affa0b62037c092de5a5df1112c259214fed49c..159e05a125c96f4ef2592bfe1afa152238a62479 100755 (executable)
@@ -275,6 +275,7 @@ while (<>) {
     s;\blmtp_tls_exclude_ciphers\b;<a href="postconf.5.html#lmtp_tls_exclude_ciphers">$&</a>;g;
     s;\blmtp_tls_mandatory_exclude_ciphers\b;<a href="postconf.5.html#lmtp_tls_mandatory_exclude_ciphers">$&</a>;g;
     s;\blmtp_tls_loglevel\b;<a href="postconf.5.html#lmtp_tls_loglevel">$&</a>;g;
+    s;\blmtp_tls_loglevel_maps\b;<a href="postconf.5.html#lmtp_tls_loglevel_maps">$&</a>;g;
     s;\blmtp_tls_session_cache_database\b;<a href="postconf.5.html#lmtp_tls_session_cache_database">$&</a>;g;
     s;\blmtp_tls_session_cache_timeout\b;<a href="postconf.5.html#lmtp_tls_session_cache_timeout">$&</a>;g;
     s;\blmtp_tls_enable_rpk\b;<a href="postconf.5.html#lmtp_tls_enable_rpk">$&</a>;g;
@@ -693,6 +694,7 @@ while (<>) {
     s;\bsmtp_tls_enforce_peername\b;<a href="postconf.5.html#smtp_tls_enforce_peername">$&</a>;g;
     s;\bsmtp_tls_key_file\b;<a href="postconf.5.html#smtp_tls_key_file">$&</a>;g;
     s;\bsmtp_tls_loglevel\b;<a href="postconf.5.html#smtp_tls_loglevel">$&</a>;g;
+    s;\bsmtp_tls_loglevel_maps\b;<a href="postconf.5.html#smtp_tls_loglevel_maps">$&</a>;g;
     s;\bsmtp_tls_note_starttls_offer\b;<a href="postconf.5.html#smtp_tls_note_starttls_offer">$&</a>;g;
     s;\bsmtp_tls_per_site\b;<a href="postconf.5.html#smtp_tls_per_site">$&</a>;g;
     s;\bsmtp_tls_policy_maps\b;<a href="postconf.5.html#smtp_tls_policy_maps">$&</a>;g;
@@ -767,6 +769,7 @@ while (<>) {
     s;\bsmtpd_tls_key_file\b;<a href="postconf.5.html#smtpd_tls_key_file">$&</a>;g;
     s;\bsmtpd_tls_security_level\b;<a href="postconf.5.html#smtpd_tls_security_level">$&</a>;g;
     s;\bsmtpd_tls_loglevel\b;<a href="postconf.5.html#smtpd_tls_loglevel">$&</a>;g;
+    s;\bsmtpd_tls_loglevel_maps\b;<a href="postconf.5.html#smtpd_tls_loglevel_maps">$&</a>;g;
     s;\bsmtpd_tls_manda[-</bB>]*\n*[ <bB>]*tory_protocols\b;<a href="postconf.5.html#smtpd_tls_mandatory_protocols">$&</a>;g;
     s;\bsmtpd_tls_received_header\b;<a href="postconf.5.html#smtpd_tls_received_header">$&</a>;g;
     s;\bsmtpd_tls_req_ccert\b;<a href="postconf.5.html#smtpd_tls_req_ccert">$&</a>;g;
@@ -1237,6 +1240,7 @@ while (<>) {
     s;\bpostscreen_tls_fingerprint_digest\b;<a href="postconf.5.html#postscreen_tls_fingerprint_digest">$&</a>;g;
     s;\bpostscreen_tls_key_file\b;<a href="postconf.5.html#postscreen_tls_key_file">$&</a>;g;
     s;\bpostscreen_tls_loglevel\b;<a href="postconf.5.html#postscreen_tls_loglevel">$&</a>;g;
+    s;\bpostscreen_tls_loglevel_maps\b;<a href="postconf.5.html#postscreen_tls_loglevel_maps">$&</a>;g;
     s;\bpostscreen_tls_mandatory_ciphers\b;<a href="postconf.5.html#postscreen_tls_mandatory_ciphers">$&</a>;g;
     s;\bpostscreen_tls_mandatory_exclude_ciphers\b;<a href="postconf.5.html#postscreen_tls_mandatory_exclude_ciphers">$&</a>;g;
     s;\bpostscreen_tls_mandatory_protocols\b;<a href="postconf.5.html#postscreen_tls_mandatory_protocols">$&</a>;g;
index f175e65c449ab675f16848860d259a6d0e56c48a..d18943fa878c4991f06905df124fb0326161e16e 100644 (file)
@@ -20861,3 +20861,98 @@ logs. </p>
 <p> The postscreen(8) equivalent of smtpd_tls_ccert_verifydepth. </p>
 
 <p> This feature is available in Postfix 3.12 and later. </p>
+
+%PARAM postscreen_tls_loglevel_maps $smtpd_tls_loglevel_maps
+
+<p> Optional TLS loglevel override that depends on the remote peer
+host name or IP address. See smtp_tls_loglevel_maps for a detailed
+description.
+
+<p> This feature is available in Postfix 3.12 and later. </p>
+
+%PARAM smtpd_tls_loglevel_maps empty
+
+<p> Optional TLS loglevel override that depends on the remote peer
+host name or IP address. See smtp_tls_loglevel_maps for a detailed
+description.
+
+<p> This feature is available in Postfix 3.12 and later. </p>
+
+%PARAM smtp_tls_loglevel_maps empty
+
+<p> Optional TLS loglevel override that depends on the remote peer
+host name or IP address. The text below also covers smtpd_tls_loglevel_maps
+and postscreen_tls_loglevel_maps. </p>
+
+<p> Specify zero or more lookup tables separated by comma or
+whitespace. The table syntax is as follows: <p>
+
+<ul>
+
+<li> <p> On the left-hand side, specify a domain name, IPv4 or IPv6
+network address, or a substring pattern as described below. An
+internationalized domain name MUST be in A-label form (xn--mumble).
+An IPv4 address MUST be in dotted-quad form; an IPv6 address MUST
+be in compressed form (text::text). Do not enclose any of these
+inputs with "[" and "]". </p>
+
+<li> <p> On the right-hand side, specify a valid TLS loglevel value,
+or "DUNNO" for a "quick exit" as described below. </p>
+
+</ul>
+
+<p> The over-all search strategy is as follows: </p>
+
+<ul>
+
+<li> <p> Look up the peer name in all specified lookup tables, and
+stop at the first match. If no match was found, this may be followed
+by substring lookups as described below. Note: peer name lookup is
+not applicable for postscreen(8) because that service does not have
+the remote SMTP client name. </p>
+
+<li> <p> If no peer name match is found, look up the peer IP address
+in all specified lookup tables, and stop at the first match. If no
+match was found, this may be followed by substring lookups as
+described below. </p>
+
+<li> <p> If any lookup result returns "DUNNO", terminate the search
+and pretend that no name match and no address match were found.
+</p>
+
+</ul>
+
+<p> This feature may generate substring queries for a fixed-string
+lookup table (examples: hash:, lmdb:, pgsql:). Substring queries
+do not happen with regexp:, pcre:, and cidr: tables. </p>
+
+<ul>
+
+<li> <p> By default, after all table queries with a full domain
+name (example: "mail.example.com") produce "not found", the next
+queries will use the parent domains with '.' prepended (examples:
+".example.com" and ".com") until a match is found or until all
+substrings have been tried. </p>
+
+<li> <p> To generate domain name substring queries without the
+leading '.' (examples: "example.com" and "com"), specify the
+applicable configuration parameter name ("smtpd_tls_policy_maps",
+"smtp_tls_policy_maps", or "postscreen_tls_policy_maps") in the
+parent_domain_matches_subdomains parameter value. </p>
+
+<li> <p> After all table queries with a full IP address produce
+"not found", the next queries will use subnetworks, by repeatedly
+removing the last ".text" component from a dotted-quad IPv4 address,
+or the last ":text" component from a compressed-form IPv6 address,
+until a match is found or until all subnetworks have been tried.
+</p>
+
+</ul>
+
+<p> This feature is available in Postfix 3.12 and later. </p>
+
+%PARAM lmtp_tls_loglevel_maps $smtp_tls_loglevel_maps
+
+<p> The lmtp(8) equivalent of smtp_tls_loglevel_maps. </p>
+
+<p> This feature is available in Postfix 3.12 and later. </p>
index 58fa2cb9233da943c7e310befc1b2bb82cacd3ac..f1ed8411cd3c31e70d48494b532b9bc5b30edce0 100644 (file)
@@ -1714,3 +1714,7 @@ Vorobev
 BERKELEYDB
 Frankowicz
 Kamil
+yana
+YANA
+substrings
+Substring
index c8e280f9755deb03d8e00a6e96263fcc72eec876..7a92b6f0d95022954ab3baab1b63b0f3942a9653 100644 (file)
@@ -244,3 +244,7 @@ proto  proto stop proto stop double cc
  server role support Files smtpd smtpd c tlsproxy tlsproxy c 
  support Files tlsproxy tlsproxy c tlsproxy tlsproxy_server hc 
  calls Files tlsproxy tlsproxy c mantools postlink 
+ global yana_policy_test c postscreen postscreen c 
+ postscreen postscreen h postscreen postscreen_starttls c 
+ posttls finger posttls finger c smtp smtp c smtp smtp h 
+ smtp smtp_proto c smtpd smtpd c tls tls_client c tls tls h 
index 90491409b71671e197bc5297ac4b64e455eafad6..b24f2da48efbf16e5b829f7924eece36213c75c5 100644 (file)
@@ -392,3 +392,4 @@ mynetworks mynetworks lmdb etc postfix network_table
 187 for cpp tp want_log cpp tp want_log MAX_WANT_LOG cpp cpp 
  rsasig rsasig rsa_pss_pss_sha256 rsa_pss_pss_sha384 rsa_pss_pss_sha512 
  rsasig rsasig rsa_pkcs1_sha256 rsa_pkcs1_sha384 rsa_pkcs1_sha512 
+be in compressed form text text Do not enclose any of these
index 176b0c5d41834c5916abb379558445af8a616066..f4849616ab003d1634719e88a729c9515257941e 100644 (file)
@@ -39,7 +39,7 @@ SRCS  = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \
        test_server_main.c compat_level.c config_known_tcp_ports.c \
        hfrom_format.c rfc2047_code.c ascii_header_text.c sendopts.c \
        pol_stats.c nbdb_clnt.c nbdb_util.c allowed_prefix.c \
-       nbdb_redirect.c nbdb_surrogate.c
+       nbdb_redirect.c nbdb_surrogate.c yana_policy.c
 OBJS   = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
        canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \
        clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \
@@ -80,7 +80,7 @@ OBJS  = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
        test_server_main.o compat_level.o config_known_tcp_ports.o \
        hfrom_format.o rfc2047_code.o ascii_header_text.o sendopts.o \
        pol_stats.o nbdb_clnt.o nbdb_util.o allowed_prefix.o \
-       nbdb_redirect.o nbdb_surrogate.o
+       nbdb_redirect.o nbdb_surrogate.o yana_policy.o
 # MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf.
 # When hard-linking these maps, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
 # otherwise it sets the PLUGIN_* macros.
@@ -118,13 +118,13 @@ HDRS      = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \
        test_server_main.h compat_level.h config_known_tcp_ports.h \
        hfrom_format.h rfc2047_code.h ascii_header_text.h sendopts.h \
        pol_stats.h nbdb_clnt.h nbdb_util.h allowed_prefix.h \
-       nbdb_redirect.h nbdb_surrogate.h
+       nbdb_redirect.h nbdb_surrogate.h yana_policy.h
 TESTSRC        = rec2stream.c stream2rec.c recdump.c dict_sqlite_test.c \
        ehlo_mask_test.c haproxy_srvr_test.c sendopts_test.c pol_stats_test.c \
        allowed_prefix_test.c nbdb_util_test.c nbdb_redirect_test.c \
        nbdb_surrogate_test.c recdump.c login_sender_match_test.c \
        normalize_mailhost_addr_test.c smtp_reply_footer_test.c \
-       map_search_test.c
+       map_search_test.c yana_policy_test.c
 DEFS   = -I. -I$(INC_DIR) -D$(SYSTYPE)
 CFLAGS = $(DEBUG) $(OPT) $(DEFS)
 INCL   =
@@ -144,7 +144,7 @@ TESTPROG= domain_list dot_lockfile mail_addr_crunch mail_addr_find \
        config_known_tcp_ports_test hfrom_format_test rfc2047_code \
        ascii_header_text sendopts_test dict_sqlite_test pol_stats_test \
        allowed_prefix_test nbdb_util_test nbdb_redirect_test \
-       nbdb_surrogate_test
+       nbdb_surrogate_test yana_policy_test
 TESTLIB        = $(LIB_DIR)/libtesting.a
 
 LIBS   = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
@@ -423,6 +423,9 @@ nbdb_redirect_test: nbdb_redirect_test.o $(TESTLIB) $(LIB) $(LIBS)
 nbdb_surrogate_test: nbdb_surrogate_test.o $(TESTLIB) $(LIB) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $@.o $(TESTLIB) $(LIB) $(LIBS) $(SYSLIBS)
 
+yana_policy_test: yana_policy_test.o $(PTEST_LIB) $(LIB) $(LIBS)
+       $(CC) $(CFLAGS) -o $@ $@.o $(PTEST_LIB) $(LIB) $(LIBS) $(SYSLIBS)
+
 tests: update tok822_test mime_tests strip_addr_test tok822_limit_test \
        xtext_test scache_multi_test test_ehlo_mask \
        namadr_list_test mail_conf_time_test header_body_checks_tests \
@@ -434,7 +437,7 @@ tests: update tok822_test mime_tests strip_addr_test tok822_limit_test \
        delivered_hdr_test test_login_sender_match compat_level_test \
        test_config_known_tcp_ports test_hfrom_format rfc2047_code_test \
        ascii_header_text_test test_sendopts test_dict_sqlite test_pol_stats \
-       test_allowed_prefix nbdb_tests
+       test_allowed_prefix nbdb_tests test_yana_policy
 
 nbdb_tests: test_nbdb_util test_nbdb_redirect test_nbdb_surrogate
 
@@ -833,6 +836,9 @@ test_nbdb_redirect: update nbdb_redirect_test
 test_nbdb_surrogate: update nbdb_surrogate_test
        $(SHLIB_ENV) $(VALGRIND) ./nbdb_surrogate_test
 
+test_yana_policy: update yana_policy_test
+       $(SHLIB_ENV) $(VALGRIND) ./yana_policy_test
+
 clean:
        rm -f *.o $(LIB) *core $(TESTPROG) junk $(MAPS)
 
@@ -3431,3 +3437,39 @@ xtext.o: ../../include/vbuf.h
 xtext.o: ../../include/vstring.h
 xtext.o: xtext.c
 xtext.o: xtext.h
+yana_policy.o: ../../include/argv.h
+yana_policy.o: ../../include/check_arg.h
+yana_policy.o: ../../include/dict.h
+yana_policy.o: ../../include/midna_domain.h
+yana_policy.o: ../../include/msg.h
+yana_policy.o: ../../include/myflock.h
+yana_policy.o: ../../include/mymalloc.h
+yana_policy.o: ../../include/split_at.h
+yana_policy.o: ../../include/stringops.h
+yana_policy.o: ../../include/sys_defs.h
+yana_policy.o: ../../include/valid_hostname.h
+yana_policy.o: ../../include/vbuf.h
+yana_policy.o: ../../include/vstream.h
+yana_policy.o: ../../include/vstring.h
+yana_policy.o: maps.h
+yana_policy.o: yana_policy.c
+yana_policy.o: yana_policy.h
+yana_policy_test.o: ../../include/argv.h
+yana_policy_test.o: ../../include/check_arg.h
+yana_policy_test.o: ../../include/dict.h
+yana_policy_test.o: ../../include/msg.h
+yana_policy_test.o: ../../include/msg_jmp.h
+yana_policy_test.o: ../../include/msg_output.h
+yana_policy_test.o: ../../include/msg_vstream.h
+yana_policy_test.o: ../../include/myflock.h
+yana_policy_test.o: ../../include/myrand.h
+yana_policy_test.o: ../../include/pmock_expect.h
+yana_policy_test.o: ../../include/ptest.h
+yana_policy_test.o: ../../include/ptest_main.h
+yana_policy_test.o: ../../include/stringops.h
+yana_policy_test.o: ../../include/sys_defs.h
+yana_policy_test.o: ../../include/vbuf.h
+yana_policy_test.o: ../../include/vstream.h
+yana_policy_test.o: ../../include/vstring.h
+yana_policy_test.o: yana_policy.h
+yana_policy_test.o: yana_policy_test.c
index c868c4f2520943f7345ecddd58befcb56bee0172..f35f81faaff536e495873fc7ef0d7904161dd951 100644 (file)
@@ -1441,6 +1441,10 @@ extern char *var_smtpd_tls_eecdh;
 #define DEF_SMTPD_TLS_LOGLEVEL "0"
 extern char *var_smtpd_tls_loglevel;
 
+#define VAR_SMTPD_TLS_LOGLEVEL_MAPS    "smtpd_tls_loglevel_maps"
+#define DEF_SMTPD_TLS_LOGLEVEL_MAPS    ""
+extern char *var_smtpd_tls_loglevel_maps;
+
 #define VAR_SMTPD_TLS_RECHEAD  "smtpd_tls_received_header"
 #define DEF_SMTPD_TLS_RECHEAD  0
 extern bool var_smtpd_tls_received_header;
@@ -1615,6 +1619,13 @@ extern char *var_smtp_tls_tafile;
 extern char *var_smtp_tls_loglevel;    /* In smtp(8) and tlsmgr(8) */
 extern char *var_lmtp_tls_loglevel;    /* In tlsmgr(8) */
 
+#define VAR_SMTP_TLS_LOGLEVEL_MAPS     "smtp_tls_loglevel_maps"
+#define DEF_SMTP_TLS_LOGLEVEL_MAPS     ""
+#define VAR_LMTP_TLS_LOGLEVEL_MAPS     "lmtp_tls_loglevel_maps"
+#define DEF_LMTP_TLS_LOGLEVEL_MAPS     ""
+extern char *var_smtp_tls_loglevel_maps;
+extern char *var_lmtp_tls_loglevel_maps;
+
 #define VAR_SMTP_TLS_NOTEOFFER "smtp_tls_note_starttls_offer"
 #define DEF_SMTP_TLS_NOTEOFFER 0
 #define VAR_LMTP_TLS_NOTEOFFER "lmtp_tls_note_starttls_offer"
@@ -2611,6 +2622,10 @@ extern int var_local_rcpt_code;
                                " $" VAR_VERP_CLIENTS \
                                " $" VAR_XCLIENT_HOSTS \
                                " $" VAR_XFORWARD_HOSTS \
+                               " $" VAR_LMTP_TLS_LOGLEVEL_MAPS \
+                               " $" VAR_PSC_TLS_LOGLEVEL_MAPS \
+                               " $" VAR_SMTP_TLS_LOGLEVEL_MAPS \
+                               " $" VAR_SMTPD_TLS_LOGLEVEL_MAPS \
 
 extern char *var_proxy_read_maps;
 
@@ -4738,6 +4753,10 @@ extern char *var_psc_tls_key_file;
 #define DEF_PSC_TLS_LOGLEVEL   "$" VAR_SMTPD_TLS_LOGLEVEL
 extern char *var_psc_tls_loglevel;
 
+#define VAR_PSC_TLS_LOGLEVEL_MAPS "postscreen_tls_loglevel_maps"
+#define DEF_PSC_TLS_LOGLEVEL_MAPS "$" VAR_SMTPD_TLS_LOGLEVEL_MAPS
+extern char *var_psc_tls_loglevel_maps;
+
 #define VAR_PSC_TLS_MAND_CIPH  "postscreen_tls_mandatory_ciphers"
 #define DEF_PSC_TLS_MAND_CIPH  "$" VAR_SMTPD_TLS_MAND_CIPH
 extern char *var_psc_tls_mand_ciph;
index 86d9cc1d363c2e6aed233797d8c86f89356b5bfc..5bd42d3df1b10ec47e8d3f7d0ea54c31fadb87d6 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20260423"
+#define MAIL_RELEASE_DATE      "20260429"
 #define MAIL_VERSION_NUMBER    "3.12"
 
 #ifdef SNAPSHOT
diff --git a/postfix/src/global/yana_policy.c b/postfix/src/global/yana_policy.c
new file mode 100644 (file)
index 0000000..75ac9bc
--- /dev/null
@@ -0,0 +1,201 @@
+/*++
+/* NAME
+/*     yana_policy 3
+/* SUMMARY
+/*     yet another peer-name/address policy
+/* SYNOPSIS
+/*     #include <yana_policy.h>
+/*
+/*     YANA_POLICY *yana_policy_create(
+/*     const char *param_name,
+/*     const char *map_names,
+/*     int     match_parent)
+/*
+/*     const char *yana_policy_lookup(
+/*     YANA_POLICY *policy,
+/*     const char *peer_name,
+/*     const char *peer_addr)
+/*
+/*     int     yana_policy_error(YANA_POLICY *policy)
+/*
+/*     void    yana_policy_free(YANA_POLICY *policy)
+/* DESCRIPTION
+/*     yana_policy_init() opens zero or more lookup tables and returns
+/*     a pointer to YANA_POLICY object.
+/*
+/*     yana_policy_log_level() returns the log_level value for the
+/*     specified peer name or address, or null if not found. In the
+/*     policy specify a "DUNNO" result to terminate the search and to
+/*     pretend that nothing was found.
+/*
+/*     yana_policy_error() returns the dictionary error status from
+/*     the last table lookup.
+/*
+/*     yana_policy_free() destroys a YANA_POLICY object.
+/*
+/*     Arguments:
+/* .IP param_name
+/*     The name of the configuration that supplied the map_names.
+/* .IP map_names
+/*     Zero or more type:table instances, separated by comma or
+/*     whitespace. Specify a null pointer or empty string if information
+/*     is not available.
+/* .IP match_parent
+/*     Typically, this will be the result of match_parent_style() lookup.
+/*     If non-zero, a domain name in a policy will match the parent
+/*     domain of a peer name. Otherwise, a .domain will match.
+/* DIAGNOSTICS
+/*     yana_policy_lookup() logs a warning when a peer name is malformed
+/*     or if it contains an IP address, or when a peer address is
+/*     malformed. Such names or addresses will never match policy.
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     porcupine.org
+/*--*/
+
+ /*
+  * System library.
+  */
+#include <sys_defs.h>
+#include <string.h>
+
+ /*
+  * Utility library.
+  */
+#include <midna_domain.h>
+#include <msg.h>
+#include <mymalloc.h>
+#include <split_at.h>
+#include <stringops.h>
+#include <valid_hostname.h>
+
+ /*
+  * Global library.
+  */
+#include <maps.h>
+#include <yana_policy.h>
+
+ /*
+  * Unlike debug_peer_list which has the same effect for all matching peers,
+  * this implementation returns a result that may differ between matching
+  * peers.
+  */
+
+/* yana_policy_create - initialize */
+
+YANA_POLICY *yana_policy_create(const char *map_param,
+                                       const char *map_names,
+                                       int match_parent)
+{
+    YANA_POLICY *policy;
+
+    policy = (YANA_POLICY *) mymalloc(sizeof(*policy));
+    policy->maps = maps_create(map_param, map_names,
+             DICT_FLAG_FOLD_FIX | DICT_FLAG_LOCK | DICT_FLAG_UTF8_REQUEST);
+    policy->match_parent = match_parent;
+    return (policy);
+}
+
+/* yana_policy_lookup - look up peer-specific log_level */
+
+const char *yana_policy_lookup(YANA_POLICY *policy,
+                                      const char *peer_name,
+                                      const char *peer_addr)
+{
+    int     delim;
+    const char *result;
+    char   *addr;
+    const char *aname, *name, *next;
+    int     flags;
+
+#define FULL    0
+#define PARTIAL DICT_FLAG_FIXED
+
+    /*
+     * These will be updated only if we actually attempt to look up data.
+     */
+    result = 0;
+    policy->error = 0;
+
+    /*
+     * Match the peer name first. To avoid ambiguity (insecurity!) with
+     * unnormalized U-label forms and unnormalized label separators, the
+     * policy contains A-label forms, and the evaluator converts queries from
+     * U-label form to A-label form.
+     */
+    if (peer_name && *peer_name) {
+       if (!valid_hostname(peer_name, DONT_GRIPE)) {
+           msg_warn("%s: ignoring malformed peer name: '%s'",
+                    __func__, peer_name);
+       } else if (valid_hostaddr(peer_name, DONT_GRIPE)) {
+           msg_warn("%s: ignoring numeric peer name: '%s'",
+                    __func__, peer_name);
+       } else {
+#ifndef NO_EAI
+           if (!allascii(peer_name)) {
+               if ((aname = midna_domain_to_ascii(peer_name)) == 0) {
+                   msg_warn("%s: ignoring malformed peer name: '%s'",
+                            __func__, peer_name);
+                   peer_name = "";
+               } else {
+                   peer_name = aname;
+               }
+           }
+#endif
+           flags = FULL;
+           for (name = peer_name; *name != 0; name = next) {
+               if ((result = maps_find(policy->maps, name, flags)) != 0
+                   || (policy->error = policy->maps->error) != 0)
+                   break;
+               if ((next = strchr(name + 1, '.')) == 0)
+                   break;
+               if (policy->match_parent)
+                   next += 1;
+               flags = PARTIAL;
+           }
+       }
+    }
+
+    /*
+     * Match the peer address.
+     */
+    if (result == 0 && policy->error == 0 && peer_addr && *peer_addr) {
+       if (!valid_hostaddr(peer_addr, DONT_GRIPE)) {
+           msg_warn("%s: ignoring malformed peer address: '%s'",
+                    __func__, peer_addr);
+       } else {
+           addr = mystrdup(peer_addr);
+#ifdef HAS_IPV6
+           if (strchr(addr, ':') != 0)
+               delim = ':';
+           else
+#endif
+               delim = '.';
+           flags = FULL;
+           do {
+               if ((result = maps_find(policy->maps, addr, flags)) != 0
+                   || (policy->error = policy->maps->error) != 0)
+                   break;
+               flags = PARTIAL;
+           } while (split_at_right(addr, delim));
+           myfree(addr);
+       }
+    }
+
+    /*
+     * Wrap up.
+     */
+    return (result && strcasecmp(result, "DUNNO") ? result : 0);
+}
+
+/* yana_policy_free - release storage */
+
+void    yana_policy_free(YANA_POLICY *policy)
+{
+    maps_free(policy->maps);
+    myfree((void *) policy);
+}
diff --git a/postfix/src/global/yana_policy.h b/postfix/src/global/yana_policy.h
new file mode 100644 (file)
index 0000000..cbd0ded
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef _YANA_POLICY_H_
+#define _YANA_POLICY_H_
+
+/*++
+/* NAME
+/*     yana_policy 3h
+/* SUMMARY
+/*     yet another peer-name/address policy
+/* SYNOPSIS
+/*     #include <yana_policy.h>
+/* DESCRIPTION
+* .nf
+
+ /*
+  * External interface.
+  */
+typedef struct YANA_POLICY {
+    struct MAPS *maps;
+    int     match_parent;
+    int     error;
+} YANA_POLICY;
+
+extern YANA_POLICY *yana_policy_create(const char *, const char *, int);
+extern const char *yana_policy_lookup(YANA_POLICY *, const char *, const char *);
+extern void yana_policy_free(YANA_POLICY *);
+
+#define yana_policy_error(policy) ((policy)->error)
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     porcupine.org
+/*--*/
+
+#endif
diff --git a/postfix/src/global/yana_policy_test.c b/postfix/src/global/yana_policy_test.c
new file mode 100644 (file)
index 0000000..bd07f75
--- /dev/null
@@ -0,0 +1,190 @@
+ /*
+  * Test program to exercise yana_policy.c. See ptest_main.h for a documented
+  * example.
+  */
+
+ /*
+  * System library.
+  */
+#include <sys_defs.h>
+#include <string.h>
+
+ /*
+  * Utility library.
+  */
+#include <dict.h>
+
+ /*
+  * Global library.
+  */
+#include <yana_policy.h>
+
+ /*
+  * Test library.
+  */
+#include <ptest.h>
+
+typedef struct PTEST_CASE {
+    const char *testname;
+    void    (*action) (PTEST_CTX *, const struct PTEST_CASE *);
+
+    /*
+     * yana_policy_create() inputs.
+     */
+    const char *policy;
+    int     match_parent;
+
+    /*
+     * yana_policy_lookup() inputs.
+     */
+    const char *client_name;
+    const char *client_addr;
+
+    /*
+     * yana_policy_lookup() outputs.
+     */
+    const char *want_warning;          /* expected warning or null */
+    const char *want_found;            /* expected lookup result or null */
+    int     want_error;                        /* expected DICT_ERR_XXX value */
+} PTEST_CASE;
+
+static void test_yana_policy(PTEST_CTX *t, const PTEST_CASE *tp)
+{
+    YANA_POLICY *policy;
+    const char *got_found;
+
+#define STR_OR_NULL(s) ((s) ? (s) : "(null)")
+
+    /*
+     * Setup.
+     */
+    policy = yana_policy_create(tp->testname, tp->policy, tp->match_parent);
+    if (tp->want_warning)
+       expect_ptest_log_event(t, tp->want_warning);
+
+    /*
+     * Detonate.
+     */
+    got_found = yana_policy_lookup(policy, tp->client_name, tp->client_addr);
+
+    /*
+     * Verify.
+     */
+    if (policy->error != tp->want_error) {
+       ptest_error(t, "unexpected policy error result: got '%d', want '%d'",
+                   policy->error, tp->want_error);
+    }
+    if (!!got_found != !!tp->want_found) {
+       ptest_error(t, "unexpected policy lookup result: got '%s', want '%s'",
+                   STR_OR_NULL(got_found), STR_OR_NULL(tp->want_found));
+    }
+    if (got_found && tp->want_found) {
+       if (strcmp(got_found, tp->want_found) != 0) {
+           ptest_error(t, "unexpected policy result: got '%s', want '%s'",
+                       got_found, tp->want_found);
+       }
+    }
+    yana_policy_free(policy);
+}
+
+static const PTEST_CASE ptestcases[] = {
+    {"good-fullname-match", test_yana_policy,
+       .policy = "inline:{mx.example.com=name-match, 1.2.3.4=addr-match}",
+       .client_name = "mx.example.com",
+       .client_addr = "1.2.3.4",
+       .want_found = "name-match",
+    },
+    {"good-full-v6-match", test_yana_policy,
+       .policy = "inline:{mx.example.com=name-match, 1:2::3:4=addr-match}",
+       .client_name = "other.example.com",
+       .client_addr = "1:2::3:4",
+       .want_found = "addr-match",
+    },
+    {"good-full-v4-match", test_yana_policy,
+       .policy = "inline:{mx.example.com=name-match, 1.2.3.4=addr-match}",
+       .client_name = "other.example.com",
+       .client_addr = "1.2.3.4",
+       .want_found = "addr-match",
+    },
+    {"dunno-overrides", test_yana_policy,
+       .policy = "inline:{mx.example.com=dunno, 1.2.3.4=addr-match}",
+       .client_name = "mx.example.com",
+       .client_addr = "1.2.3.4",
+    },
+    {"good-non-match", test_yana_policy,
+       .policy = "inline:{mx.example.com=name-match, 1.2.3.4=addr-match}",
+       .client_name = "other.example.com",
+       .client_addr = "1.2.3.5",
+    },
+    {"propgates-name-lookup-error", test_yana_policy,
+       .policy = "fail:whatever",
+       .client_name = "mx.example.com",
+       .want_warning = "warning: fail:whatever lookup error",
+       .want_error = DICT_ERR_RETRY,
+    },
+    {"propgates-addr-lookup-error", test_yana_policy,
+       .policy = "fail:whatever",
+       .client_addr = "1.2.3.4",
+       .want_warning = "warning: fail:whatever lookup error",
+       .want_error = DICT_ERR_RETRY,
+    },
+    {"good-parent-match", test_yana_policy,
+       .policy = "inline:{.example.com=name-match, 1.2.3.4=addr-match}",
+       .client_name = "mx.example.com",
+       .client_addr = "1.2.3.4",
+       .want_found = "name-match",
+    },
+    {"good-tld-match", test_yana_policy,
+       .policy = "inline:{.com=name-match, 1.2.3.4=addr-match}",
+       .client_name = "mx.example.com",
+       .client_addr = "1.2.3.4",
+       .want_found = "name-match",
+    },
+    {"good-v4-subnet-match", test_yana_policy,
+       .policy = "inline:{example.com=name-match, 1.2=addr-match}",
+       .client_name = "other.example",
+       .client_addr = "1.2.3.4",
+       .want_found = "addr-match",
+    },
+    {"good-v4-subnet-non-match", test_yana_policy,
+       .policy = "inline:{example.com=name-match, 1.2=addr-match}",
+       .client_name = "other.example",
+       .client_addr = "2.2.3.4",
+    },
+    {"good-v6-subnet-match", test_yana_policy,
+       .policy = "inline:{example.com=name-match, 1:2=addr-match}",
+       .client_name = "other.example",
+       .client_addr = "1:2::3:4",
+       .want_found = "addr-match",
+    },
+    {"good-v6-subnet-non-match", test_yana_policy,
+       .policy = "inline:{example.com=name-match, 1:2=addr-match}",
+       .client_name = "other.example",
+       .client_addr = "2:2::3:4",
+    },
+    {"good-regexp-match", test_yana_policy,
+       .policy = "regexp:{{/\\.example\\.com$$/ name-match}}",
+       .client_name = "mx.example.com",
+       .client_addr = "1:2::3:4",
+       .want_found = "name-match",
+    },
+    {"good-regexp-non-match", test_yana_policy,
+       .policy = "regexp:{{/\\.example\\.com/ name-match}}",
+       .client_name = "other.example",
+       .client_addr = "1:2::3:4",
+    },
+    {"good-cidr-match", test_yana_policy,
+       .policy = "cidr:{{1.2.3.4 addr-match}}",
+       .client_addr = "1.2.3.4",
+       .want_found = "addr-match",
+    },
+    {"good-cidr-non-match", test_yana_policy,
+       .policy = "cidr:{{1.2.3.4 addr-match}}",
+       .client_addr = "1.2.3.5",
+    },
+    {"null-data", test_yana_policy,
+       .policy = "fail:whatever",
+    },
+};
+
+#include <ptest_main.h>
index fbf34d37b8d415ff40dd2fbb3afb6f3df25816d9..82964688f56da177f0396967ff3a36a2e8810f7a 100644 (file)
@@ -657,6 +657,7 @@ postscreen_tls_conf.o: ../../include/htable.h
 postscreen_tls_conf.o: ../../include/mail_params.h
 postscreen_tls_conf.o: ../../include/maps.h
 postscreen_tls_conf.o: ../../include/match_list.h
+postscreen_tls_conf.o: ../../include/match_parent_style.h
 postscreen_tls_conf.o: ../../include/msg.h
 postscreen_tls_conf.o: ../../include/myaddrinfo.h
 postscreen_tls_conf.o: ../../include/myflock.h
@@ -680,5 +681,6 @@ postscreen_tls_conf.o: ../../include/tls_proxy_server_start_proto.h
 postscreen_tls_conf.o: ../../include/vbuf.h
 postscreen_tls_conf.o: ../../include/vstream.h
 postscreen_tls_conf.o: ../../include/vstring.h
+postscreen_tls_conf.o: ../../include/yana_policy.h
 postscreen_tls_conf.o: postscreen.h
 postscreen_tls_conf.o: postscreen_tls_conf.c
index 7936730490cceedaeb78f6515b86b04d5074e072..9614608dac3a8d461e5852a4b51e11f1df0d4e21 100644 (file)
 /*     The \fBpostscreen\fR(8) equivalent of smtpd_tls_key_file.
 /* .IP "\fBpostscreen_tls_loglevel ($smtpd_tls_loglevel)\fR"
 /*     The \fBpostscreen\fR(8) equivalent of smtpd_tls_loglevel.
+/* .IP "\fBpostscreen_tls_loglevel_maps ($smtpd_tls_loglevel_maps)\fR"
+/*     Optional TLS loglevel override that depends on the remote peer
+/*     host name or IP address.
 /* .IP "\fBpostscreen_tls_mandatory_ciphers ($smtpd_tls_mandatory_ciphers)\fR"
 /*     The \fBpostscreen\fR(8) equivalent of smtpd_tls_mandatory_ciphers.
 /* .IP "\fBpostscreen_tls_mandatory_exclude_ciphers ($smtpd_tls_mandatory_exclude_ciphers)\fR"
@@ -635,6 +638,7 @@ char   *var_smtpd_tls_excl_ciph;
 char   *var_smtpd_tls_fpt_dgst;
 char   *var_smtpd_tls_key_file;
 char   *var_smtpd_tls_loglevel;
+char   *var_smtpd_tls_loglevel_maps;
 char   *var_smtpd_tls_mand_ciph;
 char   *var_smtpd_tls_mand_excl;
 char   *var_smtpd_tls_mand_proto;
@@ -664,6 +668,7 @@ char   *var_psc_tls_excl_ciph;
 char   *var_psc_tls_fpt_dgst;
 char   *var_psc_tls_key_file;
 char   *var_psc_tls_loglevel;
+char   *var_psc_tls_loglevel_maps;
 char   *var_psc_tls_mand_ciph;
 char   *var_psc_tls_mand_excl;
 char   *var_psc_tls_mand_proto;
@@ -1309,6 +1314,7 @@ int     main(int argc, char **argv)
        VAR_SMTPD_TLS_FPT_DGST, DEF_SMTPD_TLS_FPT_DGST, &var_smtpd_tls_fpt_dgst, 1, 0,
        VAR_SMTPD_TLS_KEY_FILE, DEF_SMTPD_TLS_KEY_FILE, &var_smtpd_tls_key_file, 0, 0,
        VAR_SMTPD_TLS_LOGLEVEL, DEF_SMTPD_TLS_LOGLEVEL, &var_smtpd_tls_loglevel, 0, 0,
+       VAR_SMTPD_TLS_LOGLEVEL_MAPS, DEF_SMTPD_TLS_LOGLEVEL_MAPS, &var_smtpd_tls_loglevel_maps, 0, 0,
        VAR_SMTPD_TLS_MAND_CIPH, DEF_SMTPD_TLS_MAND_CIPH, &var_smtpd_tls_mand_ciph, 1, 0,
        VAR_SMTPD_TLS_MAND_EXCL, DEF_SMTPD_TLS_MAND_EXCL, &var_smtpd_tls_mand_excl, 0, 0,
        VAR_SMTPD_TLS_MAND_PROTO, DEF_SMTPD_TLS_MAND_PROTO, &var_smtpd_tls_mand_proto, 0, 0,
@@ -1345,6 +1351,7 @@ int     main(int argc, char **argv)
        VAR_PSC_TLS_FPT_DGST, DEF_PSC_TLS_FPT_DGST, &var_psc_tls_fpt_dgst, 1, 0,
        VAR_PSC_TLS_KEY_FILE, DEF_PSC_TLS_KEY_FILE, &var_psc_tls_key_file, 0, 0,
        VAR_PSC_TLS_LOGLEVEL, DEF_PSC_TLS_LOGLEVEL, &var_psc_tls_loglevel, 0, 0,
+       VAR_PSC_TLS_LOGLEVEL_MAPS, DEF_PSC_TLS_LOGLEVEL_MAPS, &var_psc_tls_loglevel_maps, 0, 0,
        VAR_PSC_TLS_MAND_CIPH, DEF_PSC_TLS_MAND_CIPH, &var_psc_tls_mand_ciph, 1, 0,
        VAR_PSC_TLS_MAND_EXCL, DEF_PSC_TLS_MAND_EXCL, &var_psc_tls_mand_excl, 0, 0,
        VAR_PSC_TLS_MAND_PROTO, DEF_PSC_TLS_MAND_PROTO, &var_psc_tls_mand_proto, 0, 0,
index c8ae62e2b0f73a1537a8315587e54eaeda811b3d..c9b24ccdc12619ddfc2a54003bb81509cb714e07 100644 (file)
@@ -80,6 +80,7 @@ typedef struct {
     int     smtp_server_fd;            /* real SMTP server */
     char   *smtp_client_addr;          /* client address */
     char   *smtp_client_port;          /* client port */
+    char   *smtp_client_addr_port;     /* [client_addr]:client_port */
     char   *smtp_server_addr;          /* server address */
     char   *smtp_server_port;          /* server port */
     const char *final_reply;           /* cause for hanging up */
@@ -417,6 +418,8 @@ extern HTABLE *psc_client_concurrency;      /* per-client concurrency */
 
  /*
   * postscreen_state.c
+  * 
+  * TODO(wietse): migrate PSC_CLIENT_ADDR_PORT to smtp_client_addr_port.
   */
 #define PSC_CLIENT_ADDR_PORT(state) \
        (state)->smtp_client_addr, (state)->smtp_client_port
@@ -571,7 +574,7 @@ extern bool psc_tls_pre_jail(void);
 #ifdef USE_TLS
 extern TLS_SERVER_PARAMS psc_tls_params;
 extern TLS_SERVER_INIT_PROPS psc_init_props;
-extern bool psc_tls_pre_start(const char *, TLS_SERVER_START_PROPS *);
+extern bool psc_tls_pre_start(const PSC_STATE *, TLS_SERVER_START_PROPS *);
 
 #endif
 
index 96ec561c47de13e0453f5f00a2a0f9d0d63b1a9c..8e3a0fcf69a63b1ab8e783ff597085e18a3ba5a9 100644 (file)
@@ -8,6 +8,7 @@
   */
 #include <sys_defs.h>
 #include <limits.h>
+#include <stdlib.h>
 
  /*
   * Utility library.
index 3124223d51a3ae4cee1c7bf6a594b78aa7731bca..3280f6d43d0e147e176151d5452d1c2bd149a534 100644 (file)
@@ -204,7 +204,6 @@ static void psc_starttls_first(int event, void *context)
     PSC_STARTTLS *starttls_state = (PSC_STARTTLS *) context;
     PSC_STATE *smtp_state = starttls_state->smtp_state;
     VSTREAM *tlsproxy_stream = starttls_state->tlsproxy_stream;
-    static VSTRING *remote_endpt = 0;
     TLS_SERVER_START_PROPS start_props;
 
     if (msg_verbose)
@@ -242,18 +241,12 @@ static void psc_starttls_first(int event, void *context)
      * Send the data attributes now, and send the client file descriptor in a
      * later transaction. We report all errors asynchronously, to avoid
      * having to maintain multiple error delivery paths.
-     * 
-     * XXX The formatted endpoint should be a state member. Then, we can
-     * simplify all the format strings throughout the program.
      */
-    if (remote_endpt == 0)
-       remote_endpt = vstring_alloc(20);
-    vstring_sprintf(remote_endpt, "[%s]:%s", smtp_state->smtp_client_addr,
-                   smtp_state->smtp_client_port);
-    psc_tls_pre_start(STR(remote_endpt), &start_props);
+    psc_tls_pre_start(smtp_state, &start_props);
 
     if (attr_print(tlsproxy_stream, ATTR_FLAG_NONE,
-                  SEND_ATTR_STR(TLS_ATTR_REMOTE_ENDPT, STR(remote_endpt)),
+                  SEND_ATTR_STR(TLS_ATTR_REMOTE_ENDPT,
+                                smtp_state->smtp_client_addr_port),
                   SEND_ATTR_INT(TLS_ATTR_FLAGS, TLS_PROXY_FLAG_ROLE_SERVER),
                 SEND_ATTR_INT(TLS_ATTR_TIMEOUT, psc_normal_cmd_time_limit),
                 SEND_ATTR_INT(TLS_ATTR_TIMEOUT, psc_normal_cmd_time_limit),
index 2b5db3c16f205e00836d7bffa118a3e6e276e7c6..d22bd656e22e2ba5685b1b1cc8ad3e40d278a530 100644 (file)
 #include <mymalloc.h>
 #include <name_mask.h>
 #include <htable.h>
+#include <vstring.h>
 
 /* Global library. */
 
@@ -162,6 +163,7 @@ PSC_STATE *psc_new_session_state(VSTREAM *stream,
                                         const char *server_port)
 {
     PSC_STATE *state;
+    VSTRING *addr_port;
 
     state = (PSC_STATE *) mymalloc(sizeof(*state));
     if ((state->smtp_client_stream = stream) != 0)
@@ -169,6 +171,9 @@ PSC_STATE *psc_new_session_state(VSTREAM *stream,
     state->smtp_server_fd = (-1);
     state->smtp_client_addr = mystrdup(client_addr);
     state->smtp_client_port = mystrdup(client_port);
+    addr_port = vstring_alloc(30);
+    vstring_sprintf(addr_port, "[%s]:%s", client_addr, client_port);
+    state->smtp_client_addr_port = vstring_export(addr_port);
     state->smtp_server_addr = mystrdup(server_addr);
     state->smtp_server_port = mystrdup(server_port);
     state->send_buf = vstring_alloc(100);
@@ -243,6 +248,7 @@ void    psc_free_session_state(PSC_STATE *state)
        state->send_buf = vstring_free(state->send_buf);
     myfree(state->smtp_client_addr);
     myfree(state->smtp_client_port);
+    myfree(state->smtp_client_addr_port);
     myfree(state->smtp_server_addr);
     myfree(state->smtp_server_port);
     if (state->dnsbl_reply)
index ab3f2f4f3b97981f626d6d4f30694ad04728f24e..4b52a6d171205656ebfbf09e7509e9b15f0610b6 100644 (file)
@@ -64,6 +64,8 @@
 /* Global library. */
 
 #include <mail_params.h>
+#include <match_parent_style.h>
+#include <yana_policy.h>
 
 /* TLS library. */
 
   * Pre-computed state based on configuration parameters. TODO(wietse): some
   * legacy booleans use "|=". Fix that when this code is factored out.
   */
+bool    psc_tls_ready;
+
+#ifdef USE_TLS
 TLS_SERVER_PARAMS psc_tls_params;
 TLS_SERVER_INIT_PROPS psc_init_props;
-bool    psc_tls_ready;
+#endif
 
  /*
   * Private state.
@@ -94,6 +99,11 @@ bool    psc_tls_ready;
 static bool psc_tls_pre_jail_done;
 static int ask_client_cert;
 
+ /*
+  * Per-peer TLS logging policy.
+  */
+static YANA_POLICY *psc_tls_loglevel_maps;
+
 /* psc_tls_pre_jail - pre-compute per-process TLS properties */
 
 bool    psc_tls_pre_jail(void)
@@ -144,7 +154,6 @@ bool    psc_tls_pre_jail(void)
        int     no_server_cert_ok;
        int     require_server_cert;
 
-
        /*
         * Can't use anonymous ciphers if we want client certificates. Must
         * use anonymous ciphers if we have no certificates.
@@ -221,6 +230,18 @@ bool    psc_tls_pre_jail(void)
        msg_warn("TLS has been selected, but TLS support is not compiled in");
 #endif
     }
+
+    /*
+     * Per-peer TLS logging.
+     */
+#ifdef USE_TLS
+    if (*var_psc_tls_loglevel_maps)
+       psc_tls_loglevel_maps =
+           yana_policy_create(VAR_PSC_TLS_LOGLEVEL_MAPS,
+                              var_psc_tls_loglevel_maps,
+                            match_parent_style(VAR_PSC_TLS_LOGLEVEL_MAPS));
+#endif
+
     psc_tls_pre_jail_done = true;
     return (psc_tls_ready);
 }
@@ -229,16 +250,27 @@ bool    psc_tls_pre_jail(void)
 
 /* psc_tls_pre_start - assign per-request TLS properties */
 
-bool    psc_tls_pre_start(const char *remote_endpt,
+bool    psc_tls_pre_start(const PSC_STATE *state,
                                  TLS_SERVER_START_PROPS *start_props)
 {
     static char *cipher_grade;
     static VSTRING *cipher_exclusions;
     int     requirecert;
+    const char *peer_log_param;
+    const char *peer_log_level;
 
     if (!psc_tls_ready)
        return (false);
 
+    if (psc_tls_loglevel_maps
+       && (peer_log_level = yana_policy_lookup(psc_tls_loglevel_maps,
+                                      "", state->smtp_client_addr)) != 0) {
+       peer_log_param = VAR_PSC_TLS_LOGLEVEL_MAPS;
+    } else {
+       peer_log_param = VAR_PSC_TLS_LOGLEVEL;
+       peer_log_level = var_smtpd_tls_loglevel;
+    }
+
     /*
      * In non-wrapper mode, it is possible to require client certificate
      * verification without requiring TLS. Since certificates can be verified
@@ -269,11 +301,13 @@ bool    psc_tls_pre_start(const char *remote_endpt,
     }
     requirecert = (var_psc_tls_req_ccert && var_psc_enforce_tls);
     TLS_PROXY_SERVER_START_PROPS(start_props,
+                                log_param = peer_log_param,
+                                log_level = peer_log_level,
                                 timeout = var_psc_starttls_tmout,
                                 enable_rpk = var_psc_tls_enable_rpk,
                                 requirecert = requirecert,
                                 serverid = var_servname,
-                                namaddr = remote_endpt,
+                                namaddr = state->smtp_client_addr_port,
                                 cipher_grade = cipher_grade,
                                 cipher_exclusions = STR(cipher_exclusions),
                                 mdalg = var_psc_tls_fpt_dgst);
index 109191c3fdb9c06ae8a91fe69ef4fcb5c196f618..da3cfe46968acd615c987abcf23df184c78b2e7c 100644 (file)
@@ -820,6 +820,8 @@ static int starttls(STATE *state)
                                    CApath = state->CApath,
                                    mdalg = state->mdalg);
        TLS_PROXY_CLIENT_START_PROPS(&start_props,
+                                    log_param = "-L option",
+                                    log_level = state->options.logopts,
                                     timeout = smtp_tmout,
                                     enable_rpk = state->options.enable_rpk,
                                     tls_level = state->level,
@@ -924,6 +926,8 @@ static int starttls(STATE *state)
        state->tls_context =
            TLS_CLIENT_START(&start_props,
                             ctx = state->tls_ctx,
+                            log_param = "-L option",
+                            log_level = state->options.logopts,
                             stream = stream,
                             fd = -1,
                             timeout = smtp_tmout,
index 83181852bc1f3885d00e2842adcdd7c048db51ba..be3379148abdc2bb2c73bc1f8b2cb3dae087c637 100644 (file)
@@ -118,6 +118,7 @@ smtp.o: ../../include/mail_server.h
 smtp.o: ../../include/mail_version.h
 smtp.o: ../../include/maps.h
 smtp.o: ../../include/match_list.h
+smtp.o: ../../include/match_parent_style.h
 smtp.o: ../../include/mime_state.h
 smtp.o: ../../include/msg.h
 smtp.o: ../../include/msg_stats.h
@@ -149,6 +150,7 @@ smtp.o: ../../include/tok822.h
 smtp.o: ../../include/vbuf.h
 smtp.o: ../../include/vstream.h
 smtp.o: ../../include/vstring.h
+smtp.o: ../../include/yana_policy.h
 smtp.o: lmtp_params.c
 smtp.o: smtp.c
 smtp.o: smtp.h
@@ -552,6 +554,7 @@ smtp_proto.o: ../../include/vstream.h
 smtp_proto.o: ../../include/vstring.h
 smtp_proto.o: ../../include/vstring_vstream.h
 smtp_proto.o: ../../include/xtext.h
+smtp_proto.o: ../../include/yana_policy.h
 smtp_proto.o: smtp.h
 smtp_proto.o: smtp_proto.c
 smtp_proto.o: smtp_reqtls_policy.h
index 5b2445b6846dce8e38416765c26b9d672cfdf294..7e76bf56b861e827a8b41e8c1a2c41cade5e3da8 100644 (file)
@@ -31,6 +31,7 @@
        VAR_LMTP_TLS_ECCERT_FILE, DEF_LMTP_TLS_ECCERT_FILE, &var_smtp_tls_eccert_file, 0, 0,
        VAR_LMTP_TLS_ECKEY_FILE, DEF_LMTP_TLS_ECKEY_FILE, &var_smtp_tls_eckey_file, 0, 0,
        VAR_LMTP_TLS_LOGLEVEL, DEF_LMTP_TLS_LOGLEVEL, &var_smtp_tls_loglevel, 0, 0,
+       VAR_LMTP_TLS_LOGLEVEL_MAPS, DEF_LMTP_TLS_LOGLEVEL_MAPS, &var_smtp_tls_loglevel_maps, 0, 0,
        VAR_LMTP_TLS_SNI, DEF_LMTP_TLS_SNI, &var_smtp_tls_sni, 0, 0,
 #endif
        VAR_LMTP_SASL_MECHS, DEF_LMTP_SASL_MECHS, &var_smtp_sasl_mechs, 0, 0,
index 9a7bcaeb7c3ab2b28650e758075a21381f4ff6dd..b2d38d4a9d9f64ae6bf6963d546d33750e84a4d6 100644 (file)
 /* .IP "\fBsmtp_log_tls_feature_status (yes)\fR"
 /*     Enable logging of TLS feature information in delivery status
 /*     logging.
+/* .PP
+/*     Available in Postfix version 3.12 and later:
+/* .IP "\fBsmtp_tls_loglevel_maps (empty)\fR"
+/*     Optional TLS loglevel override that depends on the remote peer
+/*     host name or IP address.
 /* OBSOLETE TLS CONTROLS
 /* .ad
 /* .fi
 #include <ext_prop.h>
 #include <hfrom_format.h>
 
+#ifdef USE_TLS
+#include <match_parent_style.h>
+#include <yana_policy.h>
+#endif
+
 /* DNS library. */
 
 #include <dns.h>
@@ -1132,6 +1142,7 @@ char   *var_smtp_tls_dkey_file;
 bool    var_smtp_tls_enforce_peername;
 char   *var_smtp_tls_key_file;
 char   *var_smtp_tls_loglevel;
+char   *var_smtp_tls_loglevel_maps;
 bool    var_smtp_tls_note_starttls_offer;
 char   *var_smtp_tls_mand_proto;
 char   *var_smtp_tls_sec_cmatch;
@@ -1221,6 +1232,8 @@ SMTP_REQTLS_POLICY *smtp_reqtls_policy;
 TLS_APPL_STATE *smtp_tls_ctx;
 int     smtp_tls_insecure_mx_policy;
 
+YANA_POLICY *smtp_tls_loglevel_maps;
+
 #endif
 
  /*
@@ -1729,6 +1742,17 @@ static void pre_init(char *unused_name, char **unused_argv)
        smtp_reqtls_policy =
            smtp_reqtls_policy_parse(VAR_LMTP_SMTP(REQTLS_POLICY),
                                     var_smtp_reqtls_policy);
+
+    /*
+     * Per-peer TLS logging.
+     */
+#ifdef USE_TLS
+    if (*var_smtp_tls_loglevel_maps)
+       smtp_tls_loglevel_maps =
+           yana_policy_create(VAR_SMTP_TLS_LOGLEVEL_MAPS,
+                              var_smtp_tls_loglevel_maps,
+                           match_parent_style(VAR_SMTP_TLS_LOGLEVEL_MAPS));
+#endif
 }
 
 /* pre_accept - see if tables have changed */
index c25288c8420e94e85f87138c95c8d08b4b804982..782a7fd706d35a03e1f47a633162c714fe874f49 100644 (file)
@@ -411,6 +411,7 @@ extern STRING_LIST *smtp_use_srv_lookup;/* services with SRV record lookup */
 extern TLS_APPL_STATE *smtp_tls_ctx;   /* client-side TLS engine */
 extern int smtp_tls_insecure_mx_policy;        /* DANE post insecure MX? */
 extern SMTP_REQTLS_POLICY *smtp_reqtls_policy; /* parsed list */
+extern struct YANA_POLICY *smtp_tls_loglevel_maps;
 
 #endif
 
index 63aac7f0f1a53d0dabbdfcf284640d88d6aabda0..e206e4201e529500247e576d3c31eab429658273 100644 (file)
@@ -31,6 +31,7 @@
        VAR_SMTP_TLS_ECCERT_FILE, DEF_SMTP_TLS_ECCERT_FILE, &var_smtp_tls_eccert_file, 0, 0,
        VAR_SMTP_TLS_ECKEY_FILE, DEF_SMTP_TLS_ECKEY_FILE, &var_smtp_tls_eckey_file, 0, 0,
        VAR_SMTP_TLS_LOGLEVEL, DEF_SMTP_TLS_LOGLEVEL, &var_smtp_tls_loglevel, 0, 0,
+       VAR_SMTP_TLS_LOGLEVEL_MAPS, DEF_SMTP_TLS_LOGLEVEL_MAPS, &var_smtp_tls_loglevel_maps, 0, 0,
        VAR_SMTP_TLS_SNI, DEF_SMTP_TLS_SNI, &var_smtp_tls_sni, 0, 0,
        VAR_SMTP_TLS_INSECURE_MX_POLICY, DEF_SMTP_TLS_INSECURE_MX_POLICY, &var_smtp_tls_insecure_mx_policy, 0, 0,
 #endif
index b5538b4e51cb7ed26ae16a1958e168643c68bc9c..f673608820e661d948f36ff5b619905778a01942 100644 (file)
 #if defined(USE_TLS) && defined(USE_TLSRPT)
 #include <tlsrpt_wrapper.h>
 #endif
+#ifdef USE_TLS
+#include <yana_policy.h>
+#endif
 
 /* Application-specific. */
 
@@ -984,6 +987,18 @@ static int smtp_start_tls(SMTP_STATE *state)
     TLS_CLIENT_INIT_PROPS init_props;
     VSTREAM *tlsproxy;
     VSTRING *port_buf;
+    const char *peer_log_param;
+    const char *peer_log_level;
+
+    if (smtp_tls_loglevel_maps
+       && (peer_log_level = yana_policy_lookup(smtp_tls_loglevel_maps,
+                                               STR(iter->host),
+                                               STR(iter->addr))) != 0) {
+       peer_log_param = VAR_SMTP_TLS_LOGLEVEL_MAPS;
+    } else {
+       peer_log_param = VAR_SMTP_TLS_LOGLEVEL;
+       peer_log_level = var_smtp_tls_loglevel;
+    }
 
     /*
      * When the TLS handshake succeeds, we can reuse a connection only if TLS
@@ -1059,6 +1074,8 @@ static int smtp_start_tls(SMTP_STATE *state)
                                    CApath = var_smtp_tls_CApath,
                                    mdalg = var_smtp_tls_fpt_dgst);
        TLS_PROXY_CLIENT_START_PROPS(&start_props,
+                                    log_param = peer_log_param,
+                                    log_level = peer_log_level,
                                     timeout = var_smtp_starttls_tmout,
                                     tls_level = state->tls->level,
                                     enable_rpk = state->tls->enable_rpk,
@@ -1186,6 +1203,8 @@ static int smtp_start_tls(SMTP_STATE *state)
        session->tls_context =
            TLS_CLIENT_START(&start_props,
                             ctx = smtp_tls_ctx,
+                            log_param = peer_log_param,
+                            log_level = peer_log_level,
                             stream = session->stream,
                             fd = -1,
                             timeout = var_smtp_starttls_tmout,
index 2b9e4703ded7db5fea2169cba9e06b3e7c9c4f41..1332909752b7578bb54fcce3391f452b24a0a5be 100644 (file)
@@ -316,6 +316,7 @@ smtpd.o: ../../include/vstring.h
 smtpd.o: ../../include/vstring_vstream.h
 smtpd.o: ../../include/watchdog.h
 smtpd.o: ../../include/xtext.h
+smtpd.o: ../../include/yana_policy.h
 smtpd.o: smtpd.c
 smtpd.o: smtpd.h
 smtpd.o: smtpd_chat.h
index 976d52ea065241b7de0a390a2eb5c78265bab2f0..4480eb9547abb523cf4232f091614db3afd3733e 100644 (file)
 /*     Whether to trust client certificates whose extended key usage (EKU) lists
 /*     only \fBserverAuth\fR and not \fBclientAuth\fR as valid TLS client
 /*     certificates.
+/* .PP
+/*     Available in Postfix version 3.12 and later:
+/* .IP "\fBsmtpd_tls_loglevel_maps (empty)\fR"
+/*     Optional TLS loglevel override that depends on the remote peer
+/*     host name or IP address.
 /* OBSOLETE TLS CONTROLS
 /* .ad
 /* .fi
 #include <info_log_addr_form.h>
 #include <hfrom_format.h>
 
+#ifdef USE_TLS
+#include <yana_policy.h>
+#endif
+
 /* Single-threaded server skeleton. */
 
 #include <mail_server.h>
@@ -1519,6 +1528,7 @@ char   *var_smtpd_tls_dh512_param_file;
 char   *var_smtpd_tls_dkey_file;
 char   *var_smtpd_tls_key_file;
 char   *var_smtpd_tls_loglevel;
+char   *var_smtpd_tls_loglevel_maps;
 char   *var_smtpd_tls_mand_proto;
 bool    var_smtpd_tls_received_header;
 bool    var_smtpd_tls_req_ccert;
@@ -1673,6 +1683,11 @@ static TLS_APPL_STATE *smtpd_tls_ctx;
 #endif                                 /* USE_TLSPROXY */
 static int ask_client_cert;
 
+ /*
+  * Per-peer TLS logging policy.
+  */
+static YANA_POLICY *smtpd_tls_loglevel_maps;
+
 #endif
 
  /*
@@ -5254,6 +5269,17 @@ static void smtpd_start_tls(SMTPD_STATE *state)
     TLS_SERVER_START_PROPS props;
     static char *cipher_grade;
     static VSTRING *cipher_exclusions;
+    const char *peer_log_param;
+    const char *peer_log_level;
+
+    if (smtpd_tls_loglevel_maps
+       && (peer_log_level = yana_policy_lookup(smtpd_tls_loglevel_maps,
+                                         state->name, state->addr)) != 0) {
+       peer_log_param = VAR_SMTPD_TLS_LOGLEVEL_MAPS;
+    } else {
+       peer_log_param = VAR_SMTPD_TLS_LOGLEVEL;
+       peer_log_level = var_smtpd_tls_loglevel;
+    }
 
 #ifdef USE_TLSPROXY
     TLS_SERVER_PARAMS tls_params;
@@ -5310,6 +5336,8 @@ static void smtpd_start_tls(SMTPD_STATE *state)
      */
     tls_proxy_server_param_from_config(&tls_params);
     TLS_PROXY_SERVER_START_PROPS(&props,
+                                log_param = peer_log_param,
+                                log_level = peer_log_level,
                                 timeout = var_smtpd_starttls_tmout,
                                 enable_rpk = var_smtpd_tls_enable_rpk,
                                 requirecert = requirecert,
@@ -5355,6 +5383,8 @@ static void smtpd_start_tls(SMTPD_STATE *state)
     state->tls_context =
        TLS_SERVER_START(&props,
                         ctx = smtpd_tls_ctx,
+                        log_param = peer_log_param,
+                        log_level = peer_log_level,
                         stream = state->client,
                         fd = -1,
                         timeout = var_smtpd_starttls_tmout,
@@ -6745,6 +6775,17 @@ static void pre_jail_init(char *unused_name, char **unused_argv)
      */
     if (*var_smtpd_rej_ftr_maps || *var_smtpd_reject_filter_maps)
        smtpd_chat_pre_jail_init();
+
+    /*
+     * Per-peer TLS logging.
+     */
+#ifdef USE_TLS
+    if (*var_smtpd_tls_loglevel_maps)
+       smtpd_tls_loglevel_maps =
+           yana_policy_create(VAR_SMTPD_TLS_LOGLEVEL_MAPS,
+                              var_smtpd_tls_loglevel_maps,
+                          match_parent_style(VAR_SMTPD_TLS_LOGLEVEL_MAPS));
+#endif
 }
 
 /* post_jail_init - post-jail initialization */
@@ -6981,6 +7022,7 @@ int     main(int argc, char **argv)
        VAR_SMTPD_TLS_EECDH, DEF_SMTPD_TLS_EECDH, &var_smtpd_tls_eecdh, 1, 0,
        VAR_SMTPD_TLS_FPT_DGST, DEF_SMTPD_TLS_FPT_DGST, &var_smtpd_tls_fpt_dgst, 1, 0,
        VAR_SMTPD_TLS_LOGLEVEL, DEF_SMTPD_TLS_LOGLEVEL, &var_smtpd_tls_loglevel, 0, 0,
+       VAR_SMTPD_TLS_LOGLEVEL_MAPS, DEF_SMTPD_TLS_LOGLEVEL_MAPS, &var_smtpd_tls_loglevel_maps, 0, 0,
 #endif
        VAR_SMTPD_TLS_LEVEL, DEF_SMTPD_TLS_LEVEL, &var_smtpd_tls_level, 0, 0,
        VAR_SMTPD_SASL_TYPE, DEF_SMTPD_SASL_TYPE, &var_smtpd_sasl_type, 1, 0,
index 4d41310447ca75461962cb38c395389fcafe3d9f..216fa0be3f5071494dce658b879ad7938a12fc37 100644 (file)
@@ -75,7 +75,7 @@ static void test_hostname_to_sockaddr_failure(PTEST_CTX *t,
      * The missing expectation is intentional. Do not count this as an error.
      */
     expect_ptest_error(t, "unexpected call: "
-           "hostname_to_sockaddr_pf(\"notexist\", 0, \"smtp\", 1, (ptr))");
+           "hostname_to_sockaddr_pf(\"notexist\", 0, \"smtp\", ");
 
     /*
      * Invoke the mock and verify results.
@@ -145,8 +145,7 @@ static void test_hostaddr_to_sockaddr_failure(PTEST_CTX *t,
      * The missing expectation is intentional. Do not count this as an error.
      */
     expect_ptest_error(t, "unexpected call: "
-                      "hostaddr_to_sockaddr(\"127.0.0.1\", \"25\", "
-                      "1, (ptr))");
+                      "hostaddr_to_sockaddr(\"127.0.0.1\", \"25\", ");
 
     /*
      * Invoke the mock and verify results.
index 507aff593a7d20517c82a197d8b3952860941827..8ce9c213cf5d02a873d7adbc6f4bb89f8d38a756 100644 (file)
@@ -496,6 +496,8 @@ typedef struct {
 
 typedef struct {
     TLS_APPL_STATE *ctx;
+    const char *log_param;
+    const char *log_level;
     VSTREAM *stream;
     int     fd;                                /* Event-driven file descriptor */
     int     timeout;
@@ -538,13 +540,13 @@ extern TLS_SESS_STATE *tls_client_post_connect(TLS_SESS_STATE *,
     a6, a7, a8, a9, a10, a11, a12, a13, a14))
 
 #define TLS_CLIENT_START(props, a1, a2, a3, a4, a5, a6, a7, a8, a9, \
-    a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) \
+    a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22) \
     tls_client_start((((props)->a1), ((props)->a2), ((props)->a3), \
     ((props)->a4), ((props)->a5), ((props)->a6), ((props)->a7), \
     ((props)->a8), ((props)->a9), ((props)->a10), ((props)->a11), \
     ((props)->a12), ((props)->a13), ((props)->a14), ((props)->a15), \
     ((props)->a16), ((props)->a17), ((props)->a18), ((props)->a19), \
-    ((props)->a20), (props)))
+    ((props)->a20), ((props)->a21), ((props)->a22), (props)))
 
  /*
   * tls_server.c
@@ -574,6 +576,8 @@ typedef struct {
 
 typedef struct {
     TLS_APPL_STATE *ctx;               /* TLS application context */
+    const char *log_param;
+    const char *log_level;
     VSTREAM *stream;                   /* Client stream */
     int     fd;                                /* Event-driven file descriptor */
     int     timeout;                   /* TLS handshake timeout */
@@ -608,11 +612,11 @@ extern TLS_SESS_STATE *tls_server_post_accept(TLS_SESS_STATE *);
     a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20))
 
 #define TLS_SERVER_START(props, a1, a2, a3, a4, a5, a6, a7, a8, a9, \
-    a10, a11) \
+    a10, a11, a12, a13) \
     tls_server_start((((props)->a1), ((props)->a2), ((props)->a3), \
     ((props)->a4), ((props)->a5), ((props)->a6), ((props)->a7), \
     ((props)->a8), ((props)->a9), ((props)->a10), ((props)->a11), \
-    (props)))
+    ((props)->a12), ((props)->a13), (props)))
 
  /*
   * tls_session.c
index e7ec3c8e8059d1c0f4b918254d2857ca309480e5..23e66964bf4bb3b74e3896a1db5b6fc8b923b6c8 100644 (file)
@@ -978,7 +978,12 @@ TLS_SESS_STATE *tls_client_start(const TLS_CLIENT_START_PROPS *props)
     SSL_SESSION *session = 0;
     TLS_SESS_STATE *TLScontext;
     TLS_APPL_STATE *app_ctx = props->ctx;
-    int     log_mask = app_ctx->log_mask;
+    int     log_mask;
+
+    /*
+     * Convert user loglevel to internal logmask.
+     */
+    log_mask = tls_log_mask(props->log_param, props->log_level);
 
     /*
      * When certificate verification is required, log trust chain validation
@@ -1038,6 +1043,16 @@ TLS_SESS_STATE *tls_client_start(const TLS_CLIENT_START_PROPS *props)
        return (0);
     }
 
+    /*
+     * Set the call-back routine for verbose logging.
+     * 
+     * Log_mask-dependent behavior should be consistent whether it is specified
+     * globally in tls_client_init(), or per-connection in
+     * tls_client_start().
+     */
+    if (log_mask & TLS_LOG_DEBUG)
+       SSL_set_info_callback(TLScontext->con, tls_info_callback);
+
     /*
      * Per session cipher selection for sessions with mandatory encryption
      * 
index af234a74e54bef0f0bade53bd5ced78dfdde3e10..dad8cb54f99cdf940993cbb40fd2fb51f38baece 100644 (file)
@@ -660,7 +660,7 @@ int     tls_proto_mask_lims(const char *plist, int *floor, int *ceiling)
 
 void    tls_param_init(void)
 {
-    /* If this changes, update TLS_CLIENT_PARAMS in tls_proxy.h. */
+    /* If this changes, update TLS_*_PARAMS* in tls_*.h. */
     static const CONFIG_STR_TABLE str_table[] = {
        VAR_TLS_CNF_FILE, DEF_TLS_CNF_FILE, &var_tls_cnf_file, 0, 0,
        VAR_TLS_CNF_NAME, DEF_TLS_CNF_NAME, &var_tls_cnf_name, 0, 0,
@@ -682,13 +682,13 @@ void    tls_param_init(void)
        0,
     };
 
-    /* If this changes, update TLS_CLIENT_PARAMS in tls_proxy.h. */
+    /* If this changes, update TLS_*_PARAMS* in tls_*.h. */
     static const CONFIG_INT_TABLE int_table[] = {
        VAR_TLS_DAEMON_RAND_BYTES, DEF_TLS_DAEMON_RAND_BYTES, &var_tls_daemon_rand_bytes, 1, 0,
        0,
     };
 
-    /* If this changes, update TLS_CLIENT_PARAMS in tls_proxy.h. */
+    /* If this changes, update TLS_*_PARAMS* in tls_*.h. */
     static const CONFIG_BOOL_TABLE bool_table[] = {
        VAR_TLS_APPEND_DEF_CA, DEF_TLS_APPEND_DEF_CA, &var_tls_append_def_CA,
        VAR_TLS_PREEMPT_CLIST, DEF_TLS_PREEMPT_CLIST, &var_tls_preempt_clist,
@@ -845,7 +845,7 @@ void    tls_pre_jail_init(TLS_ROLE role)
        maps_create(VAR_TLS_SERVER_SNI_MAPS, var_tls_server_sni_maps, flags);
 }
 
-int tls_cert_cb(SSL *ssl, void *arg)
+int     tls_cert_cb(SSL *ssl, void *arg)
 {
     TLS_SESS_STATE *TLScontext = arg;
     const char *cp = TLScontext->peer_sni;
@@ -869,12 +869,11 @@ int tls_cert_cb(SSL *ssl, void *arg)
        }
        msg_info("TLS SNI %s from %s not matched, using default chain",
                 TLScontext->peer_sni, TLScontext->namaddr);
-        return 1;
+       return 1;
     }
-
     SSL_certs_clear(ssl);
     if (tls_load_pem_chain(ssl, pem, TLScontext->peer_sni) == 0)
-        return 1;
+       return 1;
 
     /* errors already logged */
     return 0;
@@ -917,7 +916,6 @@ static int server_sni_callback(SSL *ssl, int *alert, void *unused)
                 TLScontext->namaddr, TLScontext->peer_sni, sni);
        return SSL_TLSEXT_ERR_NOACK;
     }
-
     TLScontext->peer_sni = mystrdup(sni);
     return SSL_TLSEXT_ERR_OK;
 }
index eecdbdda3ba00cdfe23b9037c3120aaf888b3d42..e9a827b976bdfa19903b1ea16b78d526f15ae8d7 100644 (file)
@@ -133,7 +133,7 @@ char   *tls_proxy_client_init_serialize(ATTR_PRINT_COMMON_FN print_fn,
 
 TLS_CLIENT_INIT_PROPS *tls_proxy_client_init_from_string(
                                                ATTR_SCAN_COMMON_FN scan_fn,
-                                                            VSTRING *buf)
+                                                              VSTRING *buf)
 {
     const char myname[] = "tls_proxy_client_init_from_string";
     TLS_CLIENT_INIT_PROPS *props = 0;
@@ -276,10 +276,13 @@ int     tls_proxy_client_init_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
     props->CAfile = vstring_export(CAfile);
     props->CApath = vstring_export(CApath);
     props->mdalg = vstring_export(mdalg);
-    ret = (ret == 14 ? 1 : -1);
-    if (ret != 1) {
+    if (ret != 14) {
+       msg_warn("%s: want 14 attributes, got %d", __func__, ret);
+       ret = -1;
        tls_proxy_client_init_free(props);
        props = 0;
+    } else {
+       ret = 1;
     }
     *(TLS_CLIENT_INIT_PROPS **) ptr = props;
     if (msg_verbose)
index d0720519cf2e1439db6e82a5edd2fcc416e23445..a7e1628e23300d8fddd4681093a6c3623ebda6bd 100644 (file)
@@ -319,11 +319,13 @@ int     tls_proxy_client_param_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
     params->tls_dane_digests = vstring_export(tls_dane_digests);
     params->tls_mgr_service = vstring_export(tls_mgr_service);
     params->tls_tkt_cipher = vstring_export(tls_tkt_cipher);
-
-    ret = (ret == 19 ? 1 : -1);
-    if (ret != 1) {
+    if (ret != 19) {
+       msg_warn("%s: want 19 attributes, got %d", __func__, ret);
+       ret = -1;
        tls_proxy_client_param_free(params);
        params = 0;
+    } else {
+       ret = 1;
     }
     *(TLS_CLIENT_PARAMS **) ptr = params;
     if (msg_verbose)
index aef615acabcd206408d08bb21e03453b3efe4eb8..beae3a7c6a5523dfce88e8b5cc20733e25e912f8 100644 (file)
@@ -230,6 +230,10 @@ int     tls_proxy_client_start_print(ATTR_PRINT_COMMON_FN print_fn,
 #define STRING_OR_EMPTY(s) ((s) ? (s) : "")
 
     ret = print_fn(fp, flags | ATTR_FLAG_MORE,
+                  SEND_ATTR_STR(TLS_ATTR_LOG_PARAM,
+                                STRING_OR_EMPTY(props->log_param)),
+                  SEND_ATTR_STR(TLS_ATTR_LOG_LEVEL,
+                                STRING_OR_EMPTY(props->log_level)),
                   SEND_ATTR_INT(TLS_ATTR_TIMEOUT, props->timeout),
                   SEND_ATTR_INT(TLS_ATTR_ENABLE_RPK, props->enable_rpk),
                   SEND_ATTR_INT(TLS_ATTR_TLS_LEVEL, props->tls_level),
@@ -274,6 +278,8 @@ int     tls_proxy_client_start_print(ATTR_PRINT_COMMON_FN print_fn,
 
 void    tls_proxy_client_start_free(TLS_CLIENT_START_PROPS *props)
 {
+    myfree((void *) props->log_param);
+    myfree((void *) props->log_level);
     myfree((void *) props->nexthop);
     myfree((void *) props->host);
     myfree((void *) props->namaddr);
@@ -478,6 +484,8 @@ int     tls_proxy_client_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
     TLS_CLIENT_START_PROPS *props
     = (TLS_CLIENT_START_PROPS *) mymalloc(sizeof(*props));
     int     ret;
+    VSTRING *log_param = vstring_alloc(25);
+    VSTRING *log_level = vstring_alloc(25);
     VSTRING *nexthop = vstring_alloc(25);
     VSTRING *host = vstring_alloc(25);
     VSTRING *namaddr = vstring_alloc(25);
@@ -491,9 +499,9 @@ int     tls_proxy_client_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
     VSTRING *ffail_type = vstring_alloc(25);
 
 #ifdef USE_TLSRPT
-#define EXPECT_START_SCAN_RETURN       17
+#define EXPECT_START_SCAN_RETURN       19
 #else
-#define EXPECT_START_SCAN_RETURN       16
+#define EXPECT_START_SCAN_RETURN       18
 #endif
 
     if (msg_verbose)
@@ -508,6 +516,8 @@ int     tls_proxy_client_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
     props->fd = -1;
     props->dane = 0;                           /* scan_fn may return early */
     ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
+                 RECV_ATTR_STR(TLS_ATTR_LOG_PARAM, log_param),
+                 RECV_ATTR_STR(TLS_ATTR_LOG_LEVEL, log_level),
                  RECV_ATTR_INT(TLS_ATTR_TIMEOUT, &props->timeout),
                  RECV_ATTR_INT(TLS_ATTR_ENABLE_RPK, &props->enable_rpk),
                  RECV_ATTR_INT(TLS_ATTR_TLS_LEVEL, &props->tls_level),
@@ -532,6 +542,8 @@ int     tls_proxy_client_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
                  RECV_ATTR_STR(TLS_ATTR_FFAIL_TYPE, ffail_type),
                  ATTR_TYPE_END);
     /* Always construct a well-formed structure. */
+    props->log_param = vstring_export(log_param);
+    props->log_level = vstring_export(log_level);
     props->nexthop = vstring_export(nexthop);
     props->host = vstring_export(host);
     props->namaddr = vstring_export(namaddr);
index 9965c685df9f65b52ba30912a84d478d4b1d483a..f1859ff7d32c94caf5d6973ec35d1a8448b0a4e4 100644 (file)
 #ifdef USE_TLS
 
 #define TLS_PROXY_CLIENT_START_PROPS(props, a1, a2, a3, a4, a5, a6, a7, a8, \
-    a9, a10, a11, a12, a13, a14, a15, a16, a17) \
+    a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) \
     (((props)->a1), ((props)->a2), ((props)->a3), \
     ((props)->a4), ((props)->a5), ((props)->a6), ((props)->a7), \
     ((props)->a8), ((props)->a9), ((props)->a10), ((props)->a11), \
     ((props)->a12), ((props)->a13), ((props)->a14), ((props)->a15), \
-    ((props)->a16), ((props)->a17))
+    ((props)->a16), ((props)->a17), ((props)->a18), ((props)->a19))
 
 extern int tls_proxy_client_start_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, const void *);
 extern void tls_proxy_client_start_free(TLS_CLIENT_START_PROPS *);
index b64dab3ee898ff1fad6eb0b242d97513a989e034..db2f6c4cef7c42f0d0fa2cc72ec0075c24f91fa6 100644 (file)
@@ -101,6 +101,10 @@ int     tls_proxy_server_start_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
 #define STRING_OR_EMPTY(s) ((s) ? (s) : "")
 
     ret = print_fn(fp, flags | ATTR_FLAG_MORE,
+                  SEND_ATTR_STR(TLS_ATTR_LOG_PARAM,
+                                STRING_OR_EMPTY(props->log_param)),
+                  SEND_ATTR_STR(TLS_ATTR_LOG_LEVEL,
+                                STRING_OR_EMPTY(props->log_level)),
                   SEND_ATTR_INT(TLS_ATTR_TIMEOUT, props->timeout),
                   SEND_ATTR_INT(TLS_ATTR_ENABLE_RPK, props->enable_rpk),
                   SEND_ATTR_INT(TLS_ATTR_REQUIRECERT, props->requirecert),
@@ -127,6 +131,8 @@ int     tls_proxy_server_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
     TLS_SERVER_START_PROPS *props
     = (TLS_SERVER_START_PROPS *) mymalloc(sizeof(*props));
     int     ret;
+    VSTRING *log_param = vstring_alloc(25);
+    VSTRING *log_level = vstring_alloc(25);
     VSTRING *serverid = vstring_alloc(25);
     VSTRING *namaddr = vstring_alloc(25);
     VSTRING *cipher_grade = vstring_alloc(25);
@@ -141,6 +147,8 @@ int     tls_proxy_server_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
     props->stream = 0;
     /* XXX Caller sets fd. */
     ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
+                 RECV_ATTR_STR(TLS_ATTR_LOG_PARAM, log_param),
+                 RECV_ATTR_STR(TLS_ATTR_LOG_LEVEL, log_level),
                  RECV_ATTR_INT(TLS_ATTR_TIMEOUT, &props->timeout),
                  RECV_ATTR_INT(TLS_ATTR_ENABLE_RPK, &props->enable_rpk),
                  RECV_ATTR_INT(TLS_ATTR_REQUIRECERT, &props->requirecert),
@@ -151,12 +159,15 @@ int     tls_proxy_server_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
                                cipher_exclusions),
                  RECV_ATTR_STR(TLS_ATTR_MDALG, mdalg),
                  ATTR_TYPE_END);
+    /* Always construct a well-formed structure. */
+    props->log_param = vstring_export(log_param);
+    props->log_level = vstring_export(log_level);
     props->serverid = vstring_export(serverid);
     props->namaddr = vstring_export(namaddr);
     props->cipher_grade = vstring_export(cipher_grade);
     props->cipher_exclusions = vstring_export(cipher_exclusions);
     props->mdalg = vstring_export(mdalg);
-    ret = (ret == 8 ? 1 : -1);
+    ret = (ret == 10 ? 1 : -1);
     if (ret != 1) {
        tls_proxy_server_start_free(props);
        props = 0;
@@ -170,6 +181,8 @@ int     tls_proxy_server_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
 void    tls_proxy_server_start_free(TLS_SERVER_START_PROPS *props)
 {
     /* XXX Caller closes fd. */
+    myfree((void *) props->log_param);
+    myfree((void *) props->log_level);
     myfree((void *) props->serverid);
     myfree((void *) props->namaddr);
     myfree((void *) props->cipher_grade);
index a63865158ef3a1b4605bdf3b044496cb605c0e06..2062d78fb3c67c1c4d14c475518e9b95a4a59809 100644 (file)
 
 #ifdef USE_TLS
 
-#define TLS_PROXY_SERVER_START_PROPS(props, a1, a2, a3, a4, a5, a6, a7, a8) \
+#define TLS_PROXY_SERVER_START_PROPS(props, a1, a2, a3, a4, a5, a6, a7, a8, \
+    a9, a10) \
     (((props)->a1), ((props)->a2), ((props)->a3), \
     ((props)->a4), ((props)->a5), ((props)->a6), ((props)->a7), \
-    ((props)->a8))
+    ((props)->a8), ((props)->a9), ((props)->a10))
 
 extern int tls_proxy_server_start_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, const void *);
 extern void tls_proxy_server_start_free(TLS_SERVER_START_PROPS *);
index d38b3b3315df4e2c968bce64b820ffa9950ae96d..122628501698217db09500801091427788b667e0 100644 (file)
@@ -394,7 +394,7 @@ static int trust_server_ccerts(X509_STORE_CTX *ctx, void *unused)
     int     i, usages = 0;
 
     if ((x = X509_STORE_CTX_get0_cert(ctx)) == NULL
-        || (xku = X509_get_ext_d2i(x, NID_ext_key_usage, NULL, NULL)) == NULL)
+      || (xku = X509_get_ext_d2i(x, NID_ext_key_usage, NULL, NULL)) == NULL)
        return X509_verify_cert(ctx);
 
     for (i = 0; i < sk_ASN1_OBJECT_num(xku); i++) {
@@ -740,7 +740,6 @@ TLS_APPL_STATE *tls_server_init(const TLS_SERVER_INIT_PROPS *props)
        }
        SSL_CTX_set_client_CA_list(server_ctx, calist);
     }
-
     if (props->ask_ccert && var_tls_srvr_ccerts)
        SSL_CTX_set_cert_verify_callback(server_ctx, trust_server_ccerts, NULL);
 
@@ -820,7 +819,12 @@ TLS_SESS_STATE *tls_server_start(const TLS_SERVER_START_PROPS *props)
     TLS_SESS_STATE *TLScontext;
     const char *cipher_list;
     TLS_APPL_STATE *app_ctx = props->ctx;
-    int     log_mask = app_ctx->log_mask;
+    int     log_mask;
+
+    /*
+     * Convert user loglevel to internal logmask.
+     */
+    log_mask = tls_log_mask(props->log_param, props->log_level);
 
     /*
      * Implicitly enable logging of trust chain errors when verified certs
@@ -847,6 +851,17 @@ TLS_SESS_STATE *tls_server_start(const TLS_SERVER_START_PROPS *props)
        tls_free_context(TLScontext);
        return (0);
     }
+
+    /*
+     * Set the call-back routine for verbose logging.
+     * 
+     * Log_mask-dependent behavior should be consistent whether it is specified
+     * globally in tls_server_init(), or per-connection in
+     * tls_server_start().
+     */
+    if (log_mask & TLS_LOG_DEBUG)
+       SSL_set_info_callback(TLScontext->con, tls_info_callback);
+
     cipher_list = tls_set_ciphers(TLScontext, props->cipher_grade,
                                  props->cipher_exclusions);
     if (cipher_list == 0) {
@@ -868,7 +883,6 @@ TLS_SESS_STATE *tls_server_start(const TLS_SERVER_START_PROPS *props)
        tls_free_context(TLScontext);
        return (0);
     }
-
     /* Configure the SNI-based certificate selection callback */
     SSL_set_cert_cb(TLScontext->con, tls_cert_cb, TLScontext);
 
index e14b2ef8ef31c5e14730a5aab84a20729e93a5e1..ebda90a69848a9fe926b7125ed995f2d325ab967 100644 (file)
     || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
     || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
     || defined(FREEBSD11) || defined(FREEBSD12) || defined(FREEBSD13) \
-    || defined(FREEBSD14) \
+    || defined(FREEBSD14) || defined(FREEBSD15) || defined(FREEBSD16) \
     || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
     || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
     || defined(OPENBSD5) || defined(OPENBSD6) || defined(OPENBSD7) \
+    || defined(OPENBSD8) \
     || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \
     || defined(NETBSD4) || defined(NETBSD5) || defined(NETBSD6) \
     || defined(NETBSD7) | defined(NETBSD8) || defined(NETBSD9) \
-    || defined(NETBSD10) \
+    || defined(NETBSD10) || defined(NETBSD11) || defined(NETBSD12) \
     || defined(EKKOBSD1) || defined(DRAGONFLY)
 #define SUPPORTED
 #include <sys/param.h>
index 7d33f2fff506a6b392c5b5c53ff04631ea370330..56ef911a44a056af668c1a567fe7dc547ba6b37c 100644 (file)
@@ -122,7 +122,7 @@ struct servent *wrap_getservbyport(int port, const char *proto)
 void    wrap_setservent(int stayopen)
 {
 #undef setservent
-    return (setservent(stayopen));
+    setservent(stayopen);
 }
 
 /* wrap_endservent - wrap endservent() with stable internal API */
@@ -130,7 +130,7 @@ void    wrap_setservent(int stayopen)
 void    wrap_endservent(void)
 {
 #undef endservent
-    return (endservent());
+    endservent();
 }
 
 #endif