]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.12-20140713-nonprod 20140713-nonprod
authorWietse Venema <wietse@porcupine.org>
Mon, 14 Jul 2014 01:22:45 +0000 (11:22 +1000)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Mon, 14 Jul 2014 01:54:05 +0000 (11:54 +1000)
134 files changed:
postfix/HISTORY
postfix/INSTALL
postfix/README_FILES/INSTALL
postfix/TODO [new file with mode: 0644]
postfix/html/INSTALL.html
postfix/html/bounce.8.html
postfix/html/cleanup.8.html
postfix/html/defer.8.html
postfix/html/lmtp.8.html
postfix/html/local.8.html
postfix/html/mailq.1.html
postfix/html/newaliases.1.html
postfix/html/pickup.8.html
postfix/html/postconf.5.html
postfix/html/postdrop.1.html
postfix/html/qmqpd.8.html
postfix/html/sendmail.1.html
postfix/html/smtp.8.html
postfix/html/smtpd.8.html
postfix/html/trace.8.html
postfix/html/verify.8.html
postfix/makedefs
postfix/man/man1/sendmail.1
postfix/man/man5/postconf.5
postfix/man/man8/bounce.8
postfix/man/man8/qmqpd.8
postfix/man/man8/smtp.8
postfix/man/man8/smtpd.8
postfix/man/man8/verify.8
postfix/mantools/postlink
postfix/proto/INSTALL.html
postfix/proto/postconf.proto
postfix/src/bounce/Makefile.in
postfix/src/bounce/bounce.c
postfix/src/bounce/bounce_notify_service.c
postfix/src/bounce/bounce_notify_util.c
postfix/src/bounce/bounce_notify_verp.c
postfix/src/bounce/bounce_one_service.c
postfix/src/bounce/bounce_service.h
postfix/src/bounce/bounce_template.c
postfix/src/bounce/bounce_trace_service.c
postfix/src/bounce/bounce_warn_service.c
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/cleanup.h
postfix/src/cleanup/cleanup_addr.c
postfix/src/cleanup/cleanup_api.c
postfix/src/cleanup/cleanup_bounce.c
postfix/src/cleanup/cleanup_envelope.c
postfix/src/cleanup/cleanup_final.c
postfix/src/cleanup/cleanup_out.c
postfix/src/cleanup/cleanup_state.c
postfix/src/global/Makefile.in
postfix/src/global/abounce.c
postfix/src/global/abounce.h
postfix/src/global/bounce.c
postfix/src/global/bounce.h
postfix/src/global/cleanup_strflags.c
postfix/src/global/cleanup_user.h
postfix/src/global/defer.c
postfix/src/global/defer.h
postfix/src/global/deliver_pass.c
postfix/src/global/deliver_request.c
postfix/src/global/deliver_request.h
postfix/src/global/dict_ldap.c
postfix/src/global/dict_sqlite.c
postfix/src/global/ehlo_mask.c
postfix/src/global/ehlo_mask.h
postfix/src/global/int_filt.c
postfix/src/global/mail_params.c
postfix/src/global/mail_params.h
postfix/src/global/mail_proto.h
postfix/src/global/mail_version.h
postfix/src/global/mime_state.c
postfix/src/global/post_mail.c
postfix/src/global/post_mail.h
postfix/src/global/rec_type.h
postfix/src/global/smtputf8.c [new file with mode: 0644]
postfix/src/global/smtputf8.h [new file with mode: 0644]
postfix/src/global/uxtext.c [new file with mode: 0644]
postfix/src/global/uxtext.h [new file with mode: 0644]
postfix/src/local/Makefile.in
postfix/src/local/forward.c
postfix/src/local/local.c
postfix/src/local/local.h
postfix/src/master/Makefile.in
postfix/src/oqmgr/Makefile.in
postfix/src/oqmgr/qmgr.h
postfix/src/oqmgr/qmgr_active.c
postfix/src/oqmgr/qmgr_deliver.c
postfix/src/oqmgr/qmgr_message.c
postfix/src/pickup/Makefile.in
postfix/src/pickup/pickup.c
postfix/src/postscreen/Makefile.in
postfix/src/postscreen/postscreen_smtpd.c
postfix/src/qmgr/Makefile.in
postfix/src/qmgr/qmgr.h
postfix/src/qmgr/qmgr_active.c
postfix/src/qmgr/qmgr_deliver.c
postfix/src/qmgr/qmgr_message.c
postfix/src/qmqpd/Makefile.in
postfix/src/qmqpd/qmqpd.c
postfix/src/sendmail/sendmail.c
postfix/src/smtp/Makefile.in
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp.h
postfix/src/smtp/smtp_addr.c
postfix/src/smtp/smtp_addr.h
postfix/src/smtp/smtp_chat.c
postfix/src/smtp/smtp_connect.c
postfix/src/smtp/smtp_map11.c
postfix/src/smtp/smtp_proto.c
postfix/src/smtp/smtp_tls_policy.c
postfix/src/smtpd/Makefile.in
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd.h
postfix/src/smtpd/smtpd_chat.c
postfix/src/smtpd/smtpd_check.c
postfix/src/smtpd/smtpd_check.h
postfix/src/tls/Makefile.in
postfix/src/trivial-rewrite/Makefile.in
postfix/src/trivial-rewrite/resolve.c
postfix/src/util/Makefile.in
postfix/src/util/host_port.c
postfix/src/util/midna.c [new file with mode: 0644]
postfix/src/util/midna.h [new file with mode: 0644]
postfix/src/util/printable.c
postfix/src/util/stringops.h
postfix/src/util/valid_utf8_hostname.c [new file with mode: 0644]
postfix/src/util/valid_utf8_hostname.h [new file with mode: 0644]
postfix/src/util/valid_utf8_string.c [moved from postfix/src/util/valid_utf_8.c with 85% similarity]
postfix/src/verify/Makefile.in
postfix/src/verify/verify.c
postfix/utf8test.eml [new file with mode: 0644]
postfix/utf8test2.eml [new file with mode: 0644]

index 7e5e9966fa25e4fba5c0874886d49a744ee5d038..72fb4dbbb58c6661287545b5acc96d74f5d68a97 100644 (file)
@@ -15805,7 +15805,7 @@ Apologies for any names omitted.
        Robustness: skip LDAP queries with non-UTF-8 search strings
        (in anticipation of UTF8SMTP support).  File: global/dict_ldap.c.
 
-       Strict UTF-8 validator per RFC 3629. File: util/valid_utf_8.c.
+       Strict UTF-8 validator per RFC 3629. File: util/valid_utf8_string.c.
 
 20100601
 
@@ -20123,12 +20123,6 @@ Apologies for any names omitted.
        Files: global/mail_params.h, mantools/postlink,
        proto/postconf.proto, smtpd/smtpd.c, smtpd/smtpd_check.c.
 
-20140708
-
-       Bugfix (introduced 20140701): did not restore jumpbuf
-       while evaluatingsmtpd_policy_service_default_action.
-       Viktor Dukhovni. File: smtpd/smtpd_check.c.
-
 20140709
 
        Cleanup: bitrot in unused function. File: global/defer.c.
@@ -20136,3 +20130,89 @@ Apologies for any names omitted.
        Cleanup: add SYSLIBS minus static libraries while building
        Postfix shared-library objects. Files: makedefs, util/Makefile.in,
        global/Makefile.in, dns/Makefile.in, master/Makefile.in/.
+
+20140708
+
+       Bugfix (introduced 20140701): did not restore jumpbuf while
+       evaluatingsmtpd_policy_service_default_action.  Viktor
+       Dukhovni. File: smtpd/smtpd_check.c.
+
+       Feature: VERY PRELIMINARY support for SMTPUTF8 based on an
+       initial implementation by Arnt Gulbrandsen, funded by CNNIC.
+       This implements the syntax of SMTP commands and DSN delivery
+       status notifications. It does not address the problem that
+       the same domain name may show up in different forms: an
+       UTF8-encoded name with non-ASCII charaters, or an IDNA-encoded
+       (xn--mumble) name with ASCII-only characters. This means
+       that access policies, mydestination, virtual_*_domains and
+       relay_domans will have to understand both forms in order
+       to provide complete coverage.  For now, SMTPUTF8 support
+       must not be enabled except for testing.
+
+20140710
+
+       Portability: add '-Wl,--enable-new-dtags' to the linker
+       command line with building with Postfix shared libraries
+       on Linux. Viktor Dukhovni. file: makedefs.
+
+20140711
+
+       Background: What is SMTPUTF8 autodetection? Postfix cannot
+       rely solely on the sender's declaration that a message
+       requires SMTPUTF8 support, because UTF8 may be introduced
+       during local processing (for example, the client hostname
+       in Postfix's Received: header, adding @$myorigin or .$mydomain
+       to an incomplete address, address rewriting, alias expansion,
+       automatic BCC recipients, local forwarding, and modifications
+       made by header checks or Milter applications).  This means
+       that some form of autodetection is needed that a message
+       requires SMTPUTF8 support.
+
+       Cleanup: don't try to distinguish between UTF that is already
+       present in a message or envelope, and UTF8 that is introduced
+       during local processing (see above).  Maintaining this
+       distinction is too problematic.
+
+       Cleanup: mailing list friendliness. Allow delivery of
+       SMTPUTF8 mail to non-SMTPUTF8 servers when a message has
+       no UTF8 headers, no UTF8 envelope sender, and when the
+       specific delivery request contains no UTF8 envelope recipient.
+       This is needed for mailing lists that may have a mix of
+       UTF8 and non-UTF8 subscriber addresses. File: global/smtputf8.h,
+       smtp/smtp_proto.c.
+
+       Cleanup: moved all SMTPUTF8 detection to the cleanup server,
+       so that it can apply equally to sendmail command-line
+       submission, forwarded mail, postmaster notifications,
+       delivery status notifications, mail received with the qmqpd
+       server, address verification probes, as well as UTF8
+       introduced during local processing (see above).  Files:
+       cleanup/cleanup_out.c, cleanup/cleanup_addr.c.
+
+       Cleanup: store the SMTPUTF8 message (i.e. non-recipient)
+       flags in the first queue file record, so that the queue
+       manager can find the information without having to read
+       every queue file record.  Files: cleanup/cleanup_final.c,
+       *qmgr/qmgr_message.c.
+
+20140713
+
+       Interoperability: new parameter smtputf8_autodetect_classes
+       for selective autodetection that a message requires UTF8SMTP
+       support. During the initial SMTPUTF8 rollout, this is limited
+       by default to Postfix sendmail command-line submissions and
+       address verification probes.  Sites that introduce UTF8
+       during local processing (see above) will have to enable
+       SMTPUTF8 autodetection for all mail sources. This feature
+       shares infrastructure with the older internal_filter_classes
+       feature.  Files: bounce/bounce_notify_service.c,
+       bounce/bounce_notify_verp.c, bounce/bounce_one_service.c,
+       bounce/bounce_trace_service.c, bounce/bounce_warn_service.c,
+       global/int_filt.c, global/mail_proto.h, global/smtputf8.c,
+       local/forward.c, pickup/pickup.c, qmqpd/qmqpd.c, smtp/smtp_chat.c,
+       smtpd/smtpd.c, smtpd/smtpd_chat.c, verify/verify.c.
+
+       Feature: preliminary message/global support. This does not
+       yet parse encoded message/global (such as message/global
+       sent through an non-8BITMIME system). Such mail cannot yet
+       be inspected with header_checks. File: global/mime_state.c.
index f30acde508c020d28393b50e65561024f3c09714..c467364d1ebfa7818d3e7495457372fa48a81e53 100644 (file)
@@ -519,6 +519,10 @@ The following is an extensive list of names and values.
 ||                            |platforms that are known to support this      |
 ||                            |feature.                                      |
 ||_____________________________|______________________________________________|
+||                            |Do not build with EAI (SMTPUTF8) support. By  |
+||-DNO_EAI                    |default, EAI support is compiled in when the  |
+||                            |"icuuc" library and header files are found.   |
+||_____________________________|______________________________________________|
 ||                            |Do not build with IPv6 support. By default,   |
 ||                            |IPv6 support is compiled in on platforms that |
 ||-DNO_IPV6                   |are known to have IPv6 support. Note: this    |
index e4e5f33e9c3e67156fdbbe00f30334845d7aa1c3..5a6a4211abf40548f2e9be55ef65d0756e22969e 100644 (file)
@@ -519,6 +519,10 @@ The following is an extensive list of names and values.
 ||                             |platforms that are known to support this      |
 ||                             |feature.                                      |
 |_\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
+||                             |Do not build with EAI (SMTPUTF8) support. By  |
+||-DNO_EAI                     |default, EAI support is compiled in when the  |
+||                             |"icuuc" library and header files are found.   |
+|_\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
 ||                             |Do not build with IPv6 support. By default,   |
 ||                             |IPv6 support is compiled in on platforms that |
 ||-DNO_IPV6                    |are known to have IPv6 support. Note: this    |
diff --git a/postfix/TODO b/postfix/TODO
new file mode 100644 (file)
index 0000000..7126223
--- /dev/null
@@ -0,0 +1,48 @@
+Why do we send SMTPUTF_FLAG_RECIPIENT in bounce requests when
+bouncing a single recipient?
+
+Should we encode headers with RFC 2047, when that is the only
+reason that Postfix cannot deliver to a non-UTF8SMTP server?
+
+Items below this line are closed.
+
+Submit DSNs with SMTPUTF8 auto-detection. This requires parsing
+the headers of message/global, message/global-headers,
+and message/global-delivery-status.
+
+Forward local mail with SMTPUTF8 auto-detection, but don't 
+break mail that would have been delivered prior to SMTPUTF8
+support.
+
+mailinglist support: if a message requires SMTPUTF8 only because
+some recipient addresses are UTF8, then deliveries to other domains
+should not require SMTPUTF8. This means that Postfix needs to
+maintain multiple flags:
+
+1) The message has UTF8 header values. This is a queue file property.
+
+2) The message has an UTF8 sender address. This is also a queue
+file property.
+
+3) A specific delivery request contains UTF8 recipients.  This is
+a delivery-request property.
+
+Only in cases 1) or 2) should all deliveries require SMTPUTF8.
+Otherwise, only cases 3) require SMTPUTF8, and all other
+deliveries can use lagacy SMTP.
+
+Is an smtputf8 bounce always 8bit?
+
+What happens when address rewriting or aliasing introduces non-ASCII
+domains or addresses?
+
+printable() stricter UTF8 parsing.
+
+lowercase() find a way to enable/disable UTF8
+
+qmqpd support.
+
+sendmail: auto-detect or command-line flag?
+
+bounce: don't scan the entire queue file for smtputf8 info. Just
+like encoding, receive smtputf8 info in the "bounce flush" request.
index 06d9c312820d5086a3935c8abcc7cb621ece1721..fd477a71f0558b413a1e9a51a66edde2a394edca 100644 (file)
@@ -730,6 +730,10 @@ this feature.  </td> </tr>
 EPOLL support.  By default, EPOLL support is compiled in on platforms
 that are known to support this feature. </td> </tr>
 
+<tr> <td> </td> <td> -DNO_EAI </td> <td> Do not build with EAI
+(SMTPUTF8) support. By default, EAI support is compiled in when 
+the "icuuc" library and header files are found.  </td> </tr>
+
 <tr> <td> </td> <td> -DNO_IPV6 </td> <td> Do not build with IPv6
 support. By default, IPv6 support is compiled in on platforms that
 are known to have IPv6 support. Note: this directive is for debugging
index 8d7d38f08b34922ebe4a252570a5ae183ea51235..13264ac9858d0b9ee28ff24e3aa1c20c1c31193b 100644 (file)
@@ -13,7 +13,7 @@ BOUNCE(8)                                                            BOUNCE(8)
        <b>bounce</b> [generic Postfix daemon options]
 
 <b>DESCRIPTION</b>
-       The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon maintains per-message log files with delivery sta-
+       The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon maintains per-message log files with delivery sta
        tus information. Each log file is named after the queue  file  that  it
        corresponds  to,  and  is  kept in a queue subdirectory named after the
        service name in the <a href="master.5.html"><b>master.cf</b></a> file (either  <b>bounce</b>,  <b>defer</b>  or  <b>trace</b>).
@@ -21,15 +21,15 @@ BOUNCE(8)                                                            BOUNCE(8)
 
        The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon processes two types of service requests:
 
-       <b>o</b>      Append a recipient (non-)delivery status record to a per-message
+       ·      Append a recipient (non-)delivery status record to a per-message
               log file.
 
-       <b>o</b>      Enqueue a delivery status notification message, with a copy of a
+       ·      Enqueue a delivery status notification message, with a copy of a
               per-message log file and of the corresponding message.  When the
               delivery status notification message is  enqueued  successfully,
               the per-message log file is deleted.
 
-       The  software does a best notification effort. A non-delivery notifica-
+       The  software does a best notification effort. A non-delivery notifica
        tion is sent even when the log file or the original message  cannot  be
        read.
 
@@ -46,6 +46,9 @@ BOUNCE(8)                                                            BOUNCE(8)
        <a href="http://tools.ietf.org/html/rfc3464">RFC 3464</a> (Delivery Status Notifications)
        <a href="http://tools.ietf.org/html/rfc3834">RFC 3834</a> (Auto-Submitted: message header)
        <a href="http://tools.ietf.org/html/rfc5322">RFC 5322</a> (Internet Message Format)
+       <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a> (Internationalized SMTP)
+       <a href="http://tools.ietf.org/html/rfc6532">RFC 6532</a> (Internationalized Message Format)
+       <a href="http://tools.ietf.org/html/rfc6533">RFC 6533</a> (Internationalized Delivery Status Notifications)
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).
@@ -67,8 +70,8 @@ BOUNCE(8)                                                            BOUNCE(8)
               Postfix versions before 2.0.
 
        <b><a href="postconf.5.html#bounce_notice_recipient">bounce_notice_recipient</a> (postmaster)</b>
-              The recipient of postmaster notifications with the message head-
-              ers of mail that Postfix did not deliver and of  SMTP  conversa-
+              The recipient of postmaster notifications with the message head
+              ers of mail that Postfix did not deliver and of  SMTP  conversa
               tion transcripts of mail that Postfix did not receive.
 
        <b><a href="postconf.5.html#bounce_size_limit">bounce_size_limit</a> (50000)</b>
@@ -79,7 +82,7 @@ BOUNCE(8)                                                            BOUNCE(8)
               Pathname of a configuration file with bounce message  templates.
 
        <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>
@@ -87,7 +90,7 @@ BOUNCE(8)                                                            BOUNCE(8)
               request before it is terminated by a built-in watchdog timer.
 
        <b><a href="postconf.5.html#delay_notice_recipient">delay_notice_recipient</a> (postmaster)</b>
-              The recipient of postmaster notifications with the message head-
+              The recipient of postmaster notifications with the message head
               ers of mail that cannot be delivered within  $<a href="postconf.5.html#delay_warning_time">delay_warning_time</a>
               time units.
 
@@ -137,9 +140,15 @@ BOUNCE(8)                                                            BOUNCE(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The mail system name that is prepended to the  process  name  in
-              syslog  records,  so  that  "smtpd" becomes, for example, "post-
+              syslog  records,  so  that  "smtpd" becomes, for example, "post
               fix/smtpd".
 
+       Available in Postfix 2.12 and later:
+
+       <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‐
+              fied mail origin classes.
+
 <b>FILES</b>
        /var/spool/postfix/bounce/* non-delivery records
        /var/spool/postfix/defer/* non-delivery records
index a3489bd6b96b6c5cb97432e3e27b7a988d61366a..6bb8491b46068c1928cee1ba389acbb25a75734e 100644 (file)
@@ -18,28 +18,28 @@ CLEANUP(8)                                                          CLEANUP(8)
 
        The <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon always performs the following transformations:
 
-       <b>o</b>      Insert missing message headers: (<b>Resent-</b>) <b>From:</b>,  <b>To:</b>,  <b>Message-</b>
+       ·      Insert missing message headers: (<b>Resent-</b>) <b>From:</b>,  <b>To:</b>,  <b>Message-</b>
               <b>Id:</b>, and <b>Date:</b>.
 
-       <b>o</b>      Transform   envelope   and  header  addresses  to  the  standard
-              <i>user@fully-qualified-domain</i> form that is expected by other Post-
+       ·      Transform   envelope   and  header  addresses  to  the  standard
+              <i>user@fully-qualified-domain</i> form that is expected by other Post
               fix  programs.  This task is delegated to the <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a>
               daemon.
 
-       <b>o</b>      Eliminate duplicate envelope recipient addresses.
+       ·      Eliminate duplicate envelope recipient addresses.
 
        The following address transformations are optional:
 
-       <b>o</b>      Optionally, rewrite all envelope and header addresses  according
+       ·      Optionally, rewrite all envelope and header addresses  according
               to the mappings specified in the <a href="canonical.5.html"><b>canonical</b>(5)</a> lookup tables.
 
-       <b>o</b>      Optionally,  masquerade  envelope  sender  addresses and message
+       ·      Optionally,  masquerade  envelope  sender  addresses and message
               header addresses (i.e. strip host or  domain  information  below
               all  domains  listed in the <b><a href="postconf.5.html#masquerade_domains">masquerade_domains</a></b> parameter, except
               for user names listed in  <b><a href="postconf.5.html#masquerade_exceptions">masquerade_exceptions</a></b>).   By  default,
               address masquerading does not affect envelope recipients.
 
-       <b>o</b>      Optionally,  expand envelope recipients according to information
+       ·      Optionally,  expand envelope recipients according to information
               found in the <a href="virtual.5.html"><b>virtual</b>(5)</a> lookup tables.
 
        The <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon performs sanity checks on  the  content  of  each
@@ -107,7 +107,7 @@ CLEANUP(8)                                                          CLEANUP(8)
 
        <b><a href="postconf.5.html#header_checks">header_checks</a> (empty)</b>
               Optional lookup tables for content inspection  of  primary  non-
-              MIME  message headers, as specified in the <a href="header_checks.5.html"><b>header_checks</b>(5)</a> man-
+              MIME  message headers, as specified in the <a href="header_checks.5.html"><b>header_checks</b>(5)</a> man
               ual page.
 
        Available in Postfix version 2.0 and later:
@@ -122,18 +122,18 @@ CLEANUP(8)                                                          CLEANUP(8)
               page.
 
        <b><a href="postconf.5.html#nested_header_checks">nested_header_checks</a> ($<a href="postconf.5.html#header_checks">header_checks</a>)</b>
-              Optional lookup tables for content inspection of  non-MIME  mes-
+              Optional lookup tables for content inspection of  non-MIME  mes
               sage   headers   in  attached  messages,  as  described  in  the
               <a href="header_checks.5.html"><b>header_checks</b>(5)</a> manual page.
 
        Available in Postfix version 2.3 and later:
 
        <b><a href="postconf.5.html#message_reject_characters">message_reject_characters</a> (empty)</b>
-              The set of characters that Postfix will reject in  message  con-
+              The set of characters that Postfix will reject in  message  con
               tent.
 
        <b><a href="postconf.5.html#message_strip_characters">message_strip_characters</a> (empty)</b>
-              The set of characters that Postfix will remove from message con-
+              The set of characters that Postfix will remove from message con
               tent.
 
 <b>BEFORE QUEUE MILTER CONTROLS</b>
@@ -147,7 +147,7 @@ CLEANUP(8)                                                          CLEANUP(8)
               does not arrive via the Postfix <a href="smtpd.8.html"><b>smtpd</b>(8)</a> server.
 
        <b><a href="postconf.5.html#milter_protocol">milter_protocol</a> (6)</b>
-              The mail filter protocol version and  optional  protocol  exten-
+              The mail filter protocol version and  optional  protocol  exten
               sions  for  communication  with  a  Milter application; prior to
               Postfix 2.6 the default protocol is 2.
 
@@ -156,14 +156,14 @@ CLEANUP(8)                                                          CLEANUP(8)
               unavailable or mis-configured.
 
        <b><a href="postconf.5.html#milter_macro_daemon_name">milter_macro_daemon_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
-              The  {daemon_name} macro value for Milter (mail filter) applica-
+              The  {daemon_name} macro value for Milter (mail filter) applica
               tions.
 
        <b><a href="postconf.5.html#milter_macro_v">milter_macro_v</a> ($<a href="postconf.5.html#mail_name">mail_name</a> $<a href="postconf.5.html#mail_version">mail_version</a>)</b>
               The {v} macro value for Milter (mail filter) applications.
 
        <b><a href="postconf.5.html#milter_connect_timeout">milter_connect_timeout</a> (30s)</b>
-              The time limit for connecting to a Milter (mail filter) applica-
+              The time limit for connecting to a Milter (mail filter) applica
               tion, and for negotiating protocol options.
 
        <b><a href="postconf.5.html#milter_command_timeout">milter_command_timeout</a> (30s)</b>
@@ -233,7 +233,7 @@ CLEANUP(8)                                                          CLEANUP(8)
               Reject mail with 8-bit text in message headers.
 
        <b><a href="postconf.5.html#strict_8bitmime_body">strict_8bitmime_body</a> (no)</b>
-              Reject 8-bit message body text without 8-bit MIME content encod-
+              Reject 8-bit message body text without 8-bit MIME content encod
               ing information.
 
        <b><a href="postconf.5.html#strict_mime_encoding_domain">strict_mime_encoding_domain</a> (no)</b>
@@ -243,7 +243,7 @@ CLEANUP(8)                                                          CLEANUP(8)
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#detect_8bit_encoding_header">detect_8bit_encoding_header</a> (yes)</b>
-              Automatically  detect  8BITMIME  body content by looking at Con-
+              Automatically  detect  8BITMIME  body content by looking at Con
               tent-Transfer-Encoding:  message  headers;  historically,   this
               behavior was hard-coded to be "always on".
 
@@ -293,8 +293,8 @@ CLEANUP(8)                                                          CLEANUP(8)
 
        <b><a href="postconf.5.html#masquerade_exceptions">masquerade_exceptions</a> (empty)</b>
               Optional list of user names that are not  subjected  to  address
-              masquerading,   even   when   their  address  matches  $<a href="postconf.5.html#masquerade_domains">masquer</a>-
-              <a href="postconf.5.html#masquerade_domains">ade_domains</a>.
+              masquerading,   even   when   their  address  matches  $masquer‐
+              ade_domains.
 
        <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a> (canonical, virtual)</b>
               What address lookup tables copy an address  extension  from  the
@@ -325,7 +325,7 @@ CLEANUP(8)                                                          CLEANUP(8)
               mapping.
 
        <b><a href="postconf.5.html#sender_canonical_classes">sender_canonical_classes</a> (envelope_sender, header_sender)</b>
-              What addresses are subject to <a href="postconf.5.html#sender_canonical_maps">sender_canonical_maps</a> address map-
+              What addresses are subject to <a href="postconf.5.html#sender_canonical_maps">sender_canonical_maps</a> address map
               ping.
 
        <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a> (empty)</b>
@@ -335,7 +335,7 @@ CLEANUP(8)                                                          CLEANUP(8)
 
 <b>RESOURCE AND RATE CONTROLS</b>
        <b><a href="postconf.5.html#duplicate_filter_limit">duplicate_filter_limit</a> (1000)</b>
-              The maximal number of addresses remembered by the address dupli-
+              The maximal number of addresses remembered by the address dupli
               cate filter for <a href="aliases.5.html"><b>aliases</b>(5)</a> or <a href="virtual.5.html"><b>virtual</b>(5)</a> alias expansion, or for
               <a href="showq.8.html"><b>showq</b>(8)</a> queue displays.
 
@@ -382,7 +382,7 @@ CLEANUP(8)                                                          CLEANUP(8)
 
 <b>MISCELLANEOUS CONTROLS</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>
@@ -390,7 +390,7 @@ CLEANUP(8)                                                          CLEANUP(8)
               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 sub-second delay values.
 
        <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a> (0h)</b>
@@ -434,7 +434,7 @@ CLEANUP(8)                                                          CLEANUP(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              syslog records, so that "smtpd"  becomes,  for  example,  "post
               fix/smtpd".
 
        Available in Postfix version 2.1 and later:
index 8d7d38f08b34922ebe4a252570a5ae183ea51235..13264ac9858d0b9ee28ff24e3aa1c20c1c31193b 100644 (file)
@@ -13,7 +13,7 @@ BOUNCE(8)                                                            BOUNCE(8)
        <b>bounce</b> [generic Postfix daemon options]
 
 <b>DESCRIPTION</b>
-       The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon maintains per-message log files with delivery sta-
+       The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon maintains per-message log files with delivery sta
        tus information. Each log file is named after the queue  file  that  it
        corresponds  to,  and  is  kept in a queue subdirectory named after the
        service name in the <a href="master.5.html"><b>master.cf</b></a> file (either  <b>bounce</b>,  <b>defer</b>  or  <b>trace</b>).
@@ -21,15 +21,15 @@ BOUNCE(8)                                                            BOUNCE(8)
 
        The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon processes two types of service requests:
 
-       <b>o</b>      Append a recipient (non-)delivery status record to a per-message
+       ·      Append a recipient (non-)delivery status record to a per-message
               log file.
 
-       <b>o</b>      Enqueue a delivery status notification message, with a copy of a
+       ·      Enqueue a delivery status notification message, with a copy of a
               per-message log file and of the corresponding message.  When the
               delivery status notification message is  enqueued  successfully,
               the per-message log file is deleted.
 
-       The  software does a best notification effort. A non-delivery notifica-
+       The  software does a best notification effort. A non-delivery notifica
        tion is sent even when the log file or the original message  cannot  be
        read.
 
@@ -46,6 +46,9 @@ BOUNCE(8)                                                            BOUNCE(8)
        <a href="http://tools.ietf.org/html/rfc3464">RFC 3464</a> (Delivery Status Notifications)
        <a href="http://tools.ietf.org/html/rfc3834">RFC 3834</a> (Auto-Submitted: message header)
        <a href="http://tools.ietf.org/html/rfc5322">RFC 5322</a> (Internet Message Format)
+       <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a> (Internationalized SMTP)
+       <a href="http://tools.ietf.org/html/rfc6532">RFC 6532</a> (Internationalized Message Format)
+       <a href="http://tools.ietf.org/html/rfc6533">RFC 6533</a> (Internationalized Delivery Status Notifications)
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).
@@ -67,8 +70,8 @@ BOUNCE(8)                                                            BOUNCE(8)
               Postfix versions before 2.0.
 
        <b><a href="postconf.5.html#bounce_notice_recipient">bounce_notice_recipient</a> (postmaster)</b>
-              The recipient of postmaster notifications with the message head-
-              ers of mail that Postfix did not deliver and of  SMTP  conversa-
+              The recipient of postmaster notifications with the message head
+              ers of mail that Postfix did not deliver and of  SMTP  conversa
               tion transcripts of mail that Postfix did not receive.
 
        <b><a href="postconf.5.html#bounce_size_limit">bounce_size_limit</a> (50000)</b>
@@ -79,7 +82,7 @@ BOUNCE(8)                                                            BOUNCE(8)
               Pathname of a configuration file with bounce message  templates.
 
        <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>
@@ -87,7 +90,7 @@ BOUNCE(8)                                                            BOUNCE(8)
               request before it is terminated by a built-in watchdog timer.
 
        <b><a href="postconf.5.html#delay_notice_recipient">delay_notice_recipient</a> (postmaster)</b>
-              The recipient of postmaster notifications with the message head-
+              The recipient of postmaster notifications with the message head
               ers of mail that cannot be delivered within  $<a href="postconf.5.html#delay_warning_time">delay_warning_time</a>
               time units.
 
@@ -137,9 +140,15 @@ BOUNCE(8)                                                            BOUNCE(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The mail system name that is prepended to the  process  name  in
-              syslog  records,  so  that  "smtpd" becomes, for example, "post-
+              syslog  records,  so  that  "smtpd" becomes, for example, "post
               fix/smtpd".
 
+       Available in Postfix 2.12 and later:
+
+       <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‐
+              fied mail origin classes.
+
 <b>FILES</b>
        /var/spool/postfix/bounce/* non-delivery records
        /var/spool/postfix/defer/* non-delivery records
index 6a85843d1fda4c3e1f7559ddd6198547158ffcc5..b05dc45cd8225a9a8627efbd09b60cee03f3429c 100644 (file)
@@ -14,7 +14,7 @@ SMTP(8)                                                                SMTP(8)
 
 <b>DESCRIPTION</b>
        The Postfix SMTP+LMTP client implements the SMTP and LMTP mail delivery
-       protocols. It processes message delivery requests from the  queue  man-
+       protocols. It processes message delivery requests from the  queue  man
        ager.  Each  request specifies a queue file, a sender address, a domain
        or host to deliver to, and recipient information.  This program expects
        to be run from the <a href="master.8.html"><b>master</b>(8)</a> process manager.
@@ -46,7 +46,7 @@ SMTP(8)                                                                SMTP(8)
        <i>domainname</i>
 
        <i>domainname</i>:<i>port</i>
-              Look up the mail exchangers for the specified domain,  and  con-
+              Look up the mail exchangers for the specified domain,  and  con
               nect to the specified port (default: <b>smtp</b>).
 
        [<i>hostname</i>]
@@ -59,7 +59,7 @@ SMTP(8)                                                                SMTP(8)
 
        [<i>address</i>]:<i>port</i>
               Connect to the host at the specified address, and connect to the
-              specified  port (default: <b>smtp</b>). An IPv6 address must be format-
+              specified  port (default: <b>smtp</b>). An IPv6 address must be format
               ted as [<b>ipv6</b>:<i>address</i>].
 
 <b>LMTP DESTINATION SYNTAX</b>
@@ -107,13 +107,15 @@ SMTP(8)                                                                SMTP(8)
        <a href="http://tools.ietf.org/html/rfc3463">RFC 3463</a> (Enhanced Status Codes)
        <a href="http://tools.ietf.org/html/rfc4954">RFC 4954</a> (AUTH command)
        <a href="http://tools.ietf.org/html/rfc5321">RFC 5321</a> (SMTP protocol)
+       <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a> (Internationalized SMTP)
+       <a href="http://tools.ietf.org/html/rfc6533">RFC 6533</a> (Internationalized Delivery Status Notifications)
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).  Corrupted  message
        files are marked so that the queue manager can move them to the <b>corrupt</b>
        queue for further inspection.
 
-       Depending on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the  postmas-
+       Depending on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the  postmas
        ter is notified of bounces, protocol problems, and of other trouble.
 
 <b>BUGS</b>
@@ -131,7 +133,7 @@ SMTP(8)                                                                SMTP(8)
        there  is  no  support  for TLS, and connections are cached in-process,
        making it ineffective when the client is used for multiple domains.
 
-       Most smtp_<i>xxx</i> configuration parameters have an lmtp_<i>xxx</i> "mirror" param-
+       Most smtp_<i>xxx</i> configuration parameters have an lmtp_<i>xxx</i> "mirror" param
        eter  for  the  equivalent  LMTP  feature. This document describes only
        those LMTP-related parameters that aren't simply "mirror" parameters.
 
@@ -242,7 +244,7 @@ SMTP(8)                                                                SMTP(8)
        <b><a href="postconf.5.html#send_cyrus_sasl_authzid">send_cyrus_sasl_authzid</a> (no)</b>
               When authenticating to a remote SMTP or  LMTP  server  with  the
               default  setting  "no", send no SASL authoriZation ID (authzid);
-              send only the SASL authentiCation ID (authcid)  plus  the  auth-
+              send only the SASL authentiCation ID (authcid)  plus  the  auth
               cid's password.
 
        Available in Postfix version 2.5 and later:
@@ -264,7 +266,7 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.6 and later:
 
        <b><a href="postconf.5.html#tcp_windowsize">tcp_windowsize</a> (0)</b>
-              An optional workaround for routers that break TCP  window  scal-
+              An optional workaround for routers that break TCP  window  scal
               ing.
 
        Available in Postfix version 2.8 and later:
@@ -278,7 +280,7 @@ SMTP(8)                                                                SMTP(8)
               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-
+              response line, SMTP message content line, or TLS  protocol  mes
               sage).
 
        <b><a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a> (no)</b>
@@ -294,7 +296,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_delivery_status_filter">smtp_delivery_status_filter</a> ($<a href="postconf.5.html#default_delivery_status_filter">default_delivery_status_filter</a>)</b>
               Optional filter for the <a href="smtp.8.html"><b>smtp</b>(8)</a> delivery  agent  to  change  the
-              delivery status code or explanatory text of successful or unsuc-
+              delivery status code or explanatory text of successful or unsuc
               cessful deliveries.
 
 <b>MIME PROCESSING CONTROLS</b>
@@ -321,13 +323,13 @@ SMTP(8)                                                                SMTP(8)
               Enable SASL authentication in the Postfix SMTP client.
 
        <b><a href="postconf.5.html#smtp_sasl_password_maps">smtp_sasl_password_maps</a> (empty)</b>
-              Optional Postfix  SMTP  client  lookup  tables  with  one  user-
+              Optional Postfix  SMTP  client  lookup  tables  with  one  user
               name:password  entry  per  remote  hostname or domain, or sender
               address when sender-dependent authentication is enabled.
 
        <b><a href="postconf.5.html#smtp_sasl_security_options">smtp_sasl_security_options</a> (noplaintext, noanonymous)</b>
               Postfix SMTP client SASL security options; as of Postfix 2.3 the
-              list  of available features depends on the SASL client implemen-
+              list  of available features depends on the SASL client implemen
               tation that is selected with <b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a></b>.
 
        Available in Postfix version 2.2 and later:
@@ -341,7 +343,7 @@ SMTP(8)                                                                SMTP(8)
        <b><a href="postconf.5.html#smtp_sender_dependent_authentication">smtp_sender_dependent_authentication</a> (no)</b>
               Enable  sender-dependent  authentication  in  the  Postfix  SMTP
               client; this is available only  with  SASL  authentication,  and
-              disables  SMTP  connection caching to ensure that mail from dif-
+              disables  SMTP  connection caching to ensure that mail from dif
               ferent senders will use the appropriate credentials.
 
        <b><a href="postconf.5.html#smtp_sasl_path">smtp_sasl_path</a> (empty)</b>
@@ -356,7 +358,7 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#smtp_sasl_auth_cache_name">smtp_sasl_auth_cache_name</a> (empty)</b>
-              An  optional table to prevent repeated SASL authentication fail-
+              An  optional table to prevent repeated SASL authentication fail
               ures with the same remote SMTP  server  hostname,  username  and
               password.
 
@@ -395,7 +397,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_tls_CAfile">smtp_tls_CAfile</a> (empty)</b>
               A  file  containing  CA certificates of root CAs trusted to sign
-              either remote SMTP server certificates or intermediate  CA  cer-
+              either remote SMTP server certificates or intermediate  CA  cer
               tificates.
 
        <b><a href="postconf.5.html#smtp_tls_CApath">smtp_tls_CApath</a> (empty)</b>
@@ -416,7 +418,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_tls_mandatory_exclude_ciphers">smtp_tls_mandatory_exclude_ciphers</a> (empty)</b>
               Additional list of ciphers or cipher types to exclude  from  the
-              Postfix  SMTP  client cipher list at mandatory TLS security lev-
+              Postfix  SMTP  client cipher list at mandatory TLS security lev
               els.
 
        <b><a href="postconf.5.html#smtp_tls_dcert_file">smtp_tls_dcert_file</a> (empty)</b>
@@ -437,7 +439,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_tls_policy_maps">smtp_tls_policy_maps</a> (empty)</b>
               Optional lookup tables with the Postfix SMTP client TLS security
-              policy by next-hop destination; when a non-empty value is speci-
+              policy by next-hop destination; when a non-empty value is speci
               fied, this overrides the obsolete <a href="postconf.5.html#smtp_tls_per_site">smtp_tls_per_site</a> parameter.
 
        <b><a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> (!SSLv2)</b>
@@ -486,8 +488,8 @@ SMTP(8)                                                                SMTP(8)
 
        Available in Postfix version 2.4 and later:
 
-       <b><a href="postconf.5.html#smtp_sasl_tls_verified_security_options">smtp_sasl_tls_verified_security_options</a>           ($<a href="postconf.5.html#smtp_sasl_tls_security_options">smtp_sasl_tls_secu</a>-</b>
-       <b><a href="postconf.5.html#smtp_sasl_tls_security_options">rity_options</a>)</b>
+       <b><a href="postconf.5.html#smtp_sasl_tls_verified_security_options">smtp_sasl_tls_verified_security_options</a>           ($smtp_sasl_tls_secu</b>‐\b
+       <b>rity_options)</b>
               The SASL authentication security options that the  Postfix  SMTP
               client  uses  for  TLS  encrypted  SMTP sessions with a verified
               server certificate.
@@ -496,8 +498,8 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_tls_fingerprint_cert_match">smtp_tls_fingerprint_cert_match</a> (empty)</b>
               List of acceptable remote SMTP server  certificate  fingerprints
-              for   the   "fingerprint"  TLS  security  level  (<b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_secu</a>-</b>
-              <b><a href="postconf.5.html#smtp_tls_security_level">rity_level</a></b> = fingerprint).
+              for   the   "fingerprint"  TLS  security  level  (<b>smtp_tls_secu</b>‐\b
+              <b>rity_level</b> = fingerprint).
 
        <b><a href="postconf.5.html#smtp_tls_fingerprint_digest">smtp_tls_fingerprint_digest</a> (md5)</b>
               The message digest  algorithm  used  to  construct  remote  SMTP
@@ -514,18 +516,18 @@ SMTP(8)                                                                SMTP(8)
               use with opportunistic TLS encryption.
 
        <b><a href="postconf.5.html#smtp_tls_eccert_file">smtp_tls_eccert_file</a> (empty)</b>
-              File  with the Postfix SMTP client ECDSA certificate in PEM for-
+              File  with the Postfix SMTP client ECDSA certificate in PEM for
               mat.
 
        <b><a href="postconf.5.html#smtp_tls_eckey_file">smtp_tls_eckey_file</a> ($<a href="postconf.5.html#smtp_tls_eccert_file">smtp_tls_eccert_file</a>)</b>
-              File with the Postfix SMTP client ECDSA private key in PEM  for-
+              File with the Postfix SMTP client ECDSA private key in PEM  for
               mat.
 
        Available in Postfix version 2.7 and later:
 
        <b><a href="postconf.5.html#smtp_tls_block_early_mail_reply">smtp_tls_block_early_mail_reply</a> (no)</b>
               Try  to  detect  a mail hijacking attack based on a TLS protocol
-              vulnerability (CVE-2009-3555), where an attacker prepends  mali-
+              vulnerability (CVE-2009-3555), where an attacker prepends  mali
               cious  HELO,  MAIL, RCPT, DATA commands to a Postfix SMTP client
               TLS session.
 
@@ -570,7 +572,7 @@ SMTP(8)                                                                SMTP(8)
 
        <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-
+              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>
@@ -578,17 +580,17 @@ SMTP(8)                                                                SMTP(8)
               cipher list.
 
 <b>RESOURCE AND RATE CONTROLS</b>
-       <b><a href="postconf.5.html#smtp_destination_concurrency_limit">smtp_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>
-              The maximal number of parallel deliveries to the  same  destina-
+       <b><a href="postconf.5.html#smtp_destination_concurrency_limit">smtp_destination_concurrency_limit</a>        ($default_destination_concur</b>‐\b
+       <b>rency_limit)</b>
+              The maximal number of parallel deliveries to the  same  destina
               tion via the smtp message delivery transport.
 
        <b><a href="postconf.5.html#smtp_destination_recipient_limit">smtp_destination_recipient_limit</a> ($<a href="postconf.5.html#default_destination_recipient_limit">default_destination_recipient_limit</a>)</b>
-              The  maximal  number of recipients per message for the smtp mes-
+              The  maximal  number of recipients per message for the smtp mes
               sage delivery transport.
 
        <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>
@@ -601,7 +603,7 @@ SMTP(8)                                                                SMTP(8)
               and for receiving the initial remote LMTP server response.
 
        <b><a href="postconf.5.html#smtp_xforward_timeout">smtp_xforward_timeout</a> (300s)</b>
-              The Postfix SMTP client time limit for sending the XFORWARD com-
+              The Postfix SMTP client time limit for sending the XFORWARD com
               mand, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_mail_timeout">smtp_mail_timeout</a> (300s)</b>
@@ -661,7 +663,7 @@ SMTP(8)                                                                SMTP(8)
               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>
-              The amount of time during which Postfix will use an SMTP connec-
+              The amount of time during which Postfix will use an SMTP connec
               tion repeatedly.
 
        <b><a href="postconf.5.html#smtp_connection_cache_time_limit">smtp_connection_cache_time_limit</a> (2s)</b>
@@ -671,7 +673,7 @@ 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 and later:
@@ -680,7 +682,7 @@ SMTP(8)                                                                SMTP(8)
               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-
+              response  line,  SMTP message content line, or TLS protocol mes
               sage).
 
        Available in Postfix version 2.11 and later:
@@ -690,6 +692,17 @@ SMTP(8)                                                                SMTP(8)
               that  an SMTP session may be reused before it is closed, or zero
               (no limit).
 
+<b>SMTPUTF8 CONTROLS</b>
+       Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+
+       <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (no)</b>
+              Enable experimental SMTPUTF8 support for the protocols described
+              in <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a>..6533.
+
+       <b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
+              Enable  SMTPUTF8  autodetection  for  the  specified mail origin
+              classes.
+
 <b>TROUBLE SHOOTING CONTROLS</b>
        <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
               The increment in verbose logging level when a remote  client  or
@@ -702,7 +715,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
               The  recipient  of  postmaster notifications about mail delivery
-              problems that are caused by policy, resource, software or proto-
+              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>
@@ -719,7 +732,7 @@ SMTP(8)                                                                SMTP(8)
               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>
@@ -727,7 +740,7 @@ SMTP(8)                                                                SMTP(8)
               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 sub-second delay values.
 
        <b><a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> (no)</b>
@@ -747,7 +760,7 @@ SMTP(8)                                                                SMTP(8)
 
        <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-
+              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>
@@ -802,7 +815,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              syslog records, so that "smtpd"  becomes,  for  example,  "post
               fix/smtpd".
 
        Available with Postfix 2.2 and earlier:
index 67245eb16ca53dd4a457e8235b2bf560240a8937..aaa635cef2afefe3e84e1fb52f4c268aee807614 100644 (file)
@@ -19,7 +19,7 @@ LOCAL(8)                                                              LOCAL(8)
        to, and one or more recipients.  This program expects to  be  run  from
        the <a href="master.8.html"><b>master</b>(8)</a> process manager.
 
-       The  <a href="local.8.html"><b>local</b>(8)</a>  daemon  updates queue files and marks recipients as fin-
+       The  <a href="local.8.html"><b>local</b>(8)</a>  daemon  updates queue files and marks recipients as fin
        ished, or it informs the queue manager that delivery  should  be  tried
        again  at  a  later  time.  Delivery  status  reports  are  sent to the
        <a href="bounce.8.html"><b>bounce</b>(8)</a>, <a href="defer.8.html"><b>defer</b>(8)</a> or <a href="trace.8.html"><b>trace</b>(8)</a> daemon as appropriate.
@@ -41,15 +41,15 @@ LOCAL(8)                                                              LOCAL(8)
        Upon delivery, the local delivery agent tries each pathname in the list
        until a file is found.
 
-       Delivery via ~/.<b>forward</b> files is done with the privileges of the recip-
+       Delivery via ~/.<b>forward</b> files is done with the privileges of the recip
        ient.  Thus, ~/.<b>forward</b> like files must be readable by  the  recipient,
        and  their  parent directory needs to have "execute" permission for the
        recipient.
 
-       The <b><a href="postconf.5.html#forward_path">forward_path</a></b> parameter is subject to interpolation of <b>$user</b> (recip-
+       The <b><a href="postconf.5.html#forward_path">forward_path</a></b> parameter is subject to interpolation of <b>$user</b> (recip
        ient  username),  <b>$home</b>  (recipient  home directory), <b>$shell</b> (recipient
        shell), <b>$recipient</b> (complete recipient address), <b>$extension</b>  (recipient
-       address  extension), <b>$domain</b> (recipient domain), <b>$local</b> (entire recipi-
+       address  extension), <b>$domain</b> (recipient domain), <b>$local</b> (entire recipi
        ent   address   localpart)   and   <b>$<a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a>.</b>   The    forms
        <i>${name?value}</i>  and  <i>${name:value}</i>  expand  conditionally  to <i>value</i> when
        <i>$name</i> is (is not) defined.  Characters that may have special meaning to
@@ -57,14 +57,14 @@ LOCAL(8)                                                              LOCAL(8)
        acceptable characters is specified  with  the  <b><a href="postconf.5.html#forward_expansion_filter">forward_expansion_filter</a></b>
        configuration parameter.
 
-       An  alias  or ~/.<b>forward</b> file may list any combination of external com-
+       An  alias  or ~/.<b>forward</b> file may list any combination of external com
        mands, destination file names, <b>:include:</b> directives, or mail addresses.
-       See  <a href="aliases.5.html"><b>aliases</b>(5)</a>  for a precise description. Each line in a user's .<b>for-</b>
+       See  <a href="aliases.5.html"><b>aliases</b>(5)</a>  for a precise description. Each line in a user's .<b>for</b>‐\b
        <b>ward</b> file has the same syntax as the right-hand part of an alias.
 
        When an address is found in its own alias expansion, delivery  is  made
        to the user instead. When a user is listed in the user's own ~/.<b>forward</b>
-       file, delivery is made to the user's mailbox instead.  An empty ~/.<b>for-</b>
+       file, delivery is made to the user's mailbox instead.  An empty ~/.<b>for</b>‐\b
        <b>ward</b> file means do not forward mail.
 
        In  order to prevent the mail system from using up unreasonable amounts
@@ -72,7 +72,7 @@ LOCAL(8)                                                              LOCAL(8)
        are broken up into chunks of length <b><a href="postconf.5.html#line_length_limit">line_length_limit</a></b>.
 
        While  expanding  aliases,  ~/.<b>forward</b>  files,  and  so on, the program
-       attempts to avoid duplicate deliveries. The <b><a href="postconf.5.html#duplicate_filter_limit">duplicate_filter_limit</a></b> con-
+       attempts to avoid duplicate deliveries. The <b><a href="postconf.5.html#duplicate_filter_limit">duplicate_filter_limit</a></b> con
        figuration parameter limits the number of remembered recipients.
 
 <b>MAIL FORWARDING</b>
@@ -98,16 +98,16 @@ LOCAL(8)                                                              LOCAL(8)
 
        Mailbox delivery can be delegated to an external command specified with
        the  <b><a href="postconf.5.html#mailbox_command_maps">mailbox_command_maps</a></b> and <b><a href="postconf.5.html#mailbox_command">mailbox_command</a></b> configuration parameters.
-       The command executes with the privileges of the recipient user  (excep-
+       The command executes with the privileges of the recipient user  (excep
        tions:  secondary  groups are not enabled; in case of delivery as root,
        the command executes with the privileges of <b><a href="postconf.5.html#default_privs">default_privs</a></b>).
 
        Mailbox delivery can be delegated  to  alternative  message  transports
-       specified  in the <a href="master.5.html"><b>master.cf</b></a> file.  The <b><a href="postconf.5.html#mailbox_transport_maps">mailbox_transport_maps</a></b> and <b><a href="postconf.5.html#mailbox_transport">mail</a>-</b>
-       <b><a href="postconf.5.html#mailbox_transport">box_transport</a></b> configuration  parameters  specify  an  optional  message
+       specified  in the <a href="master.5.html"><b>master.cf</b></a> file.  The <b><a href="postconf.5.html#mailbox_transport_maps">mailbox_transport_maps</a></b> and <b>mail</b>‐\b
+       <b>box_transport</b> configuration  parameters  specify  an  optional  message
        transport  that  is  to be used for all local recipients, regardless of
-       whether they  are  found  in  the  UNIX  passwd  database.   The  <b><a href="postconf.5.html#fallback_transport_maps">fall</a>-</b>
-       <b><a href="postconf.5.html#fallback_transport_maps">back_transport_maps</a></b>   and   <b><a href="postconf.5.html#fallback_transport">fallback_transport</a></b>  parameters  specify  an
+       whether they  are  found  in  the  UNIX  passwd  database.   The  <b>fall</b>‐\b
+       <b>back_transport_maps</b>   and   <b><a href="postconf.5.html#fallback_transport">fallback_transport</a></b>  parameters  specify  an
        optional message transport for recipients that are  not  found  in  the
        <a href="aliases.5.html">aliases(5)</a> or UNIX passwd database.
 
@@ -117,7 +117,7 @@ LOCAL(8)                                                              LOCAL(8)
        to Postfix, prepends an optional <b>Delivered-To:</b> header  with  the  final
        envelope  recipient  address,  prepends  a <b>Return-Path:</b> header with the
        envelope sender address, prepends a &gt; character to lines beginning with
-       "<b>From</b>  ",  and appends an empty line.  The mailbox is locked for exclu-
+       "<b>From</b>  ",  and appends an empty line.  The mailbox is locked for exclu
        sive access while delivery is in progress.  In  case  of  problems,  an
        attempt is made to truncate the mailbox to its original length.
 
@@ -129,23 +129,23 @@ LOCAL(8)                                                              LOCAL(8)
 
 <b>EXTERNAL COMMAND DELIVERY</b>
        The  <b><a href="postconf.5.html#allow_mail_to_commands">allow_mail_to_commands</a></b>  configuration parameter restricts delivery
-       to external commands. The default setting (<b>alias, forward</b>) forbids com-
+       to external commands. The default setting (<b>alias, forward</b>) forbids com
        mand destinations in <b>:include:</b> files.
 
-       Optionally, the process working directory is changed to the path speci-
+       Optionally, the process working directory is changed to the path speci
        fied with <b><a href="postconf.5.html#command_execution_directory">command_execution_directory</a></b> (Postfix 2.2 and later).  Failure
        to change directory causes mail to be deferred.
 
-       The  <b><a href="postconf.5.html#command_execution_directory">command_execution_directory</a></b> parameter value is subject to interpo-
+       The  <b><a href="postconf.5.html#command_execution_directory">command_execution_directory</a></b> parameter value is subject to interpo
        lation of <b>$user</b> (recipient username), <b>$home</b> (recipient home directory),
        <b>$shell</b>  (recipient  shell),  <b>$recipient</b>  (complete  recipient address),
        <b>$extension</b> (recipient address extension), <b>$domain</b>  (recipient  domain),
        <b>$local</b>  (entire  recipient address localpart) and <b>$<a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a>.</b>
        The forms <i>${name?value}</i> and <i>${name:value}</i> expand conditionally to <i>value</i>
-       when <i>$name</i> is (is not) defined.  Characters that may have special mean-
+       when <i>$name</i> is (is not) defined.  Characters that may have special mean
        ing to the shell or file system are replaced by underscores.  The  list
-       of   acceptable  characters  is  specified  with  the  <b><a href="postconf.5.html#execution_directory_expansion_filter">execution_direc</a>-</b>
-       <b><a href="postconf.5.html#execution_directory_expansion_filter">tory_expansion_filter</a></b> configuration parameter.
+       of   acceptable  characters  is  specified  with  the  <b>execution_direc</b>‐\b
+       <b>tory_expansion_filter</b> configuration parameter.
 
        The command is executed directly  where  possible.  Assistance  by  the
        shell  (<b>/bin/sh</b> on UNIX systems) is used only when the command contains
@@ -154,7 +154,7 @@ LOCAL(8)                                                              LOCAL(8)
 
        A limited amount of command output (standard output and standard error)
        is captured for inclusion with non-delivery status reports.  A  command
-       is   forcibly   terminated   if   it  does  not  complete  within  <b>com-</b>
+       is   forcibly   terminated   if   it  does  not  complete  within  <b>com</b>‐\b
        <b>mand_time_limit</b> seconds.  Command exit status  codes  are  expected  to
        follow  the  conventions  defined in &lt;<b>sysexits.h</b>&gt;.  Exit status 0 means
        normal successful completion.
@@ -164,9 +164,9 @@ LOCAL(8)                                                              LOCAL(8)
        command output begins with an enhanced status code,  this  status  code
        takes precedence over the non-zero exit status.
 
-       A  limited  amount of message context is exported via environment vari-
+       A  limited  amount of message context is exported via environment vari
        ables. Characters that may  have  special  meaning  to  the  shell  are
-       replaced  by  underscores.  The list of acceptable characters is speci-
+       replaced  by  underscores.  The list of acceptable characters is speci
        fied with the <b><a href="postconf.5.html#command_expansion_filter">command_expansion_filter</a></b> configuration parameter.
 
        <b>SHELL</b>  The recipient user's login shell.
@@ -195,7 +195,7 @@ LOCAL(8)                                                              LOCAL(8)
 
        <b>SENDER</b> The entire sender address.
 
-       Additional remote client information is made available via the  follow-
+       Additional remote client information is made available via the  follow
        ing environment variables:
 
        <b>CLIENT_ADDRESS</b>
@@ -241,7 +241,7 @@ LOCAL(8)                                                              LOCAL(8)
        <b>/</b> for <b>qmail</b>-compatible <b>maildir</b> delivery.
 
        The  <b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a></b>  configuration parameter restricts delivery to
-       external files. The default setting (<b>alias, forward</b>) forbids file  des-
+       external files. The default setting (<b>alias, forward</b>) forbids file  des
        tinations in <b>:include:</b> files.
 
        In  the  case  of  UNIX-style  mailbox  delivery,  the  <a href="local.8.html"><b>local</b>(8)</a> daemon
@@ -266,7 +266,7 @@ LOCAL(8)                                                              LOCAL(8)
        to separate address extensions from local recipient names.
 
        For  example,  with  "<b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a>  =  +</b>",  mail for <i>name</i>+<i>foo</i> is
-       delivered to the alias <i>name</i>+<i>foo</i> or to the alias <i>name</i>, to  the  destina-
+       delivered to the alias <i>name</i>+<i>foo</i> or to the alias <i>name</i>, to  the  destina
        tions listed in ~<i>name</i>/.<b>forward</b>+<i>foo</i> or in ~<i>name</i>/.<b>forward</b>, to the mailbox
        owned by the user <i>name</i>, or it is sent back as undeliverable.
 
@@ -287,13 +287,13 @@ LOCAL(8)                                                              LOCAL(8)
        files are marked so that the queue manager can move them to the <b>corrupt</b>
        queue afterwards.
 
-       Depending  on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the postmas-
+       Depending  on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the postmas
        ter is notified of bounces and of other trouble.
 
 <b>SECURITY</b>
        The <a href="local.8.html"><b>local</b>(8)</a> delivery agent needs a dual personality 1) to  access  the
-       private Postfix queue and IPC mechanisms, 2) to impersonate the recipi-
-       ent and deliver to recipient-specified files or commands. It is  there-
+       private Postfix queue and IPC mechanisms, 2) to impersonate the recipi
+       ent and deliver to recipient-specified files or commands. It is  there
        fore security sensitive.
 
        The  <a href="local.8.html"><b>local</b>(8)</a>  delivery agent disallows regular expression substitution
@@ -307,11 +307,11 @@ LOCAL(8)                                                              LOCAL(8)
 <b>BUGS</b>
        For  security reasons, the message delivery status of external commands
        or of external files is never checkpointed to file. As  a  result,  the
-       program  may occasionally deliver more than once to a command or exter-
+       program  may occasionally deliver more than once to a command or exter
        nal file. Better safe than sorry.
 
        Mutually-recursive aliases or ~/.<b>forward</b> files are not detected  early.
-       The  resulting  mail forwarding loop is broken by the use of the <b>Deliv-</b>
+       The  resulting  mail forwarding loop is broken by the use of the <b>Deliv</b>‐\b
        <b>ered-To:</b> message header.
 
 <b>CONFIGURATION PARAMETERS</b>
@@ -333,8 +333,8 @@ LOCAL(8)                                                              LOCAL(8)
 
        <b><a href="postconf.5.html#owner_request_special">owner_request_special</a> (yes)</b>
               Give  special  treatment  to owner-listname and listname-request
-              address localparts: don't split such addresses when the  <a href="postconf.5.html#recipient_delimiter">recipi</a>-
-              <a href="postconf.5.html#recipient_delimiter">ent_delimiter</a> is set to "-".
+              address localparts: don't split such addresses when the  recipi‐
+              ent_delimiter is set to "-".
 
        <b><a href="postconf.5.html#sun_mailtool_compatibility">sun_mailtool_compatibility</a> (no)</b>
               Obsolete SUN mailtool compatibility feature.
@@ -350,7 +350,7 @@ LOCAL(8)                                                              LOCAL(8)
        Available in Postfix version 2.5.3 and later:
 
        <b><a href="postconf.5.html#strict_mailbox_ownership">strict_mailbox_ownership</a> (yes)</b>
-              Defer delivery when a mailbox file is not owned by  its  recipi-
+              Defer delivery when a mailbox file is not owned by  its  recipi
               ent.
 
        <b><a href="postconf.5.html#reset_owner_alias">reset_owner_alias</a> (no)</b>
@@ -368,8 +368,8 @@ LOCAL(8)                                                              LOCAL(8)
 <b>DELIVERY METHOD CONTROLS</b>
        The  precedence  of  <a href="local.8.html"><b>local</b>(8)</a>  delivery  methods  from  high to low is:
        aliases,  .forward  files,  <a href="postconf.5.html#mailbox_transport_maps">mailbox_transport_maps</a>,  <a href="postconf.5.html#mailbox_transport">mailbox_transport</a>,
-       <a href="postconf.5.html#mailbox_command_maps">mailbox_command_maps</a>,  <a href="postconf.5.html#mailbox_command">mailbox_command</a>, <a href="postconf.5.html#home_mailbox">home_mailbox</a>, <a href="postconf.5.html#mail_spool_directory">mail_spool_direc</a>-
-       <a href="postconf.5.html#mail_spool_directory">tory</a>, <a href="postconf.5.html#fallback_transport_maps">fallback_transport_maps</a>, <a href="postconf.5.html#fallback_transport">fallback_transport</a>, and <a href="postconf.5.html#luser_relay">luser_relay</a>.
+       <a href="postconf.5.html#mailbox_command_maps">mailbox_command_maps</a>,  <a href="postconf.5.html#mailbox_command">mailbox_command</a>, <a href="postconf.5.html#home_mailbox">home_mailbox</a>, mail_spool_direc‐
+       tory, <a href="postconf.5.html#fallback_transport_maps">fallback_transport_maps</a>, <a href="postconf.5.html#fallback_transport">fallback_transport</a>, and <a href="postconf.5.html#luser_relay">luser_relay</a>.
 
        <b><a href="postconf.5.html#alias_maps">alias_maps</a> (see 'postconf -d' output)</b>
               The alias databases that are used for <a href="local.8.html"><b>local</b>(8)</a> delivery.
@@ -444,16 +444,16 @@ LOCAL(8)                                                              LOCAL(8)
               Time limit for delivery to external commands.
 
        <b><a href="postconf.5.html#duplicate_filter_limit">duplicate_filter_limit</a> (1000)</b>
-              The maximal number of addresses remembered by the address dupli-
+              The maximal number of addresses remembered by the address dupli
               cate filter for <a href="aliases.5.html"><b>aliases</b>(5)</a> or <a href="virtual.5.html"><b>virtual</b>(5)</a> alias expansion, or for
               <a href="showq.8.html"><b>showq</b>(8)</a> queue displays.
 
        <b><a href="postconf.5.html#local_destination_concurrency_limit">local_destination_concurrency_limit</a> (2)</b>
               The maximal number of parallel deliveries  via  the  local  mail
-              delivery  transport  to the same recipient (when "<a href="postconf.5.html#local_destination_recipient_limit">local_destina</a>-
-              <a href="postconf.5.html#local_destination_recipient_limit">tion_recipient_limit</a> = 1") or the  maximal  number  of  parallel
-              deliveries  to  the  same  local  domain  (when  "<a href="postconf.5.html#local_destination_recipient_limit">local_destina</a>-
-              <a href="postconf.5.html#local_destination_recipient_limit">tion_recipient_limit</a> &gt; 1").
+              delivery  transport  to the same recipient (when "local_destina‐
+              tion_recipient_limit = 1") or the  maximal  number  of  parallel
+              deliveries  to  the  same  local  domain  (when  "local_destina‐
+              tion_recipient_limit &gt; 1").
 
        <b><a href="postconf.5.html#local_destination_recipient_limit">local_destination_recipient_limit</a> (1)</b>
               The maximal number of recipients per message  delivery  via  the
@@ -472,8 +472,8 @@ LOCAL(8)                                                              LOCAL(8)
 
        <b><a href="postconf.5.html#command_expansion_filter">command_expansion_filter</a> (see 'postconf -d' output)</b>
               Restrict the characters that the <a href="local.8.html"><b>local</b>(8)</a> delivery agent  allows
-              in  $name  expansions  of  $<a href="postconf.5.html#mailbox_command">mailbox_command</a>  and $<a href="postconf.5.html#command_execution_directory">command_execu</a>-
-              <a href="postconf.5.html#command_execution_directory">tion_directory</a>.
+              in  $name  expansions  of  $<a href="postconf.5.html#mailbox_command">mailbox_command</a>  and $command_execu‐
+              tion_directory.
 
        <b><a href="postconf.5.html#default_privs">default_privs</a> (nobody)</b>
               The default rights used  by  the  <a href="local.8.html"><b>local</b>(8)</a>  delivery  agent  for
@@ -492,12 +492,12 @@ LOCAL(8)                                                              LOCAL(8)
        Available in Postfix version 2.5.3 and later:
 
        <b><a href="postconf.5.html#strict_mailbox_ownership">strict_mailbox_ownership</a> (yes)</b>
-              Defer  delivery  when a mailbox file is not owned by its recipi-
+              Defer  delivery  when a mailbox file is not owned by its recipi
               ent.
 
 <b>MISCELLANEOUS CONTROLS</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>
@@ -505,7 +505,7 @@ LOCAL(8)                                                              LOCAL(8)
               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 sub-second delay values.
 
        <b><a href="postconf.5.html#export_environment">export_environment</a> (see 'postconf -d' output)</b>
@@ -517,7 +517,7 @@ LOCAL(8)                                                              LOCAL(8)
               internal communication channel.
 
        <b><a href="postconf.5.html#local_command_shell">local_command_shell</a> (empty)</b>
-              Optional shell program for <a href="local.8.html"><b>local</b>(8)</a> delivery to non-Postfix com-
+              Optional shell program for <a href="local.8.html"><b>local</b>(8)</a> delivery to non-Postfix com
               mand.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
@@ -529,7 +529,7 @@ LOCAL(8)                                                              LOCAL(8)
               process will service before terminating voluntarily.
 
        <b><a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a> (command, file, forward)</b>
-              The  message delivery contexts where the Postfix <a href="local.8.html"><b>local</b>(8)</a> deliv-
+              The  message delivery contexts where the Postfix <a href="local.8.html"><b>local</b>(8)</a> deliv
               ery agent prepends a  Delivered-To:   message  header  with  the
               address that the mail was delivered to.
 
@@ -560,7 +560,7 @@ LOCAL(8)                                                              LOCAL(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              syslog records, so that "smtpd"  becomes,  for  example,  "post
               fix/smtpd".
 
 <b>FILES</b>
index 5a535363dea9c69a1046229534821138eaafd324..bd2ea89bd59787c4ad238b939515a55e7ebdb275 100644 (file)
@@ -19,7 +19,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>sendmail -I</b>
 
 <b>DESCRIPTION</b>
-       The Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command implements the Postfix to Sendmail com-
+       The Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command implements the Postfix to Sendmail com
        patibility interface.  For the  sake  of  compatibility  with  existing
        applications,  some  Sendmail  command-line  options are recognized but
        silently ignored.
@@ -29,7 +29,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        arranges for delivery.  Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> relies on  the  <a href="postdrop.1.html"><b>postdrop</b>(1)</a>
        command to create a queue file in the <b>maildrop</b> directory.
 
-       Specific  command aliases are provided for other common modes of opera-
+       Specific  command aliases are provided for other common modes of opera
        tion:
 
        <b>mailq</b>  List the mail queue. Each entry shows the queue file ID, message
@@ -41,7 +41,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               <b>*</b>      The message is in the <b>active</b> queue, i.e. the  message  is
                      selected for delivery.
 
-              <b>!</b>      The  message is in the <b>hold</b> queue, i.e. no further deliv-
+              <b>!</b>      The  message is in the <b>hold</b> queue, i.e. no further deliv
                      ery attempt will be made until  the  mail  is  taken  off
                      hold.
 
@@ -51,7 +51,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>newaliases</b>
               Initialize the alias database.  If no input  file  is  specified
               (with  the  <b>-oA</b>  option,  see  below), the program processes the
-              file(s) specified with the <b><a href="postconf.5.html#alias_database">alias_database</a></b> configuration  parame-
+              file(s) specified with the <b><a href="postconf.5.html#alias_database">alias_database</a></b> configuration  parame
               ter.   If  no alias database type is specified, the program uses
               the type specified with the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b>  configuration
               parameter.  This mode of operation is implemented by running the
@@ -87,7 +87,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>-bi</b>    Initialize alias database. See the <b>newaliases</b> command above.
 
        <b>-bl</b>    Go into daemon mode. To accept only local  connections  as  with
-              Sendmail's  <b>-bl</b>  option, specify "<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback</b>" in
+              Sendmail´s  <b>-bl</b>  option, specify "<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback</b>" in
               the Postfix <a href="postconf.5.html"><b>main.cf</b></a> configuration file.
 
        <b>-bm</b>    Read mail from standard input and arrange for delivery.  This is
@@ -118,12 +118,12 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               before 2.3.
 
               With all Postfix versions, you can specify a directory  pathname
-              with  the MAIL_CONFIG environment variable to override the loca-
+              with  the MAIL_CONFIG environment variable to override the loca
               tion of configuration files.
 
        <b>-F</b> <i>full</i><b>_</b><i>name</i>
               Set the sender full name. This overrides  the  NAME  environment
-              variable, and is used only with messages that have no <b>From:</b> mes-
+              variable, and is used only with messages that have no <b>From:</b> mes
               sage header.
 
        <b>-f</b> <i>sender</i>
@@ -132,8 +132,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               the  <b>Errors-To:</b>  message  header  overrides  the  error   return
               address.
 
-       <b>-G</b>     Gateway  (relay)  submission, as opposed to initial user submis-
-              sion.  Either do not rewrite addresses at all, or update  incom-
+       <b>-G</b>     Gateway  (relay)  submission, as opposed to initial user submis
+              sion.  Either do not rewrite addresses at all, or update  incom
               plete  addresses  with  the  domain  information  specified with
               <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a></b>.
 
@@ -145,7 +145,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b>-I</b>     Initialize alias database. See the <b>newaliases</b> command above.
 
-       <b>-i</b>     When  reading  a message from standard input, don't treat a line
+       <b>-i</b>     When  reading  a message from standard input, don´t treat a line
               with only a <b>.</b> character as the end of input.
 
        <b>-L</b> <i>label</i> (ignored)
@@ -179,17 +179,17 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>-o7</b> (ignored)
 
        <b>-o8</b> (ignored)
-              To send 8-bit or binary content, use an appropriate MIME  encap-
+              To send 8-bit or binary content, use an appropriate MIME  encap
               sulation and specify the appropriate <b>-B</b> command-line option.
 
-       <b>-oi</b>    When  reading  a message from standard input, don't treat a line
+       <b>-oi</b>    When  reading  a message from standard input, don´t treat a line
               with only a <b>.</b> character as the end of input.
 
        <b>-om</b> (ignored)
               The sender is never eliminated from alias etc. expansions.
 
        <b>-o</b> <i>x value</i> (ignored)
-              Set option <i>x</i> to <i>value</i>. Use the equivalent configuration  parame-
+              Set option <i>x</i> to <i>value</i>. Use the equivalent configuration  parame
               ter in <a href="postconf.5.html"><b>main.cf</b></a> instead.
 
        <b>-r</b> <i>sender</i>
@@ -209,25 +209,25 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
               This option is ignored before Postfix version 2.10.
 
-       <b>-q</b>     Attempt to deliver all queued mail. This is implemented by  exe-
+       <b>-q</b>     Attempt to deliver all queued mail. This is implemented by  exe
               cuting the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command.
 
               Warning:  flushing  undeliverable mail frequently will result in
               poor delivery performance of all other mail.
 
        <b>-q</b><i>interval</i> (ignored)
-              The interval between queue runs. Use the <b><a href="postconf.5.html#queue_run_delay">queue_run_delay</a></b> config-
+              The interval between queue runs. Use the <b><a href="postconf.5.html#queue_run_delay">queue_run_delay</a></b> config
               uration parameter instead.
 
        <b>-qI</b><i>queueid</i>
               Schedule immediate delivery of mail with the specified queue ID.
-              This option is implemented by executing  the  <a href="postqueue.1.html"><b>postqueue</b>(1)</a>  com-
+              This option is implemented by executing  the  <a href="postqueue.1.html"><b>postqueue</b>(1)</a>  com
               mand, and is available with Postfix version 2.4 and later.
 
        <b>-qR</b><i>site</i>
               Schedule  immediate  delivery of all mail that is queued for the
-              named <i>site</i>. This option accepts only <i>site</i> names that are  eligi-
-              ble  for the "fast flush" service, and is implemented by execut-
+              named <i>site</i>. This option accepts only <i>site</i> names that are  eligi
+              ble  for the "fast flush" service, and is implemented by execut
               ing the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command.  See <a href="flush.8.html"><b>flush</b>(8)</a> for more information
               about the "fast flush" service.
 
@@ -262,12 +262,12 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b>-XV</b><i>xy</i> (Postfix 2.2 and earlier: <b>-V</b><i>xy</i>)
               As <b>-XV</b>, but uses <i>x</i> and  <i>y</i>  as  the  VERP  delimiter  characters,
-              instead of the characters specified with the <b><a href="postconf.5.html#default_verp_delimiters">default_verp_delim</a>-</b>
-              <b><a href="postconf.5.html#default_verp_delimiters">iters</a></b> configuration parameter.
+              instead of the characters specified with the <b>default_verp_delim</b>‐\b
+              <b>iters</b> configuration parameter.
 
-       <b>-v</b>     Send an email report of the first delivery attempt (Postfix ver-
-              sions  2.1 and later). Mail delivery always happens in the back-
-              ground. When multiple <b>-v</b> options are given, enable verbose  log-
+       <b>-v</b>     Send an email report of the first delivery attempt (Postfix ver
+              sions  2.1 and later). Mail delivery always happens in the back
+              ground. When multiple <b>-v</b> options are given, enable verbose  log
               ging for debugging purposes.
 
        <b>-X</b> <i>log</i><b>_</b><i>file</i> (ignored)
@@ -297,9 +297,9 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               no <b>From:</b> message header. See also the <b>-F</b> option above.
 
 <b>CONFIGURATION PARAMETERS</b>
-       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro-
-       gram.   The  text  below  provides  only a parameter summary. See <a href="postconf.5.html"><b>post-</b></a>
-       <a href="postconf.5.html"><b>conf</b>(5)</a> for more details including examples.
+       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro
+       gram.   The  text  below  provides  only a parameter summary. See <b>post</b>‐\b
+       <b>conf</b>(5) for more details including examples.
 
 <b>COMPATIBILITY CONTROLS</b>
        Available with Postfix 2.9 and later:
@@ -335,8 +335,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               List of users who are authorized to view the queue.
 
        <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
-              List of users who are authorized to submit mail with  the  <a href="sendmail.1.html"><b>send-</b></a>
-              <a href="sendmail.1.html"><b>mail</b>(1)</a> command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com-
+              List of users who are authorized to submit mail with  the  <b>send</b>‐\b
+              <b>mail</b>(1) command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com‐
               mand).
 
 <b>RESOURCE AND RATE CONTROLS</b>
@@ -363,7 +363,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        the Postfix "fast flush" service.
 
        <b><a href="postconf.5.html#fast_flush_domains">fast_flush_domains</a> ($<a href="postconf.5.html#relay_domains">relay_domains</a>)</b>
-              Optional list of destinations that are eligible for per-destina-
+              Optional list of destinations that are eligible for per-destina
               tion logfiles with mail that is queued to those destinations.
 
 <b>VERP CONTROLS</b>
@@ -386,7 +386,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               The location of all postfix administrative commands.
 
        <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_directory">daemon_directory</a> (see 'postconf -d' output)</b>
@@ -400,13 +400,6 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               The  time  after which the sender receives a copy of the message
               headers of mail that is still queued.
 
-       <b><a href="postconf.5.html#enable_errors_to">enable_errors_to</a> (no)</b>
-              Report mail delivery errors to the address  specified  with  the
-              non-standard  Errors-To: message header, instead of the envelope
-              sender address (this feature is  removed  with  Postfix  version
-              2.2,  is  turned off by default with Postfix version 2.1, and is
-              always turned on with older Postfix versions).
-
        <b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b>
               The UNIX system account that owns the  Postfix  queue  and  most
               Postfix daemon processes.
@@ -424,7 +417,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              syslog records, so that "smtpd"  becomes,  for  example,  "post
               fix/smtpd".
 
 <b>FILES</b>
index 5a535363dea9c69a1046229534821138eaafd324..bd2ea89bd59787c4ad238b939515a55e7ebdb275 100644 (file)
@@ -19,7 +19,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>sendmail -I</b>
 
 <b>DESCRIPTION</b>
-       The Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command implements the Postfix to Sendmail com-
+       The Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command implements the Postfix to Sendmail com
        patibility interface.  For the  sake  of  compatibility  with  existing
        applications,  some  Sendmail  command-line  options are recognized but
        silently ignored.
@@ -29,7 +29,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        arranges for delivery.  Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> relies on  the  <a href="postdrop.1.html"><b>postdrop</b>(1)</a>
        command to create a queue file in the <b>maildrop</b> directory.
 
-       Specific  command aliases are provided for other common modes of opera-
+       Specific  command aliases are provided for other common modes of opera
        tion:
 
        <b>mailq</b>  List the mail queue. Each entry shows the queue file ID, message
@@ -41,7 +41,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               <b>*</b>      The message is in the <b>active</b> queue, i.e. the  message  is
                      selected for delivery.
 
-              <b>!</b>      The  message is in the <b>hold</b> queue, i.e. no further deliv-
+              <b>!</b>      The  message is in the <b>hold</b> queue, i.e. no further deliv
                      ery attempt will be made until  the  mail  is  taken  off
                      hold.
 
@@ -51,7 +51,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>newaliases</b>
               Initialize the alias database.  If no input  file  is  specified
               (with  the  <b>-oA</b>  option,  see  below), the program processes the
-              file(s) specified with the <b><a href="postconf.5.html#alias_database">alias_database</a></b> configuration  parame-
+              file(s) specified with the <b><a href="postconf.5.html#alias_database">alias_database</a></b> configuration  parame
               ter.   If  no alias database type is specified, the program uses
               the type specified with the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b>  configuration
               parameter.  This mode of operation is implemented by running the
@@ -87,7 +87,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>-bi</b>    Initialize alias database. See the <b>newaliases</b> command above.
 
        <b>-bl</b>    Go into daemon mode. To accept only local  connections  as  with
-              Sendmail's  <b>-bl</b>  option, specify "<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback</b>" in
+              Sendmail´s  <b>-bl</b>  option, specify "<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback</b>" in
               the Postfix <a href="postconf.5.html"><b>main.cf</b></a> configuration file.
 
        <b>-bm</b>    Read mail from standard input and arrange for delivery.  This is
@@ -118,12 +118,12 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               before 2.3.
 
               With all Postfix versions, you can specify a directory  pathname
-              with  the MAIL_CONFIG environment variable to override the loca-
+              with  the MAIL_CONFIG environment variable to override the loca
               tion of configuration files.
 
        <b>-F</b> <i>full</i><b>_</b><i>name</i>
               Set the sender full name. This overrides  the  NAME  environment
-              variable, and is used only with messages that have no <b>From:</b> mes-
+              variable, and is used only with messages that have no <b>From:</b> mes
               sage header.
 
        <b>-f</b> <i>sender</i>
@@ -132,8 +132,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               the  <b>Errors-To:</b>  message  header  overrides  the  error   return
               address.
 
-       <b>-G</b>     Gateway  (relay)  submission, as opposed to initial user submis-
-              sion.  Either do not rewrite addresses at all, or update  incom-
+       <b>-G</b>     Gateway  (relay)  submission, as opposed to initial user submis
+              sion.  Either do not rewrite addresses at all, or update  incom
               plete  addresses  with  the  domain  information  specified with
               <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a></b>.
 
@@ -145,7 +145,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b>-I</b>     Initialize alias database. See the <b>newaliases</b> command above.
 
-       <b>-i</b>     When  reading  a message from standard input, don't treat a line
+       <b>-i</b>     When  reading  a message from standard input, don´t treat a line
               with only a <b>.</b> character as the end of input.
 
        <b>-L</b> <i>label</i> (ignored)
@@ -179,17 +179,17 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>-o7</b> (ignored)
 
        <b>-o8</b> (ignored)
-              To send 8-bit or binary content, use an appropriate MIME  encap-
+              To send 8-bit or binary content, use an appropriate MIME  encap
               sulation and specify the appropriate <b>-B</b> command-line option.
 
-       <b>-oi</b>    When  reading  a message from standard input, don't treat a line
+       <b>-oi</b>    When  reading  a message from standard input, don´t treat a line
               with only a <b>.</b> character as the end of input.
 
        <b>-om</b> (ignored)
               The sender is never eliminated from alias etc. expansions.
 
        <b>-o</b> <i>x value</i> (ignored)
-              Set option <i>x</i> to <i>value</i>. Use the equivalent configuration  parame-
+              Set option <i>x</i> to <i>value</i>. Use the equivalent configuration  parame
               ter in <a href="postconf.5.html"><b>main.cf</b></a> instead.
 
        <b>-r</b> <i>sender</i>
@@ -209,25 +209,25 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
               This option is ignored before Postfix version 2.10.
 
-       <b>-q</b>     Attempt to deliver all queued mail. This is implemented by  exe-
+       <b>-q</b>     Attempt to deliver all queued mail. This is implemented by  exe
               cuting the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command.
 
               Warning:  flushing  undeliverable mail frequently will result in
               poor delivery performance of all other mail.
 
        <b>-q</b><i>interval</i> (ignored)
-              The interval between queue runs. Use the <b><a href="postconf.5.html#queue_run_delay">queue_run_delay</a></b> config-
+              The interval between queue runs. Use the <b><a href="postconf.5.html#queue_run_delay">queue_run_delay</a></b> config
               uration parameter instead.
 
        <b>-qI</b><i>queueid</i>
               Schedule immediate delivery of mail with the specified queue ID.
-              This option is implemented by executing  the  <a href="postqueue.1.html"><b>postqueue</b>(1)</a>  com-
+              This option is implemented by executing  the  <a href="postqueue.1.html"><b>postqueue</b>(1)</a>  com
               mand, and is available with Postfix version 2.4 and later.
 
        <b>-qR</b><i>site</i>
               Schedule  immediate  delivery of all mail that is queued for the
-              named <i>site</i>. This option accepts only <i>site</i> names that are  eligi-
-              ble  for the "fast flush" service, and is implemented by execut-
+              named <i>site</i>. This option accepts only <i>site</i> names that are  eligi
+              ble  for the "fast flush" service, and is implemented by execut
               ing the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command.  See <a href="flush.8.html"><b>flush</b>(8)</a> for more information
               about the "fast flush" service.
 
@@ -262,12 +262,12 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b>-XV</b><i>xy</i> (Postfix 2.2 and earlier: <b>-V</b><i>xy</i>)
               As <b>-XV</b>, but uses <i>x</i> and  <i>y</i>  as  the  VERP  delimiter  characters,
-              instead of the characters specified with the <b><a href="postconf.5.html#default_verp_delimiters">default_verp_delim</a>-</b>
-              <b><a href="postconf.5.html#default_verp_delimiters">iters</a></b> configuration parameter.
+              instead of the characters specified with the <b>default_verp_delim</b>‐\b
+              <b>iters</b> configuration parameter.
 
-       <b>-v</b>     Send an email report of the first delivery attempt (Postfix ver-
-              sions  2.1 and later). Mail delivery always happens in the back-
-              ground. When multiple <b>-v</b> options are given, enable verbose  log-
+       <b>-v</b>     Send an email report of the first delivery attempt (Postfix ver
+              sions  2.1 and later). Mail delivery always happens in the back
+              ground. When multiple <b>-v</b> options are given, enable verbose  log
               ging for debugging purposes.
 
        <b>-X</b> <i>log</i><b>_</b><i>file</i> (ignored)
@@ -297,9 +297,9 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               no <b>From:</b> message header. See also the <b>-F</b> option above.
 
 <b>CONFIGURATION PARAMETERS</b>
-       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro-
-       gram.   The  text  below  provides  only a parameter summary. See <a href="postconf.5.html"><b>post-</b></a>
-       <a href="postconf.5.html"><b>conf</b>(5)</a> for more details including examples.
+       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro
+       gram.   The  text  below  provides  only a parameter summary. See <b>post</b>‐\b
+       <b>conf</b>(5) for more details including examples.
 
 <b>COMPATIBILITY CONTROLS</b>
        Available with Postfix 2.9 and later:
@@ -335,8 +335,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               List of users who are authorized to view the queue.
 
        <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
-              List of users who are authorized to submit mail with  the  <a href="sendmail.1.html"><b>send-</b></a>
-              <a href="sendmail.1.html"><b>mail</b>(1)</a> command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com-
+              List of users who are authorized to submit mail with  the  <b>send</b>‐\b
+              <b>mail</b>(1) command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com‐
               mand).
 
 <b>RESOURCE AND RATE CONTROLS</b>
@@ -363,7 +363,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        the Postfix "fast flush" service.
 
        <b><a href="postconf.5.html#fast_flush_domains">fast_flush_domains</a> ($<a href="postconf.5.html#relay_domains">relay_domains</a>)</b>
-              Optional list of destinations that are eligible for per-destina-
+              Optional list of destinations that are eligible for per-destina
               tion logfiles with mail that is queued to those destinations.
 
 <b>VERP CONTROLS</b>
@@ -386,7 +386,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               The location of all postfix administrative commands.
 
        <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_directory">daemon_directory</a> (see 'postconf -d' output)</b>
@@ -400,13 +400,6 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               The  time  after which the sender receives a copy of the message
               headers of mail that is still queued.
 
-       <b><a href="postconf.5.html#enable_errors_to">enable_errors_to</a> (no)</b>
-              Report mail delivery errors to the address  specified  with  the
-              non-standard  Errors-To: message header, instead of the envelope
-              sender address (this feature is  removed  with  Postfix  version
-              2.2,  is  turned off by default with Postfix version 2.1, and is
-              always turned on with older Postfix versions).
-
        <b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b>
               The UNIX system account that owns the  Postfix  queue  and  most
               Postfix daemon processes.
@@ -424,7 +417,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              syslog records, so that "smtpd"  becomes,  for  example,  "post
               fix/smtpd".
 
 <b>FILES</b>
index 343fcc3b9a90d227cf63c46ebbc300730146d400..46c492e97c876ea0562ef00364294a038ee08a8e 100644 (file)
@@ -52,12 +52,12 @@ PICKUP(8)                                                            PICKUP(8)
               specified <i>transport:destination</i>.
 
        <b><a href="postconf.5.html#receive_override_options">receive_override_options</a> (empty)</b>
-              Enable or disable recipient validation, built-in content filter-
+              Enable or disable recipient validation, built-in content filter
               ing, or address mapping.
 
 <b>MISCELLANEOUS CONTROLS</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#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -90,7 +90,7 @@ PICKUP(8)                                                            PICKUP(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              syslog records, so that "smtpd"  becomes,  for  example,  "post
               fix/smtpd".
 
 <b>SEE ALSO</b>
index 48a9075ef4bddcd41496775bb6651612cc953224..9751ca3192ec4ece7dec395430a0f31d3b7e3065 100644 (file)
@@ -16372,6 +16372,78 @@ key. This is intended behavior. </p>
 Postfix 2.3 and later use <a href="postconf.5.html#smtpd_tls_security_level">smtpd_tls_security_level</a> instead. </p>
 
 
+</DD>
+
+<DT><b><a name="smtputf8_autodetect_classes">smtputf8_autodetect_classes</a>
+(default: sendmail, verify)</b></DT><DD>
+
+<p> Detect that a message requires SMTPUTF8 support for the specified
+mail origin classes.  This is a workaround to avoid chicken-and-egg
+problems during the initial SMTPUTF8 roll-out in environments with
+pre-existing mail flows that contain UTF8. Those mail flows should
+not break because Postfix suddenly refuses to deliver such mail
+to down-stream MTAs that don't announce SMTPUTF8 support.  </p>
+
+<p> The problem is that Postfix cannot rely solely on the sender's
+declaration that a message requires SMTPUTF8 support, because UTF8
+may be introduced during local processing (for example, the client
+hostname in Postfix's Received: header, adding @$<a href="postconf.5.html#myorigin">myorigin</a> or
+.$<a href="postconf.5.html#mydomain">mydomain</a> to an incomplete address, address rewriting, alias
+expansion, automatic BCC recipients, local forwarding, and changes
+made by header checks or Milter applications). </p>
+
+<p> For now, the default is to enable "SMTPUTF8 required" autodetection
+only for Postfix sendmail command-line submissions and address
+verification probes.  This may change once SMTPUTF8 support achieves
+world domination.  However, sites that add UTF8 content via local
+processing (see above) should autodetect the need for SMTPUTF8
+support for all email.</p>
+
+<p> Specify one or more of the following: </p>
+
+<dl compact>
+
+<dt> <b> sendmail </b> </dt> <dd> Submission with the Postfix
+<a href="sendmail.1.html">sendmail(1)</a> command. </dd>
+
+<dt> <b> smtpd </b> </dt> <dd> Mail received with the <a href="smtpd.8.html">smtpd(8)</a>
+daemon. </dd>
+
+<dt> <b> qmqpd </b> </dt> <dd> Mail received with the <a href="qmqpd.8.html">qmqpd(8)</a>
+daemon. </dd>
+
+<dt> <b> forward </b> </dt> <dd> Local forwarding or aliasing.
+</dd>
+
+<dt> <b> bounce </b> </dt> <dd> Submission by the <a href="bounce.8.html">bounce(8)</a> daemon.
+</dd>
+
+<dt> <b> notify </b> </dt> <dd> Postmaster notification from the
+<a href="smtp.8.html">smtp(8)</a> or <a href="smtpd.8.html">smtpd(8)</a> daemon. </dd>
+
+<dt> <b> verify </b> </dt> <dd> Address verification probe from the
+<a href="verify.8.html">verify(8)</a> daemon.  </dd>
+
+<dt> <b> all </b> </dt> <dd> Enable SMTPUTF8 autodetection for all
+mail. </dd>
+
+</dl>
+
+<p> This feature is available in Postfix 2.12 and later. </p>
+
+
+</DD>
+
+<DT><b><a name="smtputf8_enable">smtputf8_enable</a>
+(default: no)</b></DT><DD>
+
+<p> Enable experimental SMTPUTF8 support for the protocols described
+in <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a>..6533. This requires that Postfix is built to support
+these protocols. </p>
+
+<p> This feature is available in Postfix 2.12 and later. </p>
+
+
 </DD>
 
 <DT><b><a name="soft_bounce">soft_bounce</a>
@@ -16544,6 +16616,18 @@ FROM and RCPT TO addresses.
 </p>
 
 
+</DD>
+
+<DT><b><a name="strict_smtputf8">strict_smtputf8</a>
+(default: no)</b></DT><DD>
+
+<p> Enable stricter enforcement of the SMTPUTF8 protocol. The Postfix
+SMTP server accepts UTF8 sender or recipient addresses only when
+the client requests an SMTPUTF8 mail transaction. </p>
+
+<p> This feature is available in Postfix 2.12 and later. </p>
+
+
 </DD>
 
 <DT><b><a name="sun_mailtool_compatibility">sun_mailtool_compatibility</a>
index 489cf22e90bce8a1f690d39e10b99cc3f9508274..6a142c74d5fd789d67db8aeb19a1a183e8c61b50 100644 (file)
@@ -48,15 +48,15 @@ POSTDROP(1)                                                        POSTDROP(1)
               of set-group ID privileges, a non-standard directory is  allowed
               only if:
 
-              <b>o</b>      The  name is listed in the standard <a href="postconf.5.html"><b>main.cf</b></a> file with the
+              ·      The  name is listed in the standard <a href="postconf.5.html"><b>main.cf</b></a> file with the
                      <b><a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a></b> configuration parameter.
 
-              <b>o</b>      The command is invoked by the super-user.
+              ·      The command is invoked by the super-user.
 
 <b>CONFIGURATION PARAMETERS</b>
-       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro-
-       gram.   The  text  below  provides  only a parameter summary. See <a href="postconf.5.html"><b>post-</b></a>
-       <a href="postconf.5.html"><b>conf</b>(5)</a> for more details including examples.
+       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro
+       gram.   The  text  below  provides  only a parameter summary. See <b>post</b>‐\b
+       <b>conf</b>(5) for more details including examples.
 
        <b><a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a> (empty)</b>
               A list of non-default Postfix configuration directories that may
@@ -64,7 +64,7 @@ POSTDROP(1)                                                        POSTDROP(1)
               via the MAIL_CONFIG environment parameter.
 
        <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#import_environment">import_environment</a> (see 'postconf -d' output)</b>
@@ -79,7 +79,7 @@ POSTDROP(1)                                                        POSTDROP(1)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The mail system name that is prepended to the  process  name  in
-              syslog  records,  so  that  "smtpd" becomes, for example, "post-
+              syslog  records,  so  that  "smtpd" becomes, for example, "post
               fix/smtpd".
 
        <b><a href="postconf.5.html#trigger_timeout">trigger_timeout</a> (10s)</b>
@@ -89,8 +89,8 @@ POSTDROP(1)                                                        POSTDROP(1)
        Available in Postfix version 2.2 and later:
 
        <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
-              List  of  users who are authorized to submit mail with the <a href="sendmail.1.html"><b>send-</b></a>
-              <a href="sendmail.1.html"><b>mail</b>(1)</a> command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com-
+              List  of  users who are authorized to submit mail with the <b>send</b>‐\b
+              <b>mail</b>(1) command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com‐
               mand).
 
 <b>FILES</b>
index 48b870d09f57f07d21fe19697625922dce6cc258..49167e99fa61e07903c95fe109c8c981dc93e96d 100644 (file)
@@ -13,12 +13,12 @@ QMQPD(8)                                                              QMQPD(8)
        <b>qmqpd</b> [generic Postfix daemon options]
 
 <b>DESCRIPTION</b>
-       The Postfix QMQP server receives one message per connection.  Each mes-
+       The Postfix QMQP server receives one message per connection.  Each mes
        sage is piped through the <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon, and  is  placed  into  the
        <a href="QSHAPE_README.html#incoming_queue"><b>incoming</b> queue</a> as one single queue file.  The program expects to be run
        from the <a href="master.8.html"><b>master</b>(8)</a> process manager.
 
-       The QMQP server implements one access policy:  only  explicitly  autho-
+       The QMQP server implements one access policy:  only  explicitly  autho
        rized client hosts are allowed to use the service.
 
 <b>SECURITY</b>
@@ -34,7 +34,7 @@ QMQPD(8)                                                              QMQPD(8)
        It is therefore not possible to reject individual recipients.
 
        The QMQP protocol requires the server to  receive  the  entire  message
-       before  replying. If a message is malformed, or if any netstring compo-
+       before  replying. If a message is malformed, or if any netstring compo
        nent is longer than acceptable, Postfix replies immediately and  closes
        the connection. It is left up to the client to handle the situation.
 
@@ -52,12 +52,19 @@ QMQPD(8)                                                              QMQPD(8)
               specified <i>transport:destination</i>.
 
        <b><a href="postconf.5.html#receive_override_options">receive_override_options</a> (empty)</b>
-              Enable or disable recipient validation, built-in content filter-
+              Enable or disable recipient validation, built-in content filter
               ing, or address mapping.
 
+<b>SMTPUTF8 CONTROLS</b>
+       Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+
+       <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‐
+              fied mail origin classes.
+
 <b>RESOURCE AND RATE CONTROLS</b>
        <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#hopcount_limit">hopcount_limit</a> (50)</b>
@@ -65,47 +72,47 @@ QMQPD(8)                                                              QMQPD(8)
               in the primary message headers.
 
        <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#qmqpd_timeout">qmqpd_timeout</a> (300s)</b>
-              The  time  limit  for  sending or receiving information over the
+              The time limit for sending or  receiving  information  over  the
               network.
 
 <b>TROUBLE SHOOTING CONTROLS</b>
        <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
-              The increment in verbose logging level when a remote  client  or
+              The  increment  in verbose logging level when a remote client or
               server matches a pattern in 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  remote  client or server hostname or network
+              Optional list of remote client or  server  hostname  or  network
               address  patterns  that  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#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.
 
 <b>TARPIT CONTROLS</b>
        <b><a href="postconf.5.html#qmqpd_error_delay">qmqpd_error_delay</a> (1s)</b>
-              How long the Postfix QMQP server will  pause  before  sending  a
+              How  long  the  Postfix  QMQP server will pause before sending a
               negative reply to the remote QMQP client.
 
 <b>MISCELLANEOUS CONTROLS</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#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#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>
@@ -119,7 +126,7 @@ QMQPD(8)                                                              QMQPD(8)
               The process name of a Postfix command or daemon process.
 
        <b><a href="postconf.5.html#qmqpd_authorized_clients">qmqpd_authorized_clients</a> (empty)</b>
-              What  remote  QMQP clients are allowed to connect to the Postfix
+              What remote QMQP clients are allowed to connect to  the  Postfix
               QMQP server port.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
@@ -129,12 +136,12 @@ QMQPD(8)                                                              QMQPD(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              The mail system name that is prepended to the  process  name  in
-              syslog  records,  so  that  "smtpd" becomes, for example, "post-
+              The  mail  system  name that is prepended to the process name in
+              syslog records, so that "smtpd"  becomes,  for  example,  "post‐
               fix/smtpd".
 
        <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 2.5 and later:
index 5a535363dea9c69a1046229534821138eaafd324..bd2ea89bd59787c4ad238b939515a55e7ebdb275 100644 (file)
@@ -19,7 +19,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>sendmail -I</b>
 
 <b>DESCRIPTION</b>
-       The Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command implements the Postfix to Sendmail com-
+       The Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command implements the Postfix to Sendmail com
        patibility interface.  For the  sake  of  compatibility  with  existing
        applications,  some  Sendmail  command-line  options are recognized but
        silently ignored.
@@ -29,7 +29,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        arranges for delivery.  Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> relies on  the  <a href="postdrop.1.html"><b>postdrop</b>(1)</a>
        command to create a queue file in the <b>maildrop</b> directory.
 
-       Specific  command aliases are provided for other common modes of opera-
+       Specific  command aliases are provided for other common modes of opera
        tion:
 
        <b>mailq</b>  List the mail queue. Each entry shows the queue file ID, message
@@ -41,7 +41,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               <b>*</b>      The message is in the <b>active</b> queue, i.e. the  message  is
                      selected for delivery.
 
-              <b>!</b>      The  message is in the <b>hold</b> queue, i.e. no further deliv-
+              <b>!</b>      The  message is in the <b>hold</b> queue, i.e. no further deliv
                      ery attempt will be made until  the  mail  is  taken  off
                      hold.
 
@@ -51,7 +51,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>newaliases</b>
               Initialize the alias database.  If no input  file  is  specified
               (with  the  <b>-oA</b>  option,  see  below), the program processes the
-              file(s) specified with the <b><a href="postconf.5.html#alias_database">alias_database</a></b> configuration  parame-
+              file(s) specified with the <b><a href="postconf.5.html#alias_database">alias_database</a></b> configuration  parame
               ter.   If  no alias database type is specified, the program uses
               the type specified with the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b>  configuration
               parameter.  This mode of operation is implemented by running the
@@ -87,7 +87,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>-bi</b>    Initialize alias database. See the <b>newaliases</b> command above.
 
        <b>-bl</b>    Go into daemon mode. To accept only local  connections  as  with
-              Sendmail's  <b>-bl</b>  option, specify "<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback</b>" in
+              Sendmail´s  <b>-bl</b>  option, specify "<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback</b>" in
               the Postfix <a href="postconf.5.html"><b>main.cf</b></a> configuration file.
 
        <b>-bm</b>    Read mail from standard input and arrange for delivery.  This is
@@ -118,12 +118,12 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               before 2.3.
 
               With all Postfix versions, you can specify a directory  pathname
-              with  the MAIL_CONFIG environment variable to override the loca-
+              with  the MAIL_CONFIG environment variable to override the loca
               tion of configuration files.
 
        <b>-F</b> <i>full</i><b>_</b><i>name</i>
               Set the sender full name. This overrides  the  NAME  environment
-              variable, and is used only with messages that have no <b>From:</b> mes-
+              variable, and is used only with messages that have no <b>From:</b> mes
               sage header.
 
        <b>-f</b> <i>sender</i>
@@ -132,8 +132,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               the  <b>Errors-To:</b>  message  header  overrides  the  error   return
               address.
 
-       <b>-G</b>     Gateway  (relay)  submission, as opposed to initial user submis-
-              sion.  Either do not rewrite addresses at all, or update  incom-
+       <b>-G</b>     Gateway  (relay)  submission, as opposed to initial user submis
+              sion.  Either do not rewrite addresses at all, or update  incom
               plete  addresses  with  the  domain  information  specified with
               <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a></b>.
 
@@ -145,7 +145,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b>-I</b>     Initialize alias database. See the <b>newaliases</b> command above.
 
-       <b>-i</b>     When  reading  a message from standard input, don't treat a line
+       <b>-i</b>     When  reading  a message from standard input, don´t treat a line
               with only a <b>.</b> character as the end of input.
 
        <b>-L</b> <i>label</i> (ignored)
@@ -179,17 +179,17 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        <b>-o7</b> (ignored)
 
        <b>-o8</b> (ignored)
-              To send 8-bit or binary content, use an appropriate MIME  encap-
+              To send 8-bit or binary content, use an appropriate MIME  encap
               sulation and specify the appropriate <b>-B</b> command-line option.
 
-       <b>-oi</b>    When  reading  a message from standard input, don't treat a line
+       <b>-oi</b>    When  reading  a message from standard input, don´t treat a line
               with only a <b>.</b> character as the end of input.
 
        <b>-om</b> (ignored)
               The sender is never eliminated from alias etc. expansions.
 
        <b>-o</b> <i>x value</i> (ignored)
-              Set option <i>x</i> to <i>value</i>. Use the equivalent configuration  parame-
+              Set option <i>x</i> to <i>value</i>. Use the equivalent configuration  parame
               ter in <a href="postconf.5.html"><b>main.cf</b></a> instead.
 
        <b>-r</b> <i>sender</i>
@@ -209,25 +209,25 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
               This option is ignored before Postfix version 2.10.
 
-       <b>-q</b>     Attempt to deliver all queued mail. This is implemented by  exe-
+       <b>-q</b>     Attempt to deliver all queued mail. This is implemented by  exe
               cuting the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command.
 
               Warning:  flushing  undeliverable mail frequently will result in
               poor delivery performance of all other mail.
 
        <b>-q</b><i>interval</i> (ignored)
-              The interval between queue runs. Use the <b><a href="postconf.5.html#queue_run_delay">queue_run_delay</a></b> config-
+              The interval between queue runs. Use the <b><a href="postconf.5.html#queue_run_delay">queue_run_delay</a></b> config
               uration parameter instead.
 
        <b>-qI</b><i>queueid</i>
               Schedule immediate delivery of mail with the specified queue ID.
-              This option is implemented by executing  the  <a href="postqueue.1.html"><b>postqueue</b>(1)</a>  com-
+              This option is implemented by executing  the  <a href="postqueue.1.html"><b>postqueue</b>(1)</a>  com
               mand, and is available with Postfix version 2.4 and later.
 
        <b>-qR</b><i>site</i>
               Schedule  immediate  delivery of all mail that is queued for the
-              named <i>site</i>. This option accepts only <i>site</i> names that are  eligi-
-              ble  for the "fast flush" service, and is implemented by execut-
+              named <i>site</i>. This option accepts only <i>site</i> names that are  eligi
+              ble  for the "fast flush" service, and is implemented by execut
               ing the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command.  See <a href="flush.8.html"><b>flush</b>(8)</a> for more information
               about the "fast flush" service.
 
@@ -262,12 +262,12 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b>-XV</b><i>xy</i> (Postfix 2.2 and earlier: <b>-V</b><i>xy</i>)
               As <b>-XV</b>, but uses <i>x</i> and  <i>y</i>  as  the  VERP  delimiter  characters,
-              instead of the characters specified with the <b><a href="postconf.5.html#default_verp_delimiters">default_verp_delim</a>-</b>
-              <b><a href="postconf.5.html#default_verp_delimiters">iters</a></b> configuration parameter.
+              instead of the characters specified with the <b>default_verp_delim</b>‐\b
+              <b>iters</b> configuration parameter.
 
-       <b>-v</b>     Send an email report of the first delivery attempt (Postfix ver-
-              sions  2.1 and later). Mail delivery always happens in the back-
-              ground. When multiple <b>-v</b> options are given, enable verbose  log-
+       <b>-v</b>     Send an email report of the first delivery attempt (Postfix ver
+              sions  2.1 and later). Mail delivery always happens in the back
+              ground. When multiple <b>-v</b> options are given, enable verbose  log
               ging for debugging purposes.
 
        <b>-X</b> <i>log</i><b>_</b><i>file</i> (ignored)
@@ -297,9 +297,9 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               no <b>From:</b> message header. See also the <b>-F</b> option above.
 
 <b>CONFIGURATION PARAMETERS</b>
-       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro-
-       gram.   The  text  below  provides  only a parameter summary. See <a href="postconf.5.html"><b>post-</b></a>
-       <a href="postconf.5.html"><b>conf</b>(5)</a> for more details including examples.
+       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro
+       gram.   The  text  below  provides  only a parameter summary. See <b>post</b>‐\b
+       <b>conf</b>(5) for more details including examples.
 
 <b>COMPATIBILITY CONTROLS</b>
        Available with Postfix 2.9 and later:
@@ -335,8 +335,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               List of users who are authorized to view the queue.
 
        <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
-              List of users who are authorized to submit mail with  the  <a href="sendmail.1.html"><b>send-</b></a>
-              <a href="sendmail.1.html"><b>mail</b>(1)</a> command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com-
+              List of users who are authorized to submit mail with  the  <b>send</b>‐\b
+              <b>mail</b>(1) command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com‐
               mand).
 
 <b>RESOURCE AND RATE CONTROLS</b>
@@ -363,7 +363,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
        the Postfix "fast flush" service.
 
        <b><a href="postconf.5.html#fast_flush_domains">fast_flush_domains</a> ($<a href="postconf.5.html#relay_domains">relay_domains</a>)</b>
-              Optional list of destinations that are eligible for per-destina-
+              Optional list of destinations that are eligible for per-destina
               tion logfiles with mail that is queued to those destinations.
 
 <b>VERP CONTROLS</b>
@@ -386,7 +386,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               The location of all postfix administrative commands.
 
        <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_directory">daemon_directory</a> (see 'postconf -d' output)</b>
@@ -400,13 +400,6 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               The  time  after which the sender receives a copy of the message
               headers of mail that is still queued.
 
-       <b><a href="postconf.5.html#enable_errors_to">enable_errors_to</a> (no)</b>
-              Report mail delivery errors to the address  specified  with  the
-              non-standard  Errors-To: message header, instead of the envelope
-              sender address (this feature is  removed  with  Postfix  version
-              2.2,  is  turned off by default with Postfix version 2.1, and is
-              always turned on with older Postfix versions).
-
        <b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b>
               The UNIX system account that owns the  Postfix  queue  and  most
               Postfix daemon processes.
@@ -424,7 +417,7 @@ SENDMAIL(1)                                                        SENDMAIL(1)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              syslog records, so that "smtpd"  becomes,  for  example,  "post
               fix/smtpd".
 
 <b>FILES</b>
index 6a85843d1fda4c3e1f7559ddd6198547158ffcc5..b05dc45cd8225a9a8627efbd09b60cee03f3429c 100644 (file)
@@ -14,7 +14,7 @@ SMTP(8)                                                                SMTP(8)
 
 <b>DESCRIPTION</b>
        The Postfix SMTP+LMTP client implements the SMTP and LMTP mail delivery
-       protocols. It processes message delivery requests from the  queue  man-
+       protocols. It processes message delivery requests from the  queue  man
        ager.  Each  request specifies a queue file, a sender address, a domain
        or host to deliver to, and recipient information.  This program expects
        to be run from the <a href="master.8.html"><b>master</b>(8)</a> process manager.
@@ -46,7 +46,7 @@ SMTP(8)                                                                SMTP(8)
        <i>domainname</i>
 
        <i>domainname</i>:<i>port</i>
-              Look up the mail exchangers for the specified domain,  and  con-
+              Look up the mail exchangers for the specified domain,  and  con
               nect to the specified port (default: <b>smtp</b>).
 
        [<i>hostname</i>]
@@ -59,7 +59,7 @@ SMTP(8)                                                                SMTP(8)
 
        [<i>address</i>]:<i>port</i>
               Connect to the host at the specified address, and connect to the
-              specified  port (default: <b>smtp</b>). An IPv6 address must be format-
+              specified  port (default: <b>smtp</b>). An IPv6 address must be format
               ted as [<b>ipv6</b>:<i>address</i>].
 
 <b>LMTP DESTINATION SYNTAX</b>
@@ -107,13 +107,15 @@ SMTP(8)                                                                SMTP(8)
        <a href="http://tools.ietf.org/html/rfc3463">RFC 3463</a> (Enhanced Status Codes)
        <a href="http://tools.ietf.org/html/rfc4954">RFC 4954</a> (AUTH command)
        <a href="http://tools.ietf.org/html/rfc5321">RFC 5321</a> (SMTP protocol)
+       <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a> (Internationalized SMTP)
+       <a href="http://tools.ietf.org/html/rfc6533">RFC 6533</a> (Internationalized Delivery Status Notifications)
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).  Corrupted  message
        files are marked so that the queue manager can move them to the <b>corrupt</b>
        queue for further inspection.
 
-       Depending on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the  postmas-
+       Depending on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the  postmas
        ter is notified of bounces, protocol problems, and of other trouble.
 
 <b>BUGS</b>
@@ -131,7 +133,7 @@ SMTP(8)                                                                SMTP(8)
        there  is  no  support  for TLS, and connections are cached in-process,
        making it ineffective when the client is used for multiple domains.
 
-       Most smtp_<i>xxx</i> configuration parameters have an lmtp_<i>xxx</i> "mirror" param-
+       Most smtp_<i>xxx</i> configuration parameters have an lmtp_<i>xxx</i> "mirror" param
        eter  for  the  equivalent  LMTP  feature. This document describes only
        those LMTP-related parameters that aren't simply "mirror" parameters.
 
@@ -242,7 +244,7 @@ SMTP(8)                                                                SMTP(8)
        <b><a href="postconf.5.html#send_cyrus_sasl_authzid">send_cyrus_sasl_authzid</a> (no)</b>
               When authenticating to a remote SMTP or  LMTP  server  with  the
               default  setting  "no", send no SASL authoriZation ID (authzid);
-              send only the SASL authentiCation ID (authcid)  plus  the  auth-
+              send only the SASL authentiCation ID (authcid)  plus  the  auth
               cid's password.
 
        Available in Postfix version 2.5 and later:
@@ -264,7 +266,7 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.6 and later:
 
        <b><a href="postconf.5.html#tcp_windowsize">tcp_windowsize</a> (0)</b>
-              An optional workaround for routers that break TCP  window  scal-
+              An optional workaround for routers that break TCP  window  scal
               ing.
 
        Available in Postfix version 2.8 and later:
@@ -278,7 +280,7 @@ SMTP(8)                                                                SMTP(8)
               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-
+              response line, SMTP message content line, or TLS  protocol  mes
               sage).
 
        <b><a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a> (no)</b>
@@ -294,7 +296,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_delivery_status_filter">smtp_delivery_status_filter</a> ($<a href="postconf.5.html#default_delivery_status_filter">default_delivery_status_filter</a>)</b>
               Optional filter for the <a href="smtp.8.html"><b>smtp</b>(8)</a> delivery  agent  to  change  the
-              delivery status code or explanatory text of successful or unsuc-
+              delivery status code or explanatory text of successful or unsuc
               cessful deliveries.
 
 <b>MIME PROCESSING CONTROLS</b>
@@ -321,13 +323,13 @@ SMTP(8)                                                                SMTP(8)
               Enable SASL authentication in the Postfix SMTP client.
 
        <b><a href="postconf.5.html#smtp_sasl_password_maps">smtp_sasl_password_maps</a> (empty)</b>
-              Optional Postfix  SMTP  client  lookup  tables  with  one  user-
+              Optional Postfix  SMTP  client  lookup  tables  with  one  user
               name:password  entry  per  remote  hostname or domain, or sender
               address when sender-dependent authentication is enabled.
 
        <b><a href="postconf.5.html#smtp_sasl_security_options">smtp_sasl_security_options</a> (noplaintext, noanonymous)</b>
               Postfix SMTP client SASL security options; as of Postfix 2.3 the
-              list  of available features depends on the SASL client implemen-
+              list  of available features depends on the SASL client implemen
               tation that is selected with <b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a></b>.
 
        Available in Postfix version 2.2 and later:
@@ -341,7 +343,7 @@ SMTP(8)                                                                SMTP(8)
        <b><a href="postconf.5.html#smtp_sender_dependent_authentication">smtp_sender_dependent_authentication</a> (no)</b>
               Enable  sender-dependent  authentication  in  the  Postfix  SMTP
               client; this is available only  with  SASL  authentication,  and
-              disables  SMTP  connection caching to ensure that mail from dif-
+              disables  SMTP  connection caching to ensure that mail from dif
               ferent senders will use the appropriate credentials.
 
        <b><a href="postconf.5.html#smtp_sasl_path">smtp_sasl_path</a> (empty)</b>
@@ -356,7 +358,7 @@ SMTP(8)                                                                SMTP(8)
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#smtp_sasl_auth_cache_name">smtp_sasl_auth_cache_name</a> (empty)</b>
-              An  optional table to prevent repeated SASL authentication fail-
+              An  optional table to prevent repeated SASL authentication fail
               ures with the same remote SMTP  server  hostname,  username  and
               password.
 
@@ -395,7 +397,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_tls_CAfile">smtp_tls_CAfile</a> (empty)</b>
               A  file  containing  CA certificates of root CAs trusted to sign
-              either remote SMTP server certificates or intermediate  CA  cer-
+              either remote SMTP server certificates or intermediate  CA  cer
               tificates.
 
        <b><a href="postconf.5.html#smtp_tls_CApath">smtp_tls_CApath</a> (empty)</b>
@@ -416,7 +418,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_tls_mandatory_exclude_ciphers">smtp_tls_mandatory_exclude_ciphers</a> (empty)</b>
               Additional list of ciphers or cipher types to exclude  from  the
-              Postfix  SMTP  client cipher list at mandatory TLS security lev-
+              Postfix  SMTP  client cipher list at mandatory TLS security lev
               els.
 
        <b><a href="postconf.5.html#smtp_tls_dcert_file">smtp_tls_dcert_file</a> (empty)</b>
@@ -437,7 +439,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_tls_policy_maps">smtp_tls_policy_maps</a> (empty)</b>
               Optional lookup tables with the Postfix SMTP client TLS security
-              policy by next-hop destination; when a non-empty value is speci-
+              policy by next-hop destination; when a non-empty value is speci
               fied, this overrides the obsolete <a href="postconf.5.html#smtp_tls_per_site">smtp_tls_per_site</a> parameter.
 
        <b><a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> (!SSLv2)</b>
@@ -486,8 +488,8 @@ SMTP(8)                                                                SMTP(8)
 
        Available in Postfix version 2.4 and later:
 
-       <b><a href="postconf.5.html#smtp_sasl_tls_verified_security_options">smtp_sasl_tls_verified_security_options</a>           ($<a href="postconf.5.html#smtp_sasl_tls_security_options">smtp_sasl_tls_secu</a>-</b>
-       <b><a href="postconf.5.html#smtp_sasl_tls_security_options">rity_options</a>)</b>
+       <b><a href="postconf.5.html#smtp_sasl_tls_verified_security_options">smtp_sasl_tls_verified_security_options</a>           ($smtp_sasl_tls_secu</b>‐\b
+       <b>rity_options)</b>
               The SASL authentication security options that the  Postfix  SMTP
               client  uses  for  TLS  encrypted  SMTP sessions with a verified
               server certificate.
@@ -496,8 +498,8 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#smtp_tls_fingerprint_cert_match">smtp_tls_fingerprint_cert_match</a> (empty)</b>
               List of acceptable remote SMTP server  certificate  fingerprints
-              for   the   "fingerprint"  TLS  security  level  (<b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_secu</a>-</b>
-              <b><a href="postconf.5.html#smtp_tls_security_level">rity_level</a></b> = fingerprint).
+              for   the   "fingerprint"  TLS  security  level  (<b>smtp_tls_secu</b>‐\b
+              <b>rity_level</b> = fingerprint).
 
        <b><a href="postconf.5.html#smtp_tls_fingerprint_digest">smtp_tls_fingerprint_digest</a> (md5)</b>
               The message digest  algorithm  used  to  construct  remote  SMTP
@@ -514,18 +516,18 @@ SMTP(8)                                                                SMTP(8)
               use with opportunistic TLS encryption.
 
        <b><a href="postconf.5.html#smtp_tls_eccert_file">smtp_tls_eccert_file</a> (empty)</b>
-              File  with the Postfix SMTP client ECDSA certificate in PEM for-
+              File  with the Postfix SMTP client ECDSA certificate in PEM for
               mat.
 
        <b><a href="postconf.5.html#smtp_tls_eckey_file">smtp_tls_eckey_file</a> ($<a href="postconf.5.html#smtp_tls_eccert_file">smtp_tls_eccert_file</a>)</b>
-              File with the Postfix SMTP client ECDSA private key in PEM  for-
+              File with the Postfix SMTP client ECDSA private key in PEM  for
               mat.
 
        Available in Postfix version 2.7 and later:
 
        <b><a href="postconf.5.html#smtp_tls_block_early_mail_reply">smtp_tls_block_early_mail_reply</a> (no)</b>
               Try  to  detect  a mail hijacking attack based on a TLS protocol
-              vulnerability (CVE-2009-3555), where an attacker prepends  mali-
+              vulnerability (CVE-2009-3555), where an attacker prepends  mali
               cious  HELO,  MAIL, RCPT, DATA commands to a Postfix SMTP client
               TLS session.
 
@@ -570,7 +572,7 @@ SMTP(8)                                                                SMTP(8)
 
        <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-
+              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>
@@ -578,17 +580,17 @@ SMTP(8)                                                                SMTP(8)
               cipher list.
 
 <b>RESOURCE AND RATE CONTROLS</b>
-       <b><a href="postconf.5.html#smtp_destination_concurrency_limit">smtp_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>
-              The maximal number of parallel deliveries to the  same  destina-
+       <b><a href="postconf.5.html#smtp_destination_concurrency_limit">smtp_destination_concurrency_limit</a>        ($default_destination_concur</b>‐\b
+       <b>rency_limit)</b>
+              The maximal number of parallel deliveries to the  same  destina
               tion via the smtp message delivery transport.
 
        <b><a href="postconf.5.html#smtp_destination_recipient_limit">smtp_destination_recipient_limit</a> ($<a href="postconf.5.html#default_destination_recipient_limit">default_destination_recipient_limit</a>)</b>
-              The  maximal  number of recipients per message for the smtp mes-
+              The  maximal  number of recipients per message for the smtp mes
               sage delivery transport.
 
        <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>
@@ -601,7 +603,7 @@ SMTP(8)                                                                SMTP(8)
               and for receiving the initial remote LMTP server response.
 
        <b><a href="postconf.5.html#smtp_xforward_timeout">smtp_xforward_timeout</a> (300s)</b>
-              The Postfix SMTP client time limit for sending the XFORWARD com-
+              The Postfix SMTP client time limit for sending the XFORWARD com
               mand, and for receiving the remote SMTP server response.
 
        <b><a href="postconf.5.html#smtp_mail_timeout">smtp_mail_timeout</a> (300s)</b>
@@ -661,7 +663,7 @@ SMTP(8)                                                                SMTP(8)
               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>
-              The amount of time during which Postfix will use an SMTP connec-
+              The amount of time during which Postfix will use an SMTP connec
               tion repeatedly.
 
        <b><a href="postconf.5.html#smtp_connection_cache_time_limit">smtp_connection_cache_time_limit</a> (2s)</b>
@@ -671,7 +673,7 @@ 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 and later:
@@ -680,7 +682,7 @@ SMTP(8)                                                                SMTP(8)
               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-
+              response  line,  SMTP message content line, or TLS protocol mes
               sage).
 
        Available in Postfix version 2.11 and later:
@@ -690,6 +692,17 @@ SMTP(8)                                                                SMTP(8)
               that  an SMTP session may be reused before it is closed, or zero
               (no limit).
 
+<b>SMTPUTF8 CONTROLS</b>
+       Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+
+       <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (no)</b>
+              Enable experimental SMTPUTF8 support for the protocols described
+              in <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a>..6533.
+
+       <b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
+              Enable  SMTPUTF8  autodetection  for  the  specified mail origin
+              classes.
+
 <b>TROUBLE SHOOTING CONTROLS</b>
        <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
               The increment in verbose logging level when a remote  client  or
@@ -702,7 +715,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
               The  recipient  of  postmaster notifications about mail delivery
-              problems that are caused by policy, resource, software or proto-
+              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>
@@ -719,7 +732,7 @@ SMTP(8)                                                                SMTP(8)
               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>
@@ -727,7 +740,7 @@ SMTP(8)                                                                SMTP(8)
               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 sub-second delay values.
 
        <b><a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> (no)</b>
@@ -747,7 +760,7 @@ SMTP(8)                                                                SMTP(8)
 
        <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-
+              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>
@@ -802,7 +815,7 @@ SMTP(8)                                                                SMTP(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The  mail  system  name that is prepended to the process name in
-              syslog records, so that "smtpd"  becomes,  for  example,  "post-
+              syslog records, so that "smtpd"  becomes,  for  example,  "post
               fix/smtpd".
 
        Available with Postfix 2.2 and earlier:
index 0810ca7a2b357d345f7b8355c8022bba4cccb204..4842b015363dd4f86d94d77a1000257d62161499 100644 (file)
@@ -18,7 +18,7 @@ SMTPD(8)                                                              SMTPD(8)
        The  SMTP  server accepts network connection requests and performs zero
        or more SMTP transactions per connection.   Each  received  message  is
        piped  through  the  <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon, and is placed into the <b>incoming</b>
-       queue as one single queue file.  For this mode of operation,  the  pro-
+       queue as one single queue file.  For this mode of operation,  the  pro
        gram expects to be run from the <a href="master.8.html"><b>master</b>(8)</a> process manager.
 
        Alternatively,  the SMTP server be can run in stand-alone mode; this is
@@ -31,7 +31,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        The  SMTP  server  implements  a  variety  of  policies  for connection
        requests, and for parameters given to <b>HELO, ETRN, MAIL FROM,  VRFY</b>  and
-       <b>RCPT TO</b> commands. They are detailed below and in the <a href="postconf.5.html"><b>main.cf</b></a> configura-
+       <b>RCPT TO</b> commands. They are detailed below and in the <a href="postconf.5.html"><b>main.cf</b></a> configura
        tion file.
 
 <b>SECURITY</b>
@@ -57,11 +57,13 @@ SMTPD(8)                                                              SMTPD(8)
        <a href="http://tools.ietf.org/html/rfc4409">RFC 4409</a> (Message submission)
        <a href="http://tools.ietf.org/html/rfc4954">RFC 4954</a> (AUTH command)
        <a href="http://tools.ietf.org/html/rfc5321">RFC 5321</a> (SMTP protocol)
+       <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a> (Internationalized SMTP)
+       <a href="http://tools.ietf.org/html/rfc6533">RFC 6533</a> (Internationalized Delivery Status Notifications)
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).
 
-       Depending on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the  postmas-
+       Depending on the setting of the <b><a href="postconf.5.html#notify_classes">notify_classes</a></b> parameter, the  postmas
        ter  is  notified of bounces, protocol problems, policy violations, and
        of other trouble.
 
@@ -127,13 +129,13 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_tls_always_issue_session_ids">smtpd_tls_always_issue_session_ids</a> (yes)</b>
               Force  the  Postfix  SMTP server to issue a TLS session id, even
-              when  TLS  session  caching  is   turned   off   (<a href="postconf.5.html#smtpd_tls_session_cache_database">smtpd_tls_ses</a>-
-              <a href="postconf.5.html#smtpd_tls_session_cache_database">sion_cache_database</a> is empty).
+              when  TLS  session  caching  is   turned   off   (smtpd_tls_ses‐
+              sion_cache_database is empty).
 
        Available in Postfix version 2.6 and later:
 
        <b><a href="postconf.5.html#tcp_windowsize">tcp_windowsize</a> (0)</b>
-              An  optional  workaround for routers that break TCP window scal-
+              An  optional  workaround for routers that break TCP window scal
               ing.
 
        Available in Postfix version 2.7 and later:
@@ -144,8 +146,8 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.9 and later:
 
        <b><a href="postconf.5.html#smtpd_per_record_deadline">smtpd_per_record_deadline</a> (normal: no, overload: 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
+              Change  the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  and  smtpd_start‐
+              tls_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 message).
@@ -155,7 +157,7 @@ SMTPD(8)                                                              SMTPD(8)
        Postfix address rewriting.
 
        <b><a href="postconf.5.html#receive_override_options">receive_override_options</a> (empty)</b>
-              Enable or disable recipient validation, built-in content filter-
+              Enable or disable recipient validation, built-in content filter
               ing, or address mapping.
 
        Available in Postfix version 2.2 and later:
@@ -165,8 +167,8 @@ SMTPD(8)                                                              SMTPD(8)
               update incomplete addresses with the domain name in $<a href="postconf.5.html#myorigin">myorigin</a> or
               $<a href="postconf.5.html#mydomain">mydomain</a>; either  don't  rewrite  message  headers  from  other
               clients at all, or rewrite message headers and update incomplete
-              addresses with the domain  specified  in  the  <a href="postconf.5.html#remote_header_rewrite_domain">remote_header_re</a>-
-              <a href="postconf.5.html#remote_header_rewrite_domain">write_domain</a> parameter.
+              addresses with the domain  specified  in  the  remote_header_re‐
+              write_domain parameter.
 
 <b>BEFORE-SMTPD PROXY AGENT</b>
        Available in Postfix version 2.10 and later:
@@ -182,7 +184,7 @@ SMTPD(8)                                                              SMTPD(8)
 <b>AFTER QUEUE EXTERNAL CONTENT INSPECTION CONTROLS</b>
        As  of  version  1.0,  Postfix can be configured to send new mail to an
        external content filter AFTER the mail is queued. This  content  filter
-       is  expected to inject mail back into a (Postfix or other) MTA for fur-
+       is  expected to inject mail back into a (Postfix or other) MTA for fur
        ther delivery. See the <a href="FILTER_README.html">FILTER_README</a> document for details.
 
        <b><a href="postconf.5.html#content_filter">content_filter</a> (empty)</b>
@@ -192,19 +194,19 @@ SMTPD(8)                                                              SMTPD(8)
 <b>BEFORE QUEUE EXTERNAL CONTENT INSPECTION CONTROLS</b>
        As  of  version  2.1, the Postfix SMTP server can be configured to send
        incoming mail to a real-time SMTP-based content filter BEFORE  mail  is
-       queued.  This content filter is expected to inject mail back into Post-
-       fix.  See the <a href="SMTPD_PROXY_README.html">SMTPD_PROXY_README</a> document for details on how to config-
+       queued.  This content filter is expected to inject mail back into Post
+       fix.  See the <a href="SMTPD_PROXY_README.html">SMTPD_PROXY_README</a> document for details on how to config
        ure and operate this feature.
 
        <b><a href="postconf.5.html#smtpd_proxy_filter">smtpd_proxy_filter</a> (empty)</b>
               The hostname and TCP port of the mail filtering proxy server.
 
        <b><a href="postconf.5.html#smtpd_proxy_ehlo">smtpd_proxy_ehlo</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
-              How  the  Postfix SMTP server announces itself to the proxy fil-
+              How  the  Postfix SMTP server announces itself to the proxy fil
               ter.
 
        <b><a href="postconf.5.html#smtpd_proxy_options">smtpd_proxy_options</a> (empty)</b>
-              List of options that control how the Postfix SMTP server  commu-
+              List of options that control how the Postfix SMTP server  commu
               nicates with a before-queue content filter.
 
        <b><a href="postconf.5.html#smtpd_proxy_timeout">smtpd_proxy_timeout</a> (100s)</b>
@@ -215,15 +217,15 @@ SMTPD(8)                                                              SMTPD(8)
        As of version 2.3, Postfix supports the Sendmail version 8 Milter (mail
        filter)  protocol.  These content filters run outside Postfix. They can
        inspect the SMTP command  stream  and  the  message  content,  and  can
-       request  modifications  before mail is queued. For details see the <a href="MILTER_README.html">MIL</a>-
-       <a href="MILTER_README.html">TER_README</a> document.
+       request  modifications  before mail is queued. For details see the MIL‐
+       <a href="TER_README.html">TER_README</a> document.
 
        <b><a href="postconf.5.html#smtpd_milters">smtpd_milters</a> (empty)</b>
               A list of Milter (mail filter) applications for  new  mail  that
               arrives via the Postfix <a href="smtpd.8.html"><b>smtpd</b>(8)</a> server.
 
        <b><a href="postconf.5.html#milter_protocol">milter_protocol</a> (6)</b>
-              The  mail  filter  protocol version and optional protocol exten-
+              The  mail  filter  protocol version and optional protocol exten
               sions for communication with  a  Milter  application;  prior  to
               Postfix 2.6 the default protocol is 2.
 
@@ -232,14 +234,14 @@ SMTPD(8)                                                              SMTPD(8)
               unavailable or mis-configured.
 
        <b><a href="postconf.5.html#milter_macro_daemon_name">milter_macro_daemon_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
-              The {daemon_name} macro value for Milter (mail filter)  applica-
+              The {daemon_name} macro value for Milter (mail filter)  applica
               tions.
 
        <b><a href="postconf.5.html#milter_macro_v">milter_macro_v</a> ($<a href="postconf.5.html#mail_name">mail_name</a> $<a href="postconf.5.html#mail_version">mail_version</a>)</b>
               The {v} macro value for Milter (mail filter) applications.
 
        <b><a href="postconf.5.html#milter_connect_timeout">milter_connect_timeout</a> (30s)</b>
-              The time limit for connecting to a Milter (mail filter) applica-
+              The time limit for connecting to a Milter (mail filter) applica
               tion, and for negotiating protocol options.
 
        <b><a href="postconf.5.html#milter_command_timeout">milter_command_timeout</a> (30s)</b>
@@ -289,7 +291,7 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#receive_override_options">receive_override_options</a> (empty)</b>
-              Enable or disable recipient validation, built-in content filter-
+              Enable or disable recipient validation, built-in content filter
               ing, or address mapping.
 
 <b>EXTERNAL CONTENT INSPECTION CONTROLS</b>
@@ -299,7 +301,7 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#smtpd_authorized_xforward_hosts">smtpd_authorized_xforward_hosts</a> (empty)</b>
-              What  remote  SMTP  clients are allowed to use the XFORWARD fea-
+              What  remote  SMTP  clients are allowed to use the XFORWARD fea
               ture.
 
 <b>SASL AUTHENTICATION CONTROLS</b>
@@ -321,7 +323,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_sasl_security_options">smtpd_sasl_security_options</a> (noanonymous)</b>
               Postfix SMTP server SASL security options; as of Postfix 2.3 the
-              list of available features depends on the SASL server  implemen-
+              list of available features depends on the SASL server  implemen
               tation that is selected with <b><a href="postconf.5.html#smtpd_sasl_type">smtpd_sasl_type</a></b>.
 
        <b><a href="postconf.5.html#smtpd_sender_login_maps">smtpd_sender_login_maps</a> (empty)</b>
@@ -358,7 +360,7 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.5 and later:
 
        <b><a href="postconf.5.html#cyrus_sasl_config_path">cyrus_sasl_config_path</a> (empty)</b>
-              Search path for Cyrus SASL application configuration files, cur-
+              Search path for Cyrus SASL application configuration files, cur
               rently used only to locate the $<a href="postconf.5.html#smtpd_sasl_path">smtpd_sasl_path</a>.conf file.
 
        Available in Postfix version 2.11 and later:
@@ -373,7 +375,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_tls_security_level">smtpd_tls_security_level</a> (empty)</b>
               The  SMTP TLS security level for the Postfix SMTP server; when a
-              non-empty value is specified, this overrides the obsolete param-
+              non-empty value is specified, this overrides the obsolete param
               eters <a href="postconf.5.html#smtpd_use_tls">smtpd_use_tls</a> and <a href="postconf.5.html#smtpd_enforce_tls">smtpd_enforce_tls</a>.
 
        <b><a href="postconf.5.html#smtpd_sasl_tls_security_options">smtpd_sasl_tls_security_options</a> ($<a href="postconf.5.html#smtpd_sasl_security_options">smtpd_sasl_security_options</a>)</b>
@@ -386,25 +388,25 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_tls_CAfile">smtpd_tls_CAfile</a> (empty)</b>
               A  file  containing  (PEM  format)  CA  certificates of root CAs
-              trusted to sign either remote SMTP client certificates or inter-
+              trusted to sign either remote SMTP client certificates or inter
               mediate CA certificates.
 
        <b><a href="postconf.5.html#smtpd_tls_CApath">smtpd_tls_CApath</a> (empty)</b>
               A  directory containing (PEM format) CA certificates of root CAs
-              trusted to sign either remote SMTP client certificates or inter-
+              trusted to sign either remote SMTP client certificates or inter
               mediate CA certificates.
 
        <b><a href="postconf.5.html#smtpd_tls_always_issue_session_ids">smtpd_tls_always_issue_session_ids</a> (yes)</b>
               Force  the  Postfix  SMTP server to issue a TLS session id, even
-              when  TLS  session  caching  is   turned   off   (<a href="postconf.5.html#smtpd_tls_session_cache_database">smtpd_tls_ses</a>-
-              <a href="postconf.5.html#smtpd_tls_session_cache_database">sion_cache_database</a> is empty).
+              when  TLS  session  caching  is   turned   off   (smtpd_tls_ses‐
+              sion_cache_database is empty).
 
        <b><a href="postconf.5.html#smtpd_tls_ask_ccert">smtpd_tls_ask_ccert</a> (no)</b>
               Ask a remote SMTP client for a client certificate.
 
        <b><a href="postconf.5.html#smtpd_tls_auth_only">smtpd_tls_auth_only</a> (no)</b>
               When  TLS  encryption is optional in the Postfix SMTP server, do
-              not announce or accept SASL authentication over unencrypted con-
+              not announce or accept SASL authentication over unencrypted con
               nections.
 
        <b><a href="postconf.5.html#smtpd_tls_ccert_verifydepth">smtpd_tls_ccert_verifydepth</a> (9)</b>
@@ -443,7 +445,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#smtpd_tls_mandatory_exclude_ciphers">smtpd_tls_mandatory_exclude_ciphers</a> (empty)</b>
               Additional  list  of ciphers or cipher types to exclude from the
-              Postfix SMTP server cipher list at mandatory TLS  security  lev-
+              Postfix SMTP server cipher list at mandatory TLS  security  lev
               els.
 
        <b><a href="postconf.5.html#smtpd_tls_mandatory_protocols">smtpd_tls_mandatory_protocols</a> (!SSLv2)</b>
@@ -503,11 +505,11 @@ SMTPD(8)                                                              SMTPD(8)
               use with opportunistic TLS encryption.
 
        <b><a href="postconf.5.html#smtpd_tls_eccert_file">smtpd_tls_eccert_file</a> (empty)</b>
-              File  with the Postfix SMTP server ECDSA certificate in PEM for-
+              File  with the Postfix SMTP server ECDSA certificate in PEM for
               mat.
 
        <b><a href="postconf.5.html#smtpd_tls_eckey_file">smtpd_tls_eckey_file</a> ($<a href="postconf.5.html#smtpd_tls_eccert_file">smtpd_tls_eccert_file</a>)</b>
-              File with the Postfix SMTP server ECDSA private key in PEM  for-
+              File with the Postfix SMTP server ECDSA private key in PEM  for
               mat.
 
        <b><a href="postconf.5.html#smtpd_tls_eecdh_grade">smtpd_tls_eecdh_grade</a> (see 'postconf -d' output)</b>
@@ -525,7 +527,7 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.8 and later:
 
        <b><a href="postconf.5.html#tls_preempt_cipherlist">tls_preempt_cipherlist</a> (no)</b>
-              With SSLv3 and later, use the Postfix SMTP server's cipher pref-
+              With SSLv3 and later, use the Postfix SMTP server's cipher pref
               erence  order  instead  of the remote client's cipher preference
               order.
 
@@ -559,10 +561,24 @@ SMTPD(8)                                                              SMTPD(8)
               Obsolete Postfix &lt; 2.3 control for the Postfix SMTP  server  TLS
               cipher list.
 
+<b>SMTPUTF8 CONTROLS</b>
+       Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+
+       <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (no)</b>
+              Enable experimental SMTPUTF8 support for the protocols described
+              in <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a>..6533.
+
+       <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‐
+              fied mail origin classes.
+
 <b>VERP SUPPORT CONTROLS</b>
-       With  VERP  style delivery, each recipient of a message receives a cus-
+       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-
+       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
@@ -578,13 +594,13 @@ SMTPD(8)                                                              SMTPD(8)
        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>TROUBLE SHOOTING CONTROLS</b>
@@ -604,7 +620,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
               The recipient of postmaster notifications  about  mail  delivery
-              problems that are caused by policy, resource, software or proto-
+              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>
@@ -637,7 +653,7 @@ SMTPD(8)                                                              SMTPD(8)
 
 <b>KNOWN VERSUS UNKNOWN RECIPIENT CONTROLS</b>
        As  of  Postfix  version  2.0, the SMTP server rejects mail for unknown
-       recipients. This prevents the mail queue from clogging up with undeliv-
+       recipients. This prevents the mail queue from clogging up with undeliv
        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.
 
@@ -673,8 +689,8 @@ SMTPD(8)                                                              SMTPD(8)
 
        <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>
               Lookup tables with all names or addresses of local recipients: a
-              recipient address is local when its domain  matches  $<a href="postconf.5.html#mydestination">mydestina</a>-
-              <a href="postconf.5.html#mydestination">tion</a>, $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> or $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>.
+              recipient address is local when its domain  matches  $mydestina‐
+              tion, $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> or $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>.
 
        <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
@@ -693,7 +709,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <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-
+              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.
 
@@ -711,7 +727,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <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-
+              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.
 
@@ -730,7 +746,7 @@ SMTPD(8)                                                              SMTPD(8)
        <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>
-              specifies a list of lookup tables that does not match the recip-
+              specifies a list of lookup tables that does not match the recip
               ient address.
 
 <b>RESOURCE AND RATE CONTROLS</b>
@@ -742,7 +758,7 @@ SMTPD(8)                                                              SMTPD(8)
               this length; upon delivery, long lines are reconstructed.
 
        <b><a href="postconf.5.html#queue_minfree">queue_minfree</a> (0)</b>
-              The minimal amount of free space in bytes in the queue file sys-
+              The minimal amount of free space in bytes in the queue file sys
               tem that is needed to receive mail.
 
        <b><a href="postconf.5.html#message_size_limit">message_size_limit</a> (10240000)</b>
@@ -768,7 +784,7 @@ SMTPD(8)                                                              SMTPD(8)
               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-
+       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
        Postfix version 2.2 and later.
 
@@ -804,8 +820,8 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.9 and later:
 
        <b><a href="postconf.5.html#smtpd_per_record_deadline">smtpd_per_record_deadline</a> (normal: no, overload: 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
+              Change  the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  and  smtpd_start‐
+              tls_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 message).
@@ -869,7 +885,7 @@ 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>
@@ -877,7 +893,7 @@ SMTPD(8)                                                              SMTPD(8)
               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.
 
 <b>ACCESS CONTROLS</b>
@@ -892,7 +908,7 @@ SMTPD(8)                                                              SMTPD(8)
               $<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>
-              What Postfix features match subdomains of "domain.tld" automati-
+              What Postfix features match subdomains of "domain.tld" automati
               cally, instead of requiring an explicit ".domain.tld" pattern.
 
        <b><a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> (empty)</b>
@@ -923,7 +939,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <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-
+              (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>
@@ -974,12 +990,12 @@ SMTPD(8)                                                              SMTPD(8)
               <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a>.
 
 <b>SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS</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-
+       <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.
 
@@ -988,7 +1004,7 @@ SMTPD(8)                                                              SMTPD(8)
               of an address verification request in progress.
 
        <b><a href="postconf.5.html#address_verify_poll_delay">address_verify_poll_delay</a> (3s)</b>
-              The delay between queries for the completion of an address veri-
+              The delay between queries for the completion of an address veri
               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>
@@ -1001,7 +1017,7 @@ SMTPD(8)                                                              SMTPD(8)
 
        <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-
+              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:
@@ -1027,8 +1043,8 @@ SMTPD(8)                                                              SMTPD(8)
               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>-
-              <a href="postconf.5.html#reject_unverified_recipient">ent</a> fails due to a temporary error condition.
+              The  Postfix SMTP server's action when reject_unverified_recipi‐
+              ent fails due to a temporary error condition.
 
        Available with Postfix 2.9 and later:
 
@@ -1089,7 +1105,7 @@ SMTPD(8)                                                              SMTPD(8)
               <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-
+              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.
 
@@ -1101,8 +1117,8 @@ SMTPD(8)                                                              SMTPD(8)
 
        <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>-
-              <a href="postconf.5.html#reject_multi_recipient_bounce">ent_bounce</a> restriction.
+              SMTP  client  request  is  blocked  by  the reject_multi_recipi‐
+              ent_bounce restriction.
 
        <b><a href="postconf.5.html#rbl_reply_maps">rbl_reply_maps</a> (empty)</b>
               Optional lookup tables with RBL response templates.
@@ -1119,8 +1135,8 @@ SMTPD(8)                                                              SMTPD(8)
               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>-
-              <a href="postconf.5.html#reject_unknown_helo_hostname">name</a> fails due to an temporary error condition.
+              The  Postfix SMTP server's action when reject_unknown_helo_host‐
+              name fails due to an 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
@@ -1129,7 +1145,7 @@ SMTPD(8)                                                              SMTPD(8)
 
 <b>MISCELLANEOUS CONTROLS</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>
@@ -1140,7 +1156,7 @@ SMTPD(8)                                                              SMTPD(8)
               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>
@@ -1167,7 +1183,7 @@ 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>
@@ -1197,13 +1213,13 @@ SMTPD(8)                                                              SMTPD(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The mail system name that is prepended to the  process  name  in
-              syslog  records,  so  that  "smtpd" becomes, for example, "post-
+              syslog  records,  so  that  "smtpd" becomes, for example, "post
               fix/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)</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:
index 8d7d38f08b34922ebe4a252570a5ae183ea51235..13264ac9858d0b9ee28ff24e3aa1c20c1c31193b 100644 (file)
@@ -13,7 +13,7 @@ BOUNCE(8)                                                            BOUNCE(8)
        <b>bounce</b> [generic Postfix daemon options]
 
 <b>DESCRIPTION</b>
-       The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon maintains per-message log files with delivery sta-
+       The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon maintains per-message log files with delivery sta
        tus information. Each log file is named after the queue  file  that  it
        corresponds  to,  and  is  kept in a queue subdirectory named after the
        service name in the <a href="master.5.html"><b>master.cf</b></a> file (either  <b>bounce</b>,  <b>defer</b>  or  <b>trace</b>).
@@ -21,15 +21,15 @@ BOUNCE(8)                                                            BOUNCE(8)
 
        The <a href="bounce.8.html"><b>bounce</b>(8)</a> daemon processes two types of service requests:
 
-       <b>o</b>      Append a recipient (non-)delivery status record to a per-message
+       ·      Append a recipient (non-)delivery status record to a per-message
               log file.
 
-       <b>o</b>      Enqueue a delivery status notification message, with a copy of a
+       ·      Enqueue a delivery status notification message, with a copy of a
               per-message log file and of the corresponding message.  When the
               delivery status notification message is  enqueued  successfully,
               the per-message log file is deleted.
 
-       The  software does a best notification effort. A non-delivery notifica-
+       The  software does a best notification effort. A non-delivery notifica
        tion is sent even when the log file or the original message  cannot  be
        read.
 
@@ -46,6 +46,9 @@ BOUNCE(8)                                                            BOUNCE(8)
        <a href="http://tools.ietf.org/html/rfc3464">RFC 3464</a> (Delivery Status Notifications)
        <a href="http://tools.ietf.org/html/rfc3834">RFC 3834</a> (Auto-Submitted: message header)
        <a href="http://tools.ietf.org/html/rfc5322">RFC 5322</a> (Internet Message Format)
+       <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a> (Internationalized SMTP)
+       <a href="http://tools.ietf.org/html/rfc6532">RFC 6532</a> (Internationalized Message Format)
+       <a href="http://tools.ietf.org/html/rfc6533">RFC 6533</a> (Internationalized Delivery Status Notifications)
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).
@@ -67,8 +70,8 @@ BOUNCE(8)                                                            BOUNCE(8)
               Postfix versions before 2.0.
 
        <b><a href="postconf.5.html#bounce_notice_recipient">bounce_notice_recipient</a> (postmaster)</b>
-              The recipient of postmaster notifications with the message head-
-              ers of mail that Postfix did not deliver and of  SMTP  conversa-
+              The recipient of postmaster notifications with the message head
+              ers of mail that Postfix did not deliver and of  SMTP  conversa
               tion transcripts of mail that Postfix did not receive.
 
        <b><a href="postconf.5.html#bounce_size_limit">bounce_size_limit</a> (50000)</b>
@@ -79,7 +82,7 @@ BOUNCE(8)                                                            BOUNCE(8)
               Pathname of a configuration file with bounce message  templates.
 
        <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>
@@ -87,7 +90,7 @@ BOUNCE(8)                                                            BOUNCE(8)
               request before it is terminated by a built-in watchdog timer.
 
        <b><a href="postconf.5.html#delay_notice_recipient">delay_notice_recipient</a> (postmaster)</b>
-              The recipient of postmaster notifications with the message head-
+              The recipient of postmaster notifications with the message head
               ers of mail that cannot be delivered within  $<a href="postconf.5.html#delay_warning_time">delay_warning_time</a>
               time units.
 
@@ -137,9 +140,15 @@ BOUNCE(8)                                                            BOUNCE(8)
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
               The mail system name that is prepended to the  process  name  in
-              syslog  records,  so  that  "smtpd" becomes, for example, "post-
+              syslog  records,  so  that  "smtpd" becomes, for example, "post
               fix/smtpd".
 
+       Available in Postfix 2.12 and later:
+
+       <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‐
+              fied mail origin classes.
+
 <b>FILES</b>
        /var/spool/postfix/bounce/* non-delivery records
        /var/spool/postfix/defer/* non-delivery records
index 82da5940dcf5ed6060a99ea2ffecab70922a6ade..7e3ce33a069004486ac6b2feb443190fb91548c1 100644 (file)
@@ -72,8 +72,8 @@ VERIFY(8)                                                            VERIFY(8)
        principle.
 
 <b>CONFIGURATION PARAMETERS</b>
-       Changes to <a href="postconf.5.html"><b>main.cf</b></a> are not picked up automatically, as  <a href="verify.8.html"><b>verify</b>(8)</a>  pro-
-       cesses are long-lived. Use the command "<b>postfix reload</b>" after a config-
+       Changes to <a href="postconf.5.html"><b>main.cf</b></a> are not picked up automatically, as  <a href="verify.8.html"><b>verify</b>(8)</a>  pro
+       cesses are long-lived. Use the command "<b>postfix reload</b>" after a config
        uration change.
 
        The text below provides only a parameter summary. See  <a href="postconf.5.html"><b>postconf</b>(5)</a>  for
@@ -116,7 +116,7 @@ VERIFY(8)                                                            VERIFY(8)
        Available with Postfix 2.7 and later:
 
        <b><a href="postconf.5.html#address_verify_cache_cleanup_interval">address_verify_cache_cleanup_interval</a> (12h)</b>
-              The amount of time between <a href="verify.8.html"><b>verify</b>(8)</a> address verification  data-
+              The amount of time between <a href="verify.8.html"><b>verify</b>(8)</a> address verification  data
               base cleanup runs.
 
 <b>PROBE MESSAGE ROUTING CONTROLS</b>
@@ -125,15 +125,15 @@ VERIFY(8)                                                            VERIFY(8)
        message routing mechanisms.
 
        <b><a href="postconf.5.html#address_verify_relayhost">address_verify_relayhost</a> ($<a href="postconf.5.html#relayhost">relayhost</a>)</b>
-              Overrides  the <a href="postconf.5.html#relayhost">relayhost</a> parameter setting for address verifica-
+              Overrides  the <a href="postconf.5.html#relayhost">relayhost</a> parameter setting for address verifica
               tion probes.
 
        <b><a href="postconf.5.html#address_verify_transport_maps">address_verify_transport_maps</a> ($<a href="postconf.5.html#transport_maps">transport_maps</a>)</b>
-              Overrides the <a href="postconf.5.html#transport_maps">transport_maps</a> parameter setting for address veri-
+              Overrides the <a href="postconf.5.html#transport_maps">transport_maps</a> parameter setting for address veri
               fication probes.
 
        <b><a href="postconf.5.html#address_verify_local_transport">address_verify_local_transport</a> ($<a href="postconf.5.html#local_transport">local_transport</a>)</b>
-              Overrides the <a href="postconf.5.html#local_transport">local_transport</a> parameter setting for address ver-
+              Overrides the <a href="postconf.5.html#local_transport">local_transport</a> parameter setting for address ver
               ification probes.
 
        <b><a href="postconf.5.html#address_verify_virtual_transport">address_verify_virtual_transport</a> ($<a href="postconf.5.html#virtual_transport">virtual_transport</a>)</b>
@@ -141,7 +141,7 @@ VERIFY(8)                                                            VERIFY(8)
               verification probes.
 
        <b><a href="postconf.5.html#address_verify_relay_transport">address_verify_relay_transport</a> ($<a href="postconf.5.html#relay_transport">relay_transport</a>)</b>
-              Overrides the <a href="postconf.5.html#relay_transport">relay_transport</a> parameter setting for address ver-
+              Overrides the <a href="postconf.5.html#relay_transport">relay_transport</a> parameter setting for address ver
               ification probes.
 
        <b><a href="postconf.5.html#address_verify_default_transport">address_verify_default_transport</a> ($<a href="postconf.5.html#default_transport">default_transport</a>)</b>
@@ -150,29 +150,36 @@ VERIFY(8)                                                            VERIFY(8)
 
        Available in Postfix 2.3 and later:
 
-       <b><a href="postconf.5.html#address_verify_sender_dependent_relayhost_maps">address_verify_sender_dependent_relayhost_maps</a>          ($<a href="postconf.5.html#sender_dependent_relayhost_maps">sender_depen</a>-</b>
-       <b><a href="postconf.5.html#sender_dependent_relayhost_maps">dent_relayhost_maps</a>)</b>
+       <b><a href="postconf.5.html#address_verify_sender_dependent_relayhost_maps">address_verify_sender_dependent_relayhost_maps</a>          ($sender_depen</b>‐\b
+       <b>dent_relayhost_maps)</b>
               Overrides  the <a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a> parameter setting
               for address verification probes.
 
        Available in Postfix 2.7 and later:
 
-       <b><a href="postconf.5.html#address_verify_sender_dependent_default_transport_maps">address_verify_sender_dependent_default_transport_maps</a>  ($<a href="postconf.5.html#sender_dependent_default_transport_maps">sender_depen</a>-</b>
-       <b><a href="postconf.5.html#sender_dependent_default_transport_maps">dent_default_transport_maps</a>)</b>
+       <b><a href="postconf.5.html#address_verify_sender_dependent_default_transport_maps">address_verify_sender_dependent_default_transport_maps</a>  ($sender_depen</b>‐\b
+       <b>dent_default_transport_maps)</b>
               Overrides the <a href="postconf.5.html#sender_dependent_default_transport_maps">sender_dependent_default_transport_maps</a>  parameter
               setting for address verification probes.
 
+<b>SMTPUTF8 CONTROLS</b>
+       Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+
+       <b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
+              Enable  SMTPUTF8  autodetection  for  the  specified mail origin
+              classes.
+
 <b>MISCELLANEOUS CONTROLS</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#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#process_id">process_id</a> (read-only)</b>
@@ -188,8 +195,8 @@ VERIFY(8)                                                            VERIFY(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              The mail system name that is prepended to the  process  name  in
-              syslog  records,  so  that  "smtpd" becomes, for example, "post-
+              The  mail  system  name that is prepended to the process name in
+              syslog records, so that "smtpd"  becomes,  for  example,  "post‐
               fix/smtpd".
 
 <b>SEE ALSO</b>
index de8139dfa20e392417503b7725026a66bdb59665..80c1e3c62464980e4c7d128f948392e05745b0dc 100644 (file)
@@ -49,6 +49,8 @@
 #      Do not build with Linux EPOLL support.
 #      By default, EPOLL support is compiled in on platforms that
 #      are known to support it.
+# .IP \fB-DNO_EAI\fR
+#      Do not build with EAI (SMTPUTF8) support.
 # .IP \fB-DNO_IPV6\fR
 #      Do not build with IPv6 support.
 #      By default, IPv6 support is compiled in on platforms that
@@ -426,7 +428,7 @@ EOF
                : ${SHLIB_SUFFIX=.so}
                : ${SHLIB_CFLAGS=-fPIC}
                : ${SHLIB_LD='gcc -shared -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+               : ${SHLIB_RPATH='-Wl,--enable-new-dtags -Wl,-rpath,${SHLIB_DIR}'}
                : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
                : ${PLUGIN_LD='gcc -shared'}
                ;;
@@ -464,7 +466,7 @@ EOF
                : ${SHLIB_SUFFIX=.so}
                : ${SHLIB_CFLAGS=-fPIC}
                : ${SHLIB_LD='gcc -shared -Wl,-soname,${LIB}'}
-               : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+               : ${SHLIB_RPATH='-Wl,--enable-new-dtags -Wl,-rpath,${SHLIB_DIR}'}
                : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
                : ${PLUGIN_LD='gcc -shared'}
                ;;
@@ -658,6 +660,45 @@ EOF
                   rm -f makedefs.test makedefs.test.[co]
 esac
 
+#
+# Look for ICU and enable unicode email if available. This tests
+# a different function that Postfix uses in order to avoid having UTF8
+# in this file. The two functions use the same data structures, so they
+# should be equivalent for testing purposes.
+#
+case "$CCARGS" in
+ *-DNO_EAI*) ;;
+          *) trap 'rm -f makedefs.test makedefs.test.[co]' 1 2 3 15
+             cat >makedefs.test.c <<'EOF'
+#include <unicode/uidna.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv)
+{
+    char    buf[1024];
+    UErrorCode error = U_ZERO_ERROR;
+    UIDNAInfo info = UIDNA_INFO_INITIALIZER;
+    UIDNA  *idna = uidna_openUTS46(UIDNA_DEFAULT, &error);
+
+    exit(uidna_labelToUnicodeUTF8(idna,
+                                 "xn--lgbbat1ad8j",    /* an arabic TLD */
+                                 15,
+                                 buf,
+                                 sizeof(buf),
+                                 &info,
+                                 &error) != 14);
+}
+EOF
+             ${CC-gcc} -o makedefs.test makedefs.test.c -I/usr/local/include \
+               -L/usr/local/lib -licuuc >/dev/null 2>&1
+             if ./makedefs.test 2>/dev/null ; then
+                 SYSLIBS="$SYSLIBS -L/usr/local/lib -licuuc"
+             else
+                 CCARGS="$CCARGS -DNO_EAI"
+             fi
+             rm -f makedefs.test makedefs.test.[co]
+esac
+
 #
 # OpenSSL has no configuration query utility, but we don't try to
 # guess. We assume includes in /usr/include/openssl and libraries in
index 8d6e461e19bc1732d996c789012a4b1208ce07d3..537f8340cb7b563a1fd9baf49a8f338e8ba3e9f8 100644 (file)
@@ -388,12 +388,6 @@ and \fBpostmap\fR(1) commands.
 .IP "\fBdelay_warning_time (0h)\fR"
 The time after which the sender receives a copy of the message
 headers of mail that is still queued.
-.IP "\fBenable_errors_to (no)\fR"
-Report mail delivery errors to the address specified with the
-non-standard Errors-To: message header, instead of the envelope
-sender address (this feature is removed with Postfix version 2.2, is
-turned off by default with Postfix version 2.1, and is always turned on
-with older Postfix versions).
 .IP "\fBmail_owner (postfix)\fR"
 The UNIX system account that owns the Postfix queue and most Postfix
 daemon processes.
index 31c6253e3b196e1073961423d684b15ae28c588a..ae33675b87f11822e9b615e4d75f4abb81df7ab3 100644 (file)
@@ -11191,6 +11191,69 @@ key. This is intended behavior.
 .PP
 This feature is available in Postfix 2.2 and later. With
 Postfix 2.3 and later use smtpd_tls_security_level instead.
+.SH smtputf8_autodetect_classes (default: sendmail, verify)
+Detect that a message requires SMTPUTF8 support for the specified
+mail origin classes.  This is a workaround to avoid chicken-and-egg
+problems during the initial SMTPUTF8 roll-out in environments with
+pre-existing mail flows that contain UTF8. Those mail flows should
+not break because Postfix suddenly refuses to deliver such mail
+to down-stream MTAs that don't announce SMTPUTF8 support.
+.PP
+The problem is that Postfix cannot rely solely on the sender's
+declaration that a message requires SMTPUTF8 support, because UTF8
+may be introduced during local processing (for example, the client
+hostname in Postfix's Received: header, adding @$myorigin or
+\&.$mydomain to an incomplete address, address rewriting, alias
+expansion, automatic BCC recipients, local forwarding, and changes
+made by header checks or Milter applications).
+.PP
+For now, the default is to enable "SMTPUTF8 required" autodetection
+only for Postfix sendmail command-line submissions and address
+verification probes.  This may change once SMTPUTF8 support achieves
+world domination.  However, sites that add UTF8 content via local
+processing (see above) should autodetect the need for SMTPUTF8
+support for all email.
+.PP
+Specify one or more of the following:
+.IP "\fB sendmail \fR"
+Submission with the Postfix
+\fBsendmail\fR(1) command.
+.br
+.IP "\fB smtpd \fR"
+Mail received with the \fBsmtpd\fR(8)
+daemon.
+.br
+.IP "\fB qmqpd \fR"
+Mail received with the \fBqmqpd\fR(8)
+daemon.
+.br
+.IP "\fB forward \fR"
+Local forwarding or aliasing.
+.br
+.IP "\fB bounce \fR"
+Submission by the \fBbounce\fR(8) daemon.
+.br
+.IP "\fB notify \fR"
+Postmaster notification from the
+\fBsmtp\fR(8) or \fBsmtpd\fR(8) daemon.
+.br
+.IP "\fB verify \fR"
+Address verification probe from the
+\fBverify\fR(8) daemon.
+.br
+.IP "\fB all \fR"
+Enable SMTPUTF8 autodetection for all
+mail.
+.br
+.br
+.PP
+This feature is available in Postfix 2.12 and later.
+.SH smtputf8_enable (default: no)
+Enable experimental SMTPUTF8 support for the protocols described
+in RFC 6531..6533. This requires that Postfix is built to support
+these protocols.
+.PP
+This feature is available in Postfix 2.12 and later.
 .SH soft_bounce (default: no)
 Safety net to keep mail queued that would otherwise be returned to
 the sender.  This parameter disables locally-generated bounces,
@@ -11273,6 +11336,12 @@ from poorly written software.
 .PP
 By default, the Postfix SMTP server accepts RFC 822 syntax in MAIL
 FROM and RCPT TO addresses.
+.SH strict_smtputf8 (default: no)
+Enable stricter enforcement of the SMTPUTF8 protocol. The Postfix
+SMTP server accepts UTF8 sender or recipient addresses only when
+the client requests an SMTPUTF8 mail transaction.
+.PP
+This feature is available in Postfix 2.12 and later.
 .SH sun_mailtool_compatibility (default: no)
 Obsolete SUN mailtool compatibility feature. Instead, use
 "mailbox_delivery_lock = dotlock".
index 41f5183d43d98deddd76cb976039aabb08e492c0..76a315357b2346ff47b028650a6257c3f38f73d4 100644 (file)
@@ -48,6 +48,9 @@ RFC 3462 (Delivery Status Notifications)
 RFC 3464 (Delivery Status Notifications)
 RFC 3834 (Auto-Submitted: message header)
 RFC 5322 (Internet Message Format)
+RFC 6531 (Internationalized SMTP)
+RFC 6532 (Internationalized Message Format)
+RFC 6533 (Internationalized Delivery Status Notifications)
 .SH DIAGNOSTICS
 .ad
 .fi
@@ -123,6 +126,11 @@ The syslog facility of Postfix logging.
 .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
 The mail system name that is prepended to the process name in syslog
 records, so that "smtpd" becomes, for example, "postfix/smtpd".
+.PP
+Available in Postfix 2.12 and later:
+.IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+Detect that a message requires SMTPUTF8 support for the specified
+mail origin classes.
 .SH "FILES"
 .na
 .nf
index 758a5dcab367e8f5cc4e8febd53b9836695cfcba..e5c9e0d709f287cbf094ab537c0d3ff237768c8b 100644 (file)
@@ -66,6 +66,15 @@ specified \fItransport:destination\fR.
 .IP "\fBreceive_override_options (empty)\fR"
 Enable or disable recipient validation, built-in content
 filtering, or address mapping.
+.SH "SMTPUTF8 CONTROLS"
+.na
+.nf
+.ad
+.fi
+Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+.IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+Detect that a message requires SMTPUTF8 support for the specified
+mail origin classes.
 .SH "RESOURCE AND RATE CONTROLS"
 .na
 .nf
index f723f1be93ad7567be1333578fe1b4e8844489b8..6d8d116b7bf719ccbe1f176f49905aa7dc0bcd98 100644 (file)
@@ -110,6 +110,8 @@ RFC 3461 (SMTP DSN Extension)
 RFC 3463 (Enhanced Status Codes)
 RFC 4954 (AUTH command)
 RFC 5321 (SMTP protocol)
+RFC 6531 (Internationalized SMTP)
+RFC 6533 (Internationalized Delivery Status Notifications)
 .SH DIAGNOSTICS
 .ad
 .fi
@@ -605,6 +607,18 @@ Available in Postfix version 2.11 and later:
 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).
+.SH "SMTPUTF8 CONTROLS"
+.na
+.nf
+.ad
+.fi
+Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+.IP "\fBsmtputf8_enable (no)\fR"
+Enable experimental SMTPUTF8 support for the protocols described
+in RFC 6531..6533.
+.IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+Enable SMTPUTF8 autodetection for the specified mail origin
+classes.
 .SH "TROUBLE SHOOTING CONTROLS"
 .na
 .nf
index e521a89aaa8d7bfafa2ccf58a3bed707ebba0ac6..91a3a35f09672dc8e65c1197aa303e5eda9b4ee2 100644 (file)
@@ -63,6 +63,8 @@ RFC 3848 (ESMTP transmission types)
 RFC 4409 (Message submission)
 RFC 4954 (AUTH command)
 RFC 5321 (SMTP protocol)
+RFC 6531 (Internationalized SMTP)
+RFC 6533 (Internationalized Delivery Status Notifications)
 .SH DIAGNOSTICS
 .ad
 .fi
@@ -506,6 +508,20 @@ and require that clients use TLS encryption.
 .IP "\fBsmtpd_tls_cipherlist (empty)\fR"
 Obsolete Postfix < 2.3 control for the Postfix SMTP server TLS
 cipher list.
+.SH "SMTPUTF8 CONTROLS"
+.na
+.nf
+.ad
+.fi
+Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+.IP "\fBsmtputf8_enable (no)\fR"
+Enable experimental SMTPUTF8 support for the protocols described
+in RFC 6531..6533.
+.IP "\fBstrict_smtputf8 (no)\fR"
+Enable stricter enforcement of the SMTPUTF8 protocol.
+.IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+Detect that a message requires SMTPUTF8 support for the specified
+mail origin classes.
 .SH "VERP SUPPORT CONTROLS"
 .na
 .nf
index 92f380cce7bb2a18f69166bef8d144d80a43b101..5f579a18df177fd9664672ab0d44ea69194ee61b 100644 (file)
@@ -168,6 +168,15 @@ Available in Postfix 2.7 and later:
 .IP "\fBaddress_verify_sender_dependent_default_transport_maps ($sender_dependent_default_transport_maps)\fR"
 Overrides the sender_dependent_default_transport_maps parameter
 setting for address verification probes.
+.SH "SMTPUTF8 CONTROLS"
+.na
+.nf
+.ad
+.fi
+Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+.IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+Enable SMTPUTF8 autodetection for the specified mail origin
+classes.
 .SH "MISCELLANEOUS CONTROLS"
 .na
 .nf
index 513ab23b9b8bae71030c48eb37fae61a36eb8774..61b9a92f9f6ae0073e47a404d6010d16a3322e1c 100755 (executable)
@@ -1049,6 +1049,12 @@ while (<>) {
     s;\btlsproxy_tls_security_level\b;<a href="postconf.5.html#tlsproxy_tls_security_level">$&</a>;g;
     s;\btlsproxy_use_tls\b;<a href="postconf.5.html#tlsproxy_use_tls">$&</a>;g;
 
+    # SMTPUTF8
+
+    s;\bsmtputf8_enable\b;<a href="postconf.5.html#smtputf8_enable">$&</a>;g;
+    s;\bstrict_smtputf8\b;<a href="postconf.5.html#strict_smtputf8">$&</a>;g;
+    s;\bsmtputf8_autodetect_classes\b;<a href="postconf.5.html#smtputf8_autodetect_classes">$&</a>;g;
+
     # Service-defined parameters...
 
     s;\bpolicy_time_limit\b;<a href="postconf.5.html#transport_time_limit">$&</a>;g;
index 2e43d3242c363d7b02026cbea969297c596f5634..7636ce69058f214b92349310368cc98d48d28ee6 100644 (file)
@@ -730,6 +730,10 @@ this feature.  </td> </tr>
 EPOLL support.  By default, EPOLL support is compiled in on platforms
 that are known to support this feature. </td> </tr>
 
+<tr> <td> </td> <td> -DNO_EAI </td> <td> Do not build with EAI
+(SMTPUTF8) support. By default, EAI support is compiled in when 
+the "icuuc" library and header files are found.  </td> </tr>
+
 <tr> <td> </td> <td> -DNO_IPV6 </td> <td> Do not build with IPv6
 support. By default, IPv6 support is compiled in on platforms that
 are known to have IPv6 support. Note: this directive is for debugging
index 5b614ccbf955f57ea4c70065454039bdd782fb8f..45d49c0923d6f0e0fc9ba7db36ec1a226be0a97b 100644 (file)
@@ -16042,3 +16042,75 @@ request before giving up. Specify a value greater than zero. </p>
 service request. Specify a value greater than zero. </p>
 
 <p> This feature is available in Postfix 2.12 and later. </p>
+
+%PARAM smtputf8_enable no
+
+<p> Enable experimental SMTPUTF8 support for the protocols described
+in RFC 6531..6533. This requires that Postfix is built to support
+these protocols. </p>
+
+<p> This feature is available in Postfix 2.12 and later. </p>
+
+%PARAM strict_smtputf8 no
+
+<p> Enable stricter enforcement of the SMTPUTF8 protocol. The Postfix
+SMTP server accepts UTF8 sender or recipient addresses only when
+the client requests an SMTPUTF8 mail transaction. </p>
+
+<p> This feature is available in Postfix 2.12 and later. </p>
+
+%PARAM smtputf8_autodetect_classes sendmail, verify
+
+<p> Detect that a message requires SMTPUTF8 support for the specified
+mail origin classes.  This is a workaround to avoid chicken-and-egg
+problems during the initial SMTPUTF8 roll-out in environments with
+pre-existing mail flows that contain UTF8. Those mail flows should
+not break because Postfix suddenly refuses to deliver such mail
+to down-stream MTAs that don't announce SMTPUTF8 support.  </p>
+
+<p> The problem is that Postfix cannot rely solely on the sender's
+declaration that a message requires SMTPUTF8 support, because UTF8
+may be introduced during local processing (for example, the client
+hostname in Postfix's Received: header, adding @$myorigin or
+.$mydomain to an incomplete address, address rewriting, alias
+expansion, automatic BCC recipients, local forwarding, and changes
+made by header checks or Milter applications). </p>
+
+<p> For now, the default is to enable "SMTPUTF8 required" autodetection
+only for Postfix sendmail command-line submissions and address
+verification probes.  This may change once SMTPUTF8 support achieves
+world domination.  However, sites that add UTF8 content via local
+processing (see above) should autodetect the need for SMTPUTF8
+support for all email.</p>
+
+<p> Specify one or more of the following: </p>
+
+<dl compact>
+
+<dt> <b> sendmail </b> </dt> <dd> Submission with the Postfix
+sendmail(1) command. </dd>
+
+<dt> <b> smtpd </b> </dt> <dd> Mail received with the smtpd(8)
+daemon. </dd>
+
+<dt> <b> qmqpd </b> </dt> <dd> Mail received with the qmqpd(8)
+daemon. </dd>
+
+<dt> <b> forward </b> </dt> <dd> Local forwarding or aliasing.
+</dd>
+
+<dt> <b> bounce </b> </dt> <dd> Submission by the bounce(8) daemon.
+</dd>
+
+<dt> <b> notify </b> </dt> <dd> Postmaster notification from the
+smtp(8) or smtpd(8) daemon. </dd>
+
+<dt> <b> verify </b> </dt> <dd> Address verification probe from the
+verify(8) daemon.  </dd>
+
+<dt> <b> all </b> </dt> <dd> Enable SMTPUTF8 autodetection for all
+mail. </dd>
+
+</dl>
+
+<p> This feature is available in Postfix 2.12 and later. </p>
index f070b21820cda0e40f8cc38ae96b7036356a364c..c73d71133a48b54506a98b7f9b01c63e7b74e6e9 100644 (file)
@@ -169,16 +169,18 @@ bounce_notify_service.o: ../../include/deliver_request.h
 bounce_notify_service.o: ../../include/dsn.h
 bounce_notify_service.o: ../../include/dsn_buf.h
 bounce_notify_service.o: ../../include/dsn_mask.h
-bounce_notify_service.o: ../../include/int_filt.h
+bounce_notify_service.o: ../../include/iostuff.h
 bounce_notify_service.o: ../../include/mail_addr.h
 bounce_notify_service.o: ../../include/mail_error.h
 bounce_notify_service.o: ../../include/mail_params.h
+bounce_notify_service.o: ../../include/mail_proto.h
 bounce_notify_service.o: ../../include/mail_queue.h
 bounce_notify_service.o: ../../include/msg.h
 bounce_notify_service.o: ../../include/msg_stats.h
 bounce_notify_service.o: ../../include/name_mask.h
 bounce_notify_service.o: ../../include/post_mail.h
 bounce_notify_service.o: ../../include/rcpt_buf.h
+bounce_notify_service.o: ../../include/rec_type.h
 bounce_notify_service.o: ../../include/recipient_list.h
 bounce_notify_service.o: ../../include/sys_defs.h
 bounce_notify_service.o: ../../include/vbuf.h
@@ -195,7 +197,6 @@ bounce_notify_util.o: ../../include/dsn.h
 bounce_notify_util.o: ../../include/dsn_buf.h
 bounce_notify_util.o: ../../include/dsn_mask.h
 bounce_notify_util.o: ../../include/events.h
-bounce_notify_util.o: ../../include/int_filt.h
 bounce_notify_util.o: ../../include/iostuff.h
 bounce_notify_util.o: ../../include/is_header.h
 bounce_notify_util.o: ../../include/lex_822.h
@@ -233,16 +234,18 @@ bounce_notify_verp.o: ../../include/deliver_request.h
 bounce_notify_verp.o: ../../include/dsn.h
 bounce_notify_verp.o: ../../include/dsn_buf.h
 bounce_notify_verp.o: ../../include/dsn_mask.h
-bounce_notify_verp.o: ../../include/int_filt.h
+bounce_notify_verp.o: ../../include/iostuff.h
 bounce_notify_verp.o: ../../include/mail_addr.h
 bounce_notify_verp.o: ../../include/mail_error.h
 bounce_notify_verp.o: ../../include/mail_params.h
+bounce_notify_verp.o: ../../include/mail_proto.h
 bounce_notify_verp.o: ../../include/mail_queue.h
 bounce_notify_verp.o: ../../include/msg.h
 bounce_notify_verp.o: ../../include/msg_stats.h
 bounce_notify_verp.o: ../../include/name_mask.h
 bounce_notify_verp.o: ../../include/post_mail.h
 bounce_notify_verp.o: ../../include/rcpt_buf.h
+bounce_notify_verp.o: ../../include/rec_type.h
 bounce_notify_verp.o: ../../include/recipient_list.h
 bounce_notify_verp.o: ../../include/sys_defs.h
 bounce_notify_verp.o: ../../include/vbuf.h
@@ -260,15 +263,17 @@ bounce_one_service.o: ../../include/deliver_request.h
 bounce_one_service.o: ../../include/dsn.h
 bounce_one_service.o: ../../include/dsn_buf.h
 bounce_one_service.o: ../../include/dsn_mask.h
-bounce_one_service.o: ../../include/int_filt.h
+bounce_one_service.o: ../../include/iostuff.h
 bounce_one_service.o: ../../include/mail_addr.h
 bounce_one_service.o: ../../include/mail_error.h
 bounce_one_service.o: ../../include/mail_params.h
+bounce_one_service.o: ../../include/mail_proto.h
 bounce_one_service.o: ../../include/msg.h
 bounce_one_service.o: ../../include/msg_stats.h
 bounce_one_service.o: ../../include/name_mask.h
 bounce_one_service.o: ../../include/post_mail.h
 bounce_one_service.o: ../../include/rcpt_buf.h
+bounce_one_service.o: ../../include/rec_type.h
 bounce_one_service.o: ../../include/recipient_list.h
 bounce_one_service.o: ../../include/sys_defs.h
 bounce_one_service.o: ../../include/vbuf.h
@@ -316,16 +321,18 @@ bounce_trace_service.o: ../../include/deliver_request.h
 bounce_trace_service.o: ../../include/dsn.h
 bounce_trace_service.o: ../../include/dsn_buf.h
 bounce_trace_service.o: ../../include/dsn_mask.h
-bounce_trace_service.o: ../../include/int_filt.h
+bounce_trace_service.o: ../../include/iostuff.h
 bounce_trace_service.o: ../../include/mail_addr.h
 bounce_trace_service.o: ../../include/mail_error.h
 bounce_trace_service.o: ../../include/mail_params.h
+bounce_trace_service.o: ../../include/mail_proto.h
 bounce_trace_service.o: ../../include/mail_queue.h
 bounce_trace_service.o: ../../include/msg.h
 bounce_trace_service.o: ../../include/msg_stats.h
 bounce_trace_service.o: ../../include/name_mask.h
 bounce_trace_service.o: ../../include/post_mail.h
 bounce_trace_service.o: ../../include/rcpt_buf.h
+bounce_trace_service.o: ../../include/rec_type.h
 bounce_trace_service.o: ../../include/recipient_list.h
 bounce_trace_service.o: ../../include/sys_defs.h
 bounce_trace_service.o: ../../include/vbuf.h
@@ -340,15 +347,17 @@ bounce_warn_service.o: ../../include/cleanup_user.h
 bounce_warn_service.o: ../../include/dsn.h
 bounce_warn_service.o: ../../include/dsn_buf.h
 bounce_warn_service.o: ../../include/dsn_mask.h
-bounce_warn_service.o: ../../include/int_filt.h
+bounce_warn_service.o: ../../include/iostuff.h
 bounce_warn_service.o: ../../include/mail_addr.h
 bounce_warn_service.o: ../../include/mail_error.h
 bounce_warn_service.o: ../../include/mail_params.h
+bounce_warn_service.o: ../../include/mail_proto.h
 bounce_warn_service.o: ../../include/mail_queue.h
 bounce_warn_service.o: ../../include/msg.h
 bounce_warn_service.o: ../../include/name_mask.h
 bounce_warn_service.o: ../../include/post_mail.h
 bounce_warn_service.o: ../../include/rcpt_buf.h
+bounce_warn_service.o: ../../include/rec_type.h
 bounce_warn_service.o: ../../include/recipient_list.h
 bounce_warn_service.o: ../../include/sys_defs.h
 bounce_warn_service.o: ../../include/vbuf.h
index 3c52e7aea5e44f90ff01d0d4af19812cdaf1f433..ec76f38f3ec9429a2c9355b2d9b6715ecf7a6244 100644 (file)
@@ -40,6 +40,9 @@
 /*     RFC 3464 (Delivery Status Notifications)
 /*     RFC 3834 (Auto-Submitted: message header)
 /*     RFC 5322 (Internet Message Format)
+/*     RFC 6531 (Internationalized SMTP)
+/*     RFC 6532 (Internationalized Message Format)
+/*     RFC 6533 (Internationalized Delivery Status Notifications)
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /* CONFIGURATION PARAMETERS
 /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
 /*     The mail system name that is prepended to the process name in syslog
 /*     records, so that "smtpd" becomes, for example, "postfix/smtpd".
+/* .PP
+/*     Available in Postfix 2.12 and later:
+/* .IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+/*     Detect that a message requires SMTPUTF8 support for the specified
+/*     mail origin classes.
 /* FILES
 /*     /var/spool/postfix/bounce/* non-delivery records
 /*     /var/spool/postfix/defer/* non-delivery records
@@ -275,11 +283,12 @@ static int bounce_append_proto(char *service_name, VSTREAM *client)
 
 static int bounce_notify_proto(char *service_name, VSTREAM *client,
                                int (*service) (int, char *, char *, char *,
-                                               char *, char *, char *, int,
+                                          char *, int, char *, char *, int,
                                                        BOUNCE_TEMPLATES *))
 {
     const char *myname = "bounce_notify_proto";
     int     flags;
+    int     smtputf8;
     int     dsn_ret;
 
     /*
@@ -290,10 +299,11 @@ static int bounce_notify_proto(char *service_name, VSTREAM *client,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, &smtputf8,
                            ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                            ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                            ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, &dsn_ret,
-                           ATTR_TYPE_END) != 7) {
+                           ATTR_TYPE_END) != 8) {
        msg_warn("malformed request");
        return (-1);
     }
@@ -311,9 +321,10 @@ static int bounce_notify_proto(char *service_name, VSTREAM *client,
     }
     printable(STR(dsn_envid), '?');
     if (msg_verbose)
-       msg_info("%s: flags=0x%x service=%s queue=%s id=%s encoding=%s sender=%s envid=%s ret=0x%x",
+       msg_info("%s: flags=0x%x service=%s queue=%s id=%s encoding=%s smtputf8=%d sender=%s envid=%s ret=0x%x",
                 myname, flags, service_name, STR(queue_name), STR(queue_id),
-                STR(encoding), STR(sender), STR(dsn_envid), dsn_ret);
+                STR(encoding), smtputf8, STR(sender), STR(dsn_envid),
+                dsn_ret);
 
     /*
      * On request by the client, set up a trap to delete the log file in case
@@ -326,7 +337,7 @@ static int bounce_notify_proto(char *service_name, VSTREAM *client,
      * Execute the request.
      */
     return (service(flags, service_name, STR(queue_name),
-                   STR(queue_id), STR(encoding),
+                   STR(queue_id), STR(encoding), smtputf8,
                    STR(sender), STR(dsn_envid), dsn_ret,
                    bounce_templates));
 }
@@ -337,6 +348,7 @@ static int bounce_verp_proto(char *service_name, VSTREAM *client)
 {
     const char *myname = "bounce_verp_proto";
     int     flags;
+    int     smtputf8;
     int     dsn_ret;
 
     /*
@@ -347,11 +359,12 @@ static int bounce_verp_proto(char *service_name, VSTREAM *client)
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, &smtputf8,
                            ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                            ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                            ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, &dsn_ret,
                            ATTR_TYPE_STR, MAIL_ATTR_VERPDL, verp_delims,
-                           ATTR_TYPE_END) != 8) {
+                           ATTR_TYPE_END) != 9) {
        msg_warn("malformed request");
        return (-1);
     }
@@ -374,9 +387,9 @@ static int bounce_verp_proto(char *service_name, VSTREAM *client)
        return (-1);
     }
     if (msg_verbose)
-       msg_info("%s: flags=0x%x service=%s queue=%s id=%s encoding=%s sender=%s envid=%s ret=0x%x delim=%s",
+       msg_info("%s: flags=0x%x service=%s queue=%s id=%s encoding=%s smtputf8=%d sender=%s envid=%s ret=0x%x delim=%s",
                 myname, flags, service_name, STR(queue_name),
-                STR(queue_id), STR(encoding), STR(sender),
+                STR(queue_id), STR(encoding), smtputf8, STR(sender),
                 STR(dsn_envid), dsn_ret, STR(verp_delims));
 
     /*
@@ -393,12 +406,12 @@ static int bounce_verp_proto(char *service_name, VSTREAM *client)
     if (!*STR(sender) || !strcasecmp(STR(sender), mail_addr_double_bounce())) {
        msg_warn("request to send VERP-style notification of bounced mail");
        return (bounce_notify_service(flags, service_name, STR(queue_name),
-                                     STR(queue_id), STR(encoding),
+                                     STR(queue_id), STR(encoding), smtputf8,
                                      STR(sender), STR(dsn_envid), dsn_ret,
                                      bounce_templates));
     } else
        return (bounce_notify_verp(flags, service_name, STR(queue_name),
-                                  STR(queue_id), STR(encoding),
+                                  STR(queue_id), STR(encoding), smtputf8,
                                   STR(sender), STR(dsn_envid), dsn_ret,
                                   STR(verp_delims), bounce_templates));
 }
@@ -409,6 +422,7 @@ static int bounce_one_proto(char *service_name, VSTREAM *client)
 {
     const char *myname = "bounce_one_proto";
     int     flags;
+    int     smtputf8;
     int     dsn_ret;
 
     /*
@@ -419,12 +433,13 @@ static int bounce_one_proto(char *service_name, VSTREAM *client)
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, &smtputf8,
                            ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                            ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                            ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, &dsn_ret,
                            ATTR_TYPE_FUNC, rcpb_scan, (void *) rcpt_buf,
                            ATTR_TYPE_FUNC, dsb_scan, (void *) dsn_buf,
-                           ATTR_TYPE_END) != 9) {
+                           ATTR_TYPE_END) != 10) {
        msg_warn("malformed request");
        return (-1);
     }
@@ -465,10 +480,10 @@ static int bounce_one_proto(char *service_name, VSTREAM *client)
      * RECIPIENT_FROM_RCPT_BUF().
      */
     if (msg_verbose)
-       msg_info("%s: flags=0x%x queue=%s id=%s encoding=%s sender=%s envid=%s dsn_ret=0x%x orig_to=%s to=%s off=%ld dsn_orig=%s notif=0x%x stat=%s act=%s why=%s",
+       msg_info("%s: flags=0x%x queue=%s id=%s encoding=%s smtputf8=%d sender=%s envid=%s dsn_ret=0x%x orig_to=%s to=%s off=%ld dsn_orig=%s notif=0x%x stat=%s act=%s why=%s",
                 myname, flags, STR(queue_name), STR(queue_id),
-                STR(encoding), STR(sender), STR(dsn_envid), dsn_ret,
-                STR(rcpt_buf->orig_addr), STR(rcpt_buf->address),
+                STR(encoding), smtputf8, STR(sender), STR(dsn_envid),
+                dsn_ret, STR(rcpt_buf->orig_addr), STR(rcpt_buf->address),
                 rcpt_buf->offset, STR(rcpt_buf->dsn_orcpt),
                 rcpt_buf->dsn_notify, STR(dsn_buf->status),
                 STR(dsn_buf->action), STR(dsn_buf->reason));
@@ -477,8 +492,9 @@ static int bounce_one_proto(char *service_name, VSTREAM *client)
      * Execute the request.
      */
     return (bounce_one_service(flags, STR(queue_name), STR(queue_id),
-                              STR(encoding), STR(sender), STR(dsn_envid),
-                            dsn_ret, rcpt_buf, dsn_buf, bounce_templates));
+                              STR(encoding), smtputf8, STR(sender),
+                              STR(dsn_envid), dsn_ret, rcpt_buf,
+                              dsn_buf, bounce_templates));
 }
 
 /* bounce_service - parse bounce command type and delegate */
index 75c490082389dfa06ff424e21fc5744c2a6cd071..7ded894cad3034036320ac74951d959f8fa1b28a 100644 (file)
@@ -6,12 +6,15 @@
 /* SYNOPSIS
 /*     #include "bounce_service.h"
 /*
-/*     int     bounce_notify_service(flags, queue_name, queue_id, encoding,
-/*                                     sender, dsn_envid, dsn_ret, templates)
+/*     int     bounce_notify_service(flags, service, queue_name, queue_id,
+/*                                     encoding, smtputf8, sender, dsn_envid,
+/*                                     dsn_ret, templates)
 /*     int     flags;
+/*     char    *service;
 /*     char    *queue_name;
 /*     char    *queue_id;
 /*     char    *encoding;
+/*     int     smtputf8;
 /*     char    *sender;
 /*     char    *dsn_envid;
 /*     int     dsn_ret;
@@ -72,6 +75,7 @@
 #include <mail_error.h>
 #include <bounce.h>
 #include <dsn_mask.h>
+#include <rec_type.h>
 
 /* Application-specific. */
 
@@ -83,8 +87,9 @@
 
 int     bounce_notify_service(int flags, char *service, char *queue_name,
                                      char *queue_id, char *encoding,
-                                     char *recipient, char *dsn_envid,
-                                     int dsn_ret, BOUNCE_TEMPLATES *ts)
+                                     int smtputf8, char *recipient,
+                                     char *dsn_envid, int dsn_ret,
+                                     BOUNCE_TEMPLATES *ts)
 {
     BOUNCE_INFO *bounce_info;
     int     bounce_status = 1;
@@ -129,7 +134,8 @@ int     bounce_notify_service(int flags, char *service, char *queue_name,
      * notification is enabled.
      */
     bounce_info = bounce_mail_init(service, queue_name, queue_id,
-                                  encoding, dsn_envid, ts->failure);
+                                  encoding, smtputf8, dsn_envid,
+                                  ts->failure);
 
 #define NULL_SENDER            MAIL_ADDR_EMPTY /* special address */
 #define NULL_TRACE_FLAGS       0
@@ -174,7 +180,7 @@ int     bounce_notify_service(int flags, char *service, char *queue_name,
            postmaster = var_2bounce_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -213,7 +219,7 @@ int     bounce_notify_service(int flags, char *service, char *queue_name,
      */
     else {
        if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient,
-                                            INT_FILT_MASK_BOUNCE,
+                                            MAIL_SRC_MASK_BOUNCE,
                                             NULL_TRACE_FLAGS,
                                             new_id)) != 0) {
 
@@ -267,7 +273,7 @@ int     bounce_notify_service(int flags, char *service, char *queue_name,
            postmaster = var_bounce_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
                count = -1;
index 9cdf264ffde11ee6dd1c906b65f12d10a6ce3027..8103f4766e7637d1371e3185fde55ff6d952b22e 100644 (file)
 /* .in -4
 /*     } BOUNCE_INFO;
 /*
-/*     BOUNCE_INFO *bounce_mail_init(service, queue_name, queue_id,
-/*                                     encoding, dsn_envid, template)
+/*     BOUNCE_INFO *bounce_mail_init(service, queue_name, queue_id, encoding,
+/*                                     smtputf8, dsn_envid, template)
 /*     const char *service;
 /*     const char *queue_name;
 /*     const char *queue_id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *dsn_envid;
 /*     const BOUNCE_TEMPLATE *template;
 /*
 /*     BOUNCE_INFO *bounce_mail_one_init(queue_name, queue_id, encoding,
-/*                                     dsn_envid, dsn_notify, rcpt_buf,
-/*                                     dsn_buf, template)
+/*                                     smtputf8, dsn_envid, dsn_notify,
+/*                                     rcpt_buf, dsn_buf, template)
 /*     const char *queue_name;
 /*     const char *queue_id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     int     dsn_notify;
 /*     const char *dsn_envid;
 /*     RCPT_BUF *rcpt_buf;
@@ -211,6 +213,7 @@ static BOUNCE_INFO *bounce_mail_alloc(const char *service,
                                              const char *queue_name,
                                              const char *queue_id,
                                              const char *encoding,
+                                             int smtputf8,
                                              const char *dsn_envid,
                                              RCPT_BUF *rcpt_buf,
                                              DSN_BUF *dsn_buf,
@@ -228,7 +231,15 @@ static BOUNCE_INFO *bounce_mail_alloc(const char *service,
     bounce_info->service = service;
     bounce_info->queue_name = queue_name;
     bounce_info->queue_id = queue_id;
-    if (strcmp(encoding, MAIL_ATTR_ENC_8BIT) == 0) {
+    bounce_info->smtputf8 = smtputf8;
+    /* Fix 20140708: propagate smtputf8 attribute to bounce message. */
+    bounce_info->smtputf8_attr =
+       vstring_export(vstring_sprintf(vstring_alloc(20), "%s=%d",
+                                      MAIL_ATTR_SMTPUTF8, smtputf8));
+    /* Fix 20140708: override MIME encoding: addresses may be 8bit. */
+    if (bounce_info->smtputf8) {
+       bounce_info->mime_encoding = "8bit";
+    } else if (strcmp(encoding, MAIL_ATTR_ENC_8BIT) == 0) {
        bounce_info->mime_encoding = "8bit";
     } else if (strcmp(encoding, MAIL_ATTR_ENC_7BIT) == 0) {
        bounce_info->mime_encoding = "7bit";
@@ -359,6 +370,7 @@ BOUNCE_INFO *bounce_mail_init(const char *service,
                                      const char *queue_name,
                                      const char *queue_id,
                                      const char *encoding,
+                                     int smtputf8,
                                      const char *dsn_envid,
                                      BOUNCE_TEMPLATE *template)
 {
@@ -385,7 +397,7 @@ BOUNCE_INFO *bounce_mail_init(const char *service,
        dsn_buf = dsb_create();
     }
     bounce_info = bounce_mail_alloc(service, queue_name, queue_id, encoding,
-                                   dsn_envid, rcpt_buf, dsn_buf,
+                                   smtputf8, dsn_envid, rcpt_buf, dsn_buf,
                                    template, log_handle);
     return (bounce_info);
 }
@@ -395,6 +407,7 @@ BOUNCE_INFO *bounce_mail_init(const char *service,
 BOUNCE_INFO *bounce_mail_one_init(const char *queue_name,
                                          const char *queue_id,
                                          const char *encoding,
+                                         int smtputf8,
                                          const char *dsn_envid,
                                          RCPT_BUF *rcpt_buf,
                                          DSN_BUF *dsn_buf,
@@ -406,8 +419,8 @@ BOUNCE_INFO *bounce_mail_one_init(const char *queue_name,
      * Initialize the bounce_info structure for just one recipient.
      */
     bounce_info = bounce_mail_alloc("none", queue_name, queue_id, encoding,
-                                   dsn_envid, rcpt_buf, dsn_buf, template,
-                                   (BOUNCE_LOG *) 0);
+                                   smtputf8, dsn_envid, rcpt_buf, dsn_buf,
+                                   template, (BOUNCE_LOG *) 0);
     return (bounce_info);
 }
 
@@ -428,6 +441,7 @@ void    bounce_mail_free(BOUNCE_INFO *bounce_info)
                 bounce_info->queue_id);
     vstring_free(bounce_info->buf);
     vstring_free(bounce_info->sender);
+    myfree(bounce_info->smtputf8_attr);
     myfree(bounce_info->mail_name);
     myfree((char *) bounce_info->mime_boundary);
     myfree((char *) bounce_info);
@@ -483,6 +497,10 @@ int     bounce_header(VSTREAM *bounce, BOUNCE_INFO *bounce_info,
     post_mail_fprintf(bounce, "Content-Description: %s", "Notification");
     post_mail_fprintf(bounce, "Content-Type: %s; charset=%s",
                      "text/plain", bounce_template_charset(template));
+    /* Fix 20140709: addresses may be 8bit. */
+    if (bounce_info->smtputf8)
+       post_mail_fprintf(bounce, "Content-Transfer-Encoding: %s",
+                           bounce_info->mime_encoding);
     post_mail_fputs(bounce, "");
 
     return (vstream_ferror(bounce));
@@ -602,7 +620,12 @@ int     bounce_header_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
     post_mail_fprintf(bounce, "--%s", bounce_info->mime_boundary);
     post_mail_fprintf(bounce, "Content-Description: %s",
                      "Delivery report");
-    post_mail_fprintf(bounce, "Content-Type: %s", "message/delivery-status");
+    post_mail_fprintf(bounce, "Content-Type: message/%sdelivery-status",
+                     bounce_info->smtputf8 ? "global-" : "");
+    /* Fix 20140709: addresses may be 8bit. */
+    if (bounce_info->smtputf8)
+       post_mail_fprintf(bounce, "Content-Transfer-Encoding: %s",
+                           bounce_info->mime_encoding);
 
     /*
      * According to RFC 1894: The body of a message/delivery-status consists
@@ -621,9 +644,15 @@ int     bounce_header_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
     }
     post_mail_fprintf(bounce, "X-%s-Queue-ID: %s",
                      bounce_info->mail_name, bounce_info->queue_id);
+    /* Fix 20140708: use "utf-8" or "rfc822" as appropriate. */
     if (VSTRING_LEN(bounce_info->sender) > 0)
-       post_mail_fprintf(bounce, "X-%s-Sender: rfc822; %s",
-                         bounce_info->mail_name, STR(bounce_info->sender));
+       post_mail_fprintf(bounce, "X-%s-Sender: %s; %s",
+                         bounce_info->mail_name, bounce_info->smtputf8
+                         && STR(bounce_info->sender)[0]
+                         && !allascii(STR(bounce_info->sender))
+                         && valid_utf8_string(STR(bounce_info->sender),
+                                        VSTRING_LEN(bounce_info->sender)) ?
+                         "utf-8" : "rfc822", STR(bounce_info->sender));
     if (bounce_info->arrival_time > 0)
        post_mail_fprintf(bounce, "Arrival-Date: %s",
                          mail_date(bounce_info->arrival_time));
@@ -638,7 +667,13 @@ int     bounce_recipient_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
     DSN    *dsn = &bounce_info->dsn_buf->dsn;
 
     post_mail_fputs(bounce, "");
-    post_mail_fprintf(bounce, "Final-Recipient: rfc822; %s", rcpt->address);
+    /* Fix 20140708: Don't send "utf-8" type with non-UTF8 address. */
+    post_mail_fprintf(bounce, "Final-Recipient: %s; %s",
+                     bounce_info->smtputf8 && rcpt->address[0]
+                     && !allascii(rcpt->address)
+                     && valid_utf8_string(rcpt->address,
+                                          strlen(rcpt->address)) ?
+                     "utf-8" : "rfc822", rcpt->address);
 
     /*
      * XXX DSN
@@ -662,8 +697,13 @@ int     bounce_recipient_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
     if (NON_NULL_EMPTY(rcpt->dsn_orcpt)) {
        post_mail_fprintf(bounce, "Original-Recipient: %s", rcpt->dsn_orcpt);
     } else if (NON_NULL_EMPTY(rcpt->orig_addr)) {
-       post_mail_fprintf(bounce, "Original-Recipient: rfc822; %s",
-                         rcpt->orig_addr);
+       /* Fix 20140708: Don't send "utf-8" type with non-UTF8 address. */
+       post_mail_fprintf(bounce, "Original-Recipient: %s; %s",
+                         bounce_info->smtputf8 && rcpt->orig_addr[0]
+                         && !allascii(rcpt->orig_addr)
+                         && valid_utf8_string(rcpt->orig_addr,
+                                              strlen(rcpt->orig_addr)) ?
+                         "utf-8" : "rfc822", rcpt->orig_addr);
     }
     post_mail_fprintf(bounce, "Action: %s",
                      IS_FAILURE_TEMPLATE(bounce_info->template) ?
@@ -755,9 +795,14 @@ int     bounce_original(VSTREAM *bounce, BOUNCE_INFO *bounce_info,
                      "Undelivered " : "",
                      headers_only == DSN_RET_HDRS ?
                      "Message Headers" : "Message");
-    post_mail_fprintf(bounce, "Content-Type: %s",
-                     headers_only == DSN_RET_HDRS ?
-                     "text/rfc822-headers" : "message/rfc822");
+    if (bounce_info->smtputf8)
+       post_mail_fprintf(bounce, "Content-Type: message/%s",
+                         headers_only == DSN_RET_HDRS ?
+                         "global-headers" : "global");
+    else
+       post_mail_fprintf(bounce, "Content-Type: %s",
+                         headers_only == DSN_RET_HDRS ?
+                         "text/rfc822-headers" : "message/rfc822");
     if (bounce_info->mime_encoding)
        post_mail_fprintf(bounce, "Content-Transfer-Encoding: %s",
                          bounce_info->mime_encoding);
index 3968c73aab4db24a96b6cf456fa3a71ea55ef056..bfaf7dece6ede67597d37b81d99b15a5b2c5efa1 100644 (file)
@@ -6,12 +6,16 @@
 /* SYNOPSIS
 /*     #include "bounce_service.h"
 /*
-/*     int     bounce_notify_verp(flags, service, queue_name, queue_id, sender,
+/*     int     bounce_notify_verp(flags, service, queue_name, queue_id,
+/*                                     encoding, smtputf8, sender,
 /*                                     dsn_envid, dsn_ret, verp_delims,
 /*                                     templates)
 /*     int     flags;
+/*     char    *service;
 /*     char    *queue_name;
 /*     char    *queue_id;
+/*     char    *encoding;
+/*     int     smtputf8;
 /*     char    *sender;
 /*     char    *dsn_envid;
 /*     int     dsn_ret;
@@ -74,6 +78,7 @@
 #include <verp_sender.h>
 #include <bounce.h>
 #include <dsn_mask.h>
+#include <rec_type.h>
 
 /* Application-specific. */
 
@@ -85,9 +90,9 @@
 
 int     bounce_notify_verp(int flags, char *service, char *queue_name,
                                   char *queue_id, char *encoding,
-                                  char *recipient, char *dsn_envid,
-                                  int dsn_ret, char *verp_delims,
-                                  BOUNCE_TEMPLATES *ts)
+                                  int smtputf8, char *recipient,
+                                  char *dsn_envid, int dsn_ret,
+                                  char *verp_delims, BOUNCE_TEMPLATES *ts)
 {
     const char *myname = "bounce_notify_verp";
     BOUNCE_INFO *bounce_info;
@@ -113,7 +118,8 @@ int     bounce_notify_verp(int flags, char *service, char *queue_name,
      * Initialize. Open queue file, bounce log, etc.
      */
     bounce_info = bounce_mail_init(service, queue_name, queue_id,
-                                  encoding, dsn_envid, ts->failure);
+                                  encoding, smtputf8, dsn_envid,
+                                  ts->failure);
 
     /*
      * If we have no recipient list then we can't send VERP replies. Send
@@ -128,8 +134,9 @@ int     bounce_notify_verp(int flags, char *service, char *queue_name,
        vstring_strcpy(rcpt_buf->address, "(recipient address unavailable)");
        (void) RECIPIENT_FROM_RCPT_BUF(rcpt_buf);
        bounce_status = bounce_one_service(flags, queue_name, queue_id,
-                                          encoding, recipient, dsn_envid,
-                                          dsn_ret, rcpt_buf, dsn_buf, ts);
+                                          encoding, smtputf8, recipient,
+                                          dsn_envid, dsn_ret, rcpt_buf,
+                                          dsn_buf, ts);
        rcpb_free(rcpt_buf);
        dsb_free(dsn_buf);
        bounce_mail_free(bounce_info);
@@ -160,7 +167,7 @@ int     bounce_notify_verp(int flags, char *service, char *queue_name,
        } else {
            verp_sender(verp_buf, verp_delims, recipient, rcpt);
            if ((bounce = post_mail_fopen_nowait(NULL_SENDER, STR(verp_buf),
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -219,7 +226,7 @@ int     bounce_notify_verp(int flags, char *service, char *queue_name,
            postmaster = var_bounce_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
                if (bounce_header(bounce, bounce_info, postmaster,
index 7a3da8230d139379147fdf526768ea0e59df22a0..08c77cceca036767616e741243a522c74d1c053d 100644 (file)
@@ -7,12 +7,13 @@
 /*     #include "bounce_service.h"
 /*
 /*     int     bounce_one_service(flags, queue_name, queue_id, encoding,
-/*                                     orig_sender, envid, ret,
+/*                                     smtputf8, orig_sender, envid, ret,
 /*                                     rcpt_buf, dsn_buf, templates)
 /*     int     flags;
 /*     char    *queue_name;
 /*     char    *queue_id;
 /*     char    *encoding;
+/*     int     smtputf8;
 /*     char    *orig_sender;
 /*     char    *envid;
 /*     int     ret;
@@ -74,6 +75,7 @@
 #include <mail_error.h>
 #include <bounce.h>
 #include <dsn_mask.h>
+#include <rec_type.h>
 
 /* Application-specific. */
 
 /* bounce_one_service - send a bounce for one recipient */
 
 int     bounce_one_service(int flags, char *queue_name, char *queue_id,
-                                  char *encoding, char *orig_sender,
-                                  char *dsn_envid, int dsn_ret,
-                                  RCPT_BUF *rcpt_buf, DSN_BUF *dsn_buf,
-                                  BOUNCE_TEMPLATES *ts)
+                                  char *encoding, int smtputf8,
+                                  char *orig_sender, char *dsn_envid,
+                                  int dsn_ret, RCPT_BUF *rcpt_buf,
+                                  DSN_BUF *dsn_buf, BOUNCE_TEMPLATES *ts)
 {
     BOUNCE_INFO *bounce_info;
     int     bounce_status = 1;
@@ -101,8 +103,8 @@ int     bounce_one_service(int flags, char *queue_name, char *queue_id,
      * Initialize. Open queue file, bounce log, etc.
      */
     bounce_info = bounce_mail_one_init(queue_name, queue_id, encoding,
-                                      dsn_envid, rcpt_buf, dsn_buf,
-                                      ts->failure);
+                                      smtputf8, dsn_envid, rcpt_buf,
+                                      dsn_buf, ts->failure);
 
 #define NULL_SENDER            MAIL_ADDR_EMPTY /* special address */
 #define NULL_TRACE_FLAGS       0
@@ -147,7 +149,7 @@ int     bounce_one_service(int flags, char *queue_name, char *queue_id,
        } else {
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 var_2bounce_rcpt,
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -183,7 +185,7 @@ int     bounce_one_service(int flags, char *queue_name, char *queue_id,
            bounce_status = 0;
        } else {
            if ((bounce = post_mail_fopen_nowait(NULL_SENDER, orig_sender,
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -228,7 +230,7 @@ int     bounce_one_service(int flags, char *queue_name, char *queue_id,
             */
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 var_bounce_rcpt,
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
                if (bounce_header(bounce, bounce_info, var_bounce_rcpt,
index 0a9bc4d0225d3d0b2cfc5592af17b0841cc08c16..9ba5ca5038c91eb2789cb46392c8e127b7206f99 100644 (file)
@@ -31,27 +31,27 @@ extern int bounce_append_service(int, char *, char *, RECIPIENT *, DSN *);
  /*
   * bounce_notify_service.c
   */
-extern int bounce_notify_service(int, char *, char *, char *, char *, char *, char *, int, BOUNCE_TEMPLATES *);
+extern int bounce_notify_service(int, char *, char *, char *, char *, int, char *, char *, int, BOUNCE_TEMPLATES *);
 
  /*
   * bounce_warn_service.c
   */
-extern int bounce_warn_service(int, char *, char *, char *, char *, char *, char *, int, BOUNCE_TEMPLATES *);
+extern int bounce_warn_service(int, char *, char *, char *, char *, int, char *, char *, int, BOUNCE_TEMPLATES *);
 
  /*
   * bounce_trace_service.c
   */
-extern int bounce_trace_service(int, char *, char *, char *, char *, char *, char *, int, BOUNCE_TEMPLATES *);
+extern int bounce_trace_service(int, char *, char *, char *, char *, int, char *, char *, int, BOUNCE_TEMPLATES *);
 
  /*
   * bounce_notify_verp.c
   */
-extern int bounce_notify_verp(int, char *, char *, char *, char *, char *, char *, int, char *, BOUNCE_TEMPLATES *);
+extern int bounce_notify_verp(int, char *, char *, char *, char *, int, char *, char *, int, char *, BOUNCE_TEMPLATES *);
 
  /*
   * bounce_one_service.c
   */
-extern int bounce_one_service(int, char *, char *, char *, char *, char *, int, RCPT_BUF *, DSN_BUF *, BOUNCE_TEMPLATES *);
+extern int bounce_one_service(int, char *, char *, char *, int, char *, char *, int, RCPT_BUF *, DSN_BUF *, BOUNCE_TEMPLATES *);
 
  /*
   * bounce_cleanup.c
@@ -84,12 +84,14 @@ typedef struct {
     DSN_BUF *dsn_buf;                  /* delivery status info */
     BOUNCE_LOG *log_handle;            /* open logfile */
     char   *mail_name;                 /* $mail_name, cooked */
+    int     smtputf8;                  /* SMTPUTF8 requested */
+    char   *smtputf8_attr;             /* pre-formatted record value */
 } BOUNCE_INFO;
 
  /* */
 
-extern BOUNCE_INFO *bounce_mail_init(const char *, const char *, const char *, const char *, const char *, BOUNCE_TEMPLATE *);
-extern BOUNCE_INFO *bounce_mail_one_init(const char *, const char *, const char *, const char *, RCPT_BUF *, DSN_BUF *, BOUNCE_TEMPLATE *);
+extern BOUNCE_INFO *bounce_mail_init(const char *, const char *, const char *, const char *, int, const char *, BOUNCE_TEMPLATE *);
+extern BOUNCE_INFO *bounce_mail_one_init(const char *, const char *, const char *, int, const char *, RCPT_BUF *, DSN_BUF *, BOUNCE_TEMPLATE *);
 extern void bounce_mail_free(BOUNCE_INFO *);
 extern int bounce_header(VSTREAM *, BOUNCE_INFO *, const char *, int);
 extern int bounce_boilerplate(VSTREAM *, BOUNCE_INFO *);
index ed67c81e5f6e5afb9b1c1162d8a7dd22b31bfb57..7888a1867a254cf97e9522cc385884231328d29b 100644 (file)
@@ -286,6 +286,10 @@ static void bounce_template_parse_buffer(BOUNCE_TEMPLATE *tp)
 
     /*
      * Parse pseudo-header labels and values.
+     * 
+     * XXX EAI: allow UTF8 in template headers when responding to SMTPUTF8
+     * message. Sending SMTPUTF8 in reponse to non-SMTPUTF8 mail would make
+     * no sense.
      */
 #define GETLINE(line, buf) \
         (((line) = (buf)) != 0 ? ((buf) = split_at((buf), '\n'), (line)) : 0)
index 824931d60becfe192e70f144b97f432ffc140cae..3b340c30342bbf9245fea46bed43b040f52096bc 100644 (file)
@@ -6,12 +6,15 @@
 /* SYNOPSIS
 /*     #include "bounce_service.h"
 /*
-/*     int     bounce_trace_service(flags, queue_name, queue_id, encoding,
-/*                                     sender, char *envid, int ret, templates)
+/*     int     bounce_trace_service(flags, service, queue_name, queue_id,
+/*                                     encoding, smtputf8, sender, envid,
+/*                                     ret, templates)
 /*     int     flags;
+/*     char    *service;
 /*     char    *queue_name;
 /*     char    *queue_id;
 /*     char    *encoding;
+/*     int     smtputf8;
 /*     char    *sender;
 /*     char    *envid;
 /*     int     ret;
@@ -64,6 +67,7 @@
 #include <mail_addr.h>
 #include <mail_error.h>
 #include <dsn_mask.h>
+#include <rec_type.h>
 #include <deliver_request.h>           /* USR_VRFY and RECORD flags */
 
 /* Application-specific. */
@@ -76,6 +80,7 @@
 
 int     bounce_trace_service(int flags, char *service, char *queue_name,
                                     char *queue_id, char *encoding,
+                                    int smtputf8,
                                     char *recipient, char *dsn_envid,
                                     int unused_dsn_ret,
                                     BOUNCE_TEMPLATES *ts)
@@ -134,7 +139,7 @@ int     bounce_trace_service(int flags, char *service, char *queue_name,
 #define NON_DSN_FLAGS (DEL_REQ_FLAG_USR_VRFY | DEL_REQ_FLAG_RECORD)
 
     bounce_info = bounce_mail_init(service, queue_name, queue_id,
-                                  encoding, dsn_envid,
+                                  encoding, smtputf8, dsn_envid,
                                   flags & NON_DSN_FLAGS ?
                                   ts->verify : ts->success);
 
@@ -171,7 +176,7 @@ int     bounce_trace_service(int flags, char *service, char *queue_name,
      */
     new_id = vstring_alloc(10);
     if ((bounce = post_mail_fopen_nowait(sender, recipient,
-                                        INT_FILT_MASK_BOUNCE,
+                                        MAIL_SRC_MASK_BOUNCE,
                                         NULL_TRACE_FLAGS,
                                         new_id)) != 0) {
        count = -1;
index f4b62c75b002fa1b0d0ae8d4a2864b437ab41dd1..a961bd8b867855db185274664283c7b5e2583940 100644 (file)
@@ -6,12 +6,15 @@
 /* SYNOPSIS
 /*     #include "bounce_service.h"
 /*
-/*     int     bounce_warn_service(flags, queue_name, queue_id, encoding,
-/*                                     sender, envid, dsn_ret, templates)
+/*     int     bounce_warn_service(flags, service, queue_name, queue_id,
+/*                                     encoding, smtputf8, sender, envid,
+/*                                     dsn_ret, templates)
 /*     int     flags;
+/*     char    *service;
 /*     char    *queue_name;
 /*     char    *queue_id;
 /*     char    *encoding;
+/*     int     smtputf8;
 /*     char    *sender;
 /*     char    *envid;
 /*     int     dsn_ret;
@@ -72,6 +75,7 @@
 #include <mail_addr.h>
 #include <mail_error.h>
 #include <dsn_mask.h>
+#include <rec_type.h>
 
 /* Application-specific. */
 
@@ -83,8 +87,9 @@
 
 int     bounce_warn_service(int unused_flags, char *service, char *queue_name,
                                    char *queue_id, char *encoding,
-                                   char *recipient, char *dsn_envid,
-                                   int dsn_ret, BOUNCE_TEMPLATES *ts)
+                                   int smtputf8, char *recipient,
+                                   char *dsn_envid, int dsn_ret,
+                                   BOUNCE_TEMPLATES *ts)
 {
     BOUNCE_INFO *bounce_info;
     int     bounce_status = 1;
@@ -119,7 +124,7 @@ int     bounce_warn_service(int unused_flags, char *service, char *queue_name,
      * notify_classes restrictions.
      */
     bounce_info = bounce_mail_init(service, queue_name, queue_id,
-                                  encoding, dsn_envid, ts->delay);
+                                  encoding, smtputf8, dsn_envid, ts->delay);
 
 #define NULL_SENDER            MAIL_ADDR_EMPTY /* special address */
 #define NULL_TRACE_FLAGS       0
@@ -164,7 +169,7 @@ int     bounce_warn_service(int unused_flags, char *service, char *queue_name,
            postmaster = var_delay_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
 
@@ -202,7 +207,7 @@ int     bounce_warn_service(int unused_flags, char *service, char *queue_name,
      */
     else {
        if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient,
-                                            INT_FILT_MASK_BOUNCE,
+                                            MAIL_SRC_MASK_BOUNCE,
                                             NULL_TRACE_FLAGS,
                                             new_id)) != 0) {
 
@@ -252,7 +257,7 @@ int     bounce_warn_service(int unused_flags, char *service, char *queue_name,
            postmaster = var_delay_rcpt;
            if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                                 postmaster,
-                                                INT_FILT_MASK_BOUNCE,
+                                                MAIL_SRC_MASK_BOUNCE,
                                                 NULL_TRACE_FLAGS,
                                                 new_id)) != 0) {
                count = -1;
index 25d04197d2db92f9ded0776d26b82e9860940e90..c6c5e74b47051682f1378fa502175a814ef7d2cf 100644 (file)
@@ -587,6 +587,7 @@ cleanup_addr.o: ../../include/mymalloc.h
 cleanup_addr.o: ../../include/nvtable.h
 cleanup_addr.o: ../../include/rec_type.h
 cleanup_addr.o: ../../include/resolve_clnt.h
+cleanup_addr.o: ../../include/smtputf8.h
 cleanup_addr.o: ../../include/string_list.h
 cleanup_addr.o: ../../include/stringops.h
 cleanup_addr.o: ../../include/sys_defs.h
@@ -628,6 +629,7 @@ cleanup_api.o: ../../include/nvtable.h
 cleanup_api.o: ../../include/rec_type.h
 cleanup_api.o: ../../include/recipient_list.h
 cleanup_api.o: ../../include/resolve_clnt.h
+cleanup_api.o: ../../include/smtputf8.h
 cleanup_api.o: ../../include/string_list.h
 cleanup_api.o: ../../include/sys_defs.h
 cleanup_api.o: ../../include/tok822.h
@@ -737,6 +739,7 @@ cleanup_envelope.o: ../../include/rec_type.h
 cleanup_envelope.o: ../../include/recipient_list.h
 cleanup_envelope.o: ../../include/record.h
 cleanup_envelope.o: ../../include/resolve_clnt.h
+cleanup_envelope.o: ../../include/smtputf8.h
 cleanup_envelope.o: ../../include/string_list.h
 cleanup_envelope.o: ../../include/stringops.h
 cleanup_envelope.o: ../../include/sys_defs.h
@@ -1053,8 +1056,10 @@ cleanup_out.o: ../../include/nvtable.h
 cleanup_out.o: ../../include/rec_type.h
 cleanup_out.o: ../../include/record.h
 cleanup_out.o: ../../include/resolve_clnt.h
+cleanup_out.o: ../../include/smtputf8.h
 cleanup_out.o: ../../include/split_at.h
 cleanup_out.o: ../../include/string_list.h
+cleanup_out.o: ../../include/stringops.h
 cleanup_out.o: ../../include/sys_defs.h
 cleanup_out.o: ../../include/tok822.h
 cleanup_out.o: ../../include/vbuf.h
index eca0785c6a77b9494d2fea8c8030312208fd991a..fec0cf86766588e39d542d1c11b5de45624dcd84 100644 (file)
@@ -122,6 +122,11 @@ typedef struct CLEANUP_STATE {
     struct CLEANUP_REGION *free_regions;/* unused regions */
     struct CLEANUP_REGION *body_regions;/* regions with body content */
     struct CLEANUP_REGION *curr_body_region;
+
+    /*
+     * Internationalization.
+     */
+    int     smtputf8;                  /* what support is desired */
 } CLEANUP_STATE;
 
  /*
index f8e0596c438279938f05b6806b0fc99fde6107e7..f869f03579cfaa72b81ec29986fa31c56279cbe2 100644 (file)
 #include <mail_addr_find.h>
 #include <mail_proto.h>
 #include <dsn_mask.h>
+#include <smtputf8.h>
 
 /* Application-specific. */
 
 #include "cleanup.h"
 
 #define STR                    vstring_str
+#define LEN                    VSTRING_LEN
 #define IGNORE_EXTENSION       (char **) 0
 
 /* cleanup_addr_sender - process envelope sender record */
@@ -138,6 +140,14 @@ void    cleanup_addr_sender(CLEANUP_STATE *state, const char *buf)
            && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_ENV_FROM))
            cleanup_masquerade_internal(state, clean_addr, cleanup_masq_domains);
     }
+    /* Fix 20140711: Auto-detect an UTF8 sender. */
+    if (var_smtputf8_enable && *STR(clean_addr) && !allascii(STR(clean_addr))
+       && valid_utf8_string(STR(clean_addr), LEN(clean_addr))) {
+       state->smtputf8 |= SMTPUTF8_FLAG_SENDER;
+       /* Fix 20140713: request SMTPUTF8 support selectively. */
+       if (state->flags & CLEANUP_FLAG_AUTOUTF8)
+           state->smtputf8 |= SMTPUTF8_FLAG_REQUESTED;
+    }
     CLEANUP_OUT_BUF(state, REC_TYPE_FROM, clean_addr);
     if (state->sender)                         /* XXX Can't happen */
        myfree(state->sender);
@@ -187,6 +197,13 @@ void    cleanup_addr_recipient(CLEANUP_STATE *state, const char *buf)
            && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_ENV_RCPT))
            cleanup_masquerade_internal(state, clean_addr, cleanup_masq_domains);
     }
+    /* Fix 20140711: Auto-detect an UTF8 recipient. */
+    if (var_smtputf8_enable && *STR(clean_addr) && !allascii(STR(clean_addr))
+       && valid_utf8_string(STR(clean_addr), LEN(clean_addr))) {
+       /* Fix 20140713: request SMTPUTF8 support selectively. */
+       if (state->flags & CLEANUP_FLAG_AUTOUTF8)
+           state->smtputf8 |= SMTPUTF8_FLAG_REQUESTED;
+    }
     cleanup_out_recipient(state, state->dsn_orcpt, state->dsn_notify,
                          state->orig_rcpt, STR(clean_addr));
     if (state->recip)                          /* This can happen */
@@ -233,6 +250,13 @@ void    cleanup_addr_bcc_dsn(CLEANUP_STATE *state, const char *bcc,
            && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_ENV_RCPT))
            cleanup_masquerade_internal(state, clean_addr, cleanup_masq_domains);
     }
+    /* Fix 20140711: Auto-detect an UTF8 recipient. */
+    if (var_smtputf8_enable && *STR(clean_addr) && !allascii(STR(clean_addr))
+       && valid_utf8_string(STR(clean_addr), LEN(clean_addr))) {
+       /* Fix 20140713: request SMTPUTF8 support selectively. */
+       if (state->flags & CLEANUP_FLAG_AUTOUTF8)
+           state->smtputf8 |= SMTPUTF8_FLAG_REQUESTED;
+    }
     cleanup_out_recipient(state, dsn_orcpt, dsn_notify,
                          STR(clean_addr), STR(clean_addr));
     vstring_free(clean_addr);
index ffcd93f80ea6bb8e4a90e35edbfe909f9f4a7991..7e7c43c415051ccd693408934b2e94925b0d9254 100644 (file)
 /*     to translate the result into human-readable text.
 /*
 /*     cleanup_free() destroys its argument.
+/* .IP CLEANUP_FLAG_SMTPUTF8
+/*     Request SMTPUTF8 support when delivering mail.
+/* .IP CLEANUP_FLAG_AUTOUTF8
+/*     Autodetection: request SMTPUTF8 support if the message
+/*     contains an UTF8 message header, sender, or recipient.
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /* SEE ALSO
 #include <mail_stream.h>
 #include <mail_flow.h>
 #include <rec_type.h>
+#include <smtputf8.h>
 
 /* Milter library. */
 
@@ -193,6 +199,8 @@ void    cleanup_control(CLEANUP_STATE *state, int flags)
     } else {
        state->err_mask = ~0;
     }
+    if (state->flags & CLEANUP_FLAG_SMTPUTF8)
+       state->smtputf8 = SMTPUTF8_FLAG_REQUESTED;
 }
 
 /* cleanup_flush - finish queue file */
index 2118b96d9e44f94c6a3c16e0a28afc6f9ca58e1f..361875ec72e444f2eb36af0467c8ff1fbac1727f 100644 (file)
@@ -229,14 +229,14 @@ int     cleanup_bounce(CLEANUP_STATE *state)
            bounce_err =
                bounce_flush(BOUNCE_FLAG_CLEAN,
                             state->queue_name, state->queue_id,
-                            encoding, state->sender, dsn_envid,
-                            dsn_ret);
+                            encoding, state->smtputf8, state->sender,
+                            dsn_envid, dsn_ret);
        } else {
            bounce_err =
                bounce_flush_verp(BOUNCE_FLAG_CLEAN,
                                  state->queue_name, state->queue_id,
-                                 encoding, state->sender, dsn_envid,
-                                 dsn_ret, state->verp_delims);
+                                 encoding, state->smtputf8, state->sender,
+                                 dsn_envid, dsn_ret, state->verp_delims);
        }
        if (bounce_err != 0) {
            msg_warn("%s: bounce message failure", state->queue_id);
index 1f5aa51f11d27080f7fe6a3e4d2ee530de3322fb..261542ba81da64f8554411d561ae4a3caf70a834 100644 (file)
@@ -44,6 +44,7 @@
 #include <sys_defs.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stdio.h>                     /* ssscanf() */
 #include <ctype.h>
 
 /* Utility library. */
@@ -66,6 +67,7 @@
 #include <mail_proto.h>
 #include <dsn_mask.h>
 #include <rec_attr_map.h>
+#include <smtputf8.h>
 
 /* Application-specific. */
 
@@ -93,7 +95,8 @@ void    cleanup_envelope(CLEANUP_STATE *state, int type,
                       (REC_TYPE_SIZE_CAST2) 0, /* content offset */
                       (REC_TYPE_SIZE_CAST3) 0, /* recipient count */
                       (REC_TYPE_SIZE_CAST4) 0, /* qmgr options */
-                      (REC_TYPE_SIZE_CAST5) 0);        /* content length */
+                      (REC_TYPE_SIZE_CAST5) 0, /* content length */
+                      (REC_TYPE_SIZE_CAST6) 0);        /* smtputf8 */
 
     /*
      * Pass control to the actual envelope processing routine.
@@ -340,13 +343,19 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type,
 
     /*
      * Initial envelope non-recipient record processing.
+     * 
+     * If the message was requeued with "postsuper -r" use their
+     * SMTPUTF8_REQUESTED flag.
      */
     if (state->flags & CLEANUP_FLAG_INRCPT)
        /* Tell qmgr that recipient records are mixed with other information. */
        state->qmgr_opts |= QMGR_READ_FLAG_MIXED_RCPT_OTHER;
-    if (type == REC_TYPE_SIZE)
-       /* Use our own SIZE record instead. */
+    if (type == REC_TYPE_SIZE) {
+       /* Use our own SIZE record, except for the SMTPUTF8_REQUESTED flag. */
+       (void) sscanf(buf, "%*s $*s %*s %*s %*s %d", &state->smtputf8);
+       state->smtputf8 &= SMTPUTF8_FLAG_REQUESTED;
        return;
+    }
     if (mapped_type == REC_TYPE_CTIME)
        /* Use our own expiration time base record instead. */
        return;
index fc482c5d0a301c7801285b8dcdc7e83900345103..db77fc741d232dc53b155b5ff4ee8f31f51cb58b 100644 (file)
@@ -73,5 +73,6 @@ void    cleanup_final(CLEANUP_STATE *state)
                       (REC_TYPE_SIZE_CAST2) state->data_offset,
                       (REC_TYPE_SIZE_CAST3) state->rcpt_count,
                       (REC_TYPE_SIZE_CAST4) state->qmgr_opts,
-                      (REC_TYPE_SIZE_CAST5) state->cont_length);
+                      (REC_TYPE_SIZE_CAST5) state->cont_length,
+                      (REC_TYPE_SIZE_CAST6) state->smtputf8);
 }
index 90420807186a08d3ead4ec4653220062b56e7997..8905fad370680846e58d60eb4b353d4d690fe4ff 100644 (file)
@@ -80,6 +80,7 @@
 #include <vstring.h>
 #include <vstream.h>
 #include <split_at.h>
+#include <stringops.h>
 
 /* Global library. */
 
 #include <cleanup_user.h>
 #include <mail_params.h>
 #include <lex_822.h>
+#include <smtputf8.h>
 
 /* Application-specific. */
 
 #include "cleanup.h"
 
+#define STR    vstring_str
+
 /* cleanup_out - output one single record */
 
 void    cleanup_out(CLEANUP_STATE *state, int type, const char *string, ssize_t len)
@@ -170,6 +174,16 @@ void    cleanup_out_header(CLEANUP_STATE *state, VSTRING *header_buf)
     char   *next_line;
     ssize_t line_len;
 
+    /*
+     * Fix 20140711: Auto-detect the presence of a non-ASCII header.
+     */
+    if (var_smtputf8_enable && *STR(header_buf) && !allascii(STR(header_buf))) {
+       state->smtputf8 |= SMTPUTF8_FLAG_HEADER;
+       /* Fix 20140713: request SMTPUTF8 support selectively. */
+       if (state->flags & CLEANUP_FLAG_AUTOUTF8)
+           state->smtputf8 |= SMTPUTF8_FLAG_REQUESTED;
+    }
+
     /*
      * Prepend a tab to continued header lines that went through the address
      * rewriting machinery. See cleanup_fold_header(state) below for the form
index 50e90f158f0042172063828cb0a6d4559a72ddf4..340d32d6274681483b8fc627763bee212365b021 100644 (file)
@@ -127,6 +127,7 @@ CLEANUP_STATE *cleanup_state_alloc(VSTREAM *src)
     state->milter_ext_rcpt = 0;
     state->milter_err_text = 0;
     state->free_regions = state->body_regions = state->curr_body_region = 0;
+    state->smtputf8 = 0;
     return (state);
 }
 
index 2498f4fa4c949f3e06e7c212049db653f03c7e65..3efa489fb4f8788a0d98eebcfc1fa96adc179e65 100644 (file)
@@ -32,7 +32,8 @@ SRCS  = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \
        match_service.c mail_conf_nint.c addr_match_list.c mail_conf_nbool.c \
        smtp_reply_footer.c safe_ultostr.c verify_sender_addr.c \
        dict_memcache.c mail_version.c memcache_proto.c server_acl.c \
-       mkmap_fail.c haproxy_srvr.c dsn_filter.c dynamicmaps.c
+       mkmap_fail.c haproxy_srvr.c dsn_filter.c dynamicmaps.c uxtext.c \
+       smtputf8.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 \
@@ -66,8 +67,8 @@ OBJS  = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
        match_service.o mail_conf_nint.o addr_match_list.o mail_conf_nbool.o \
        smtp_reply_footer.o safe_ultostr.o verify_sender_addr.o \
        dict_memcache.o mail_version.o memcache_proto.o server_acl.o \
-       mkmap_fail.o haproxy_srvr.o dsn_filter.o dynamicmaps.o \
-       $(NON_PLUGIN_MAP_OBJ)
+       mkmap_fail.o haproxy_srvr.o dsn_filter.o dynamicmaps.o uxtext.o \
+       smtputf8.o $(NON_PLUGIN_MAP_OBJ)
 # 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.
@@ -99,7 +100,7 @@ HDRS = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \
        fold_addr.h header_body_checks.h data_redirect.h match_service.h \
        addr_match_list.h smtp_reply_footer.h safe_ultostr.h \
        verify_sender_addr.h dict_memcache.h memcache_proto.h server_acl.h \
-       haproxy_srvr.h dsn_filter.h dynamicmaps.h
+       haproxy_srvr.h dsn_filter.h dynamicmaps.h uxtext.h smtputf8.h
 TESTSRC        = rec2stream.c stream2rec.c recdump.c
 DEFS   = -I. -I$(INC_DIR) -D$(SYSTYPE)
 CFLAGS = $(DEBUG) $(OPT) $(DEFS)
@@ -113,7 +114,7 @@ TESTPROG= domain_list dot_lockfile mail_addr_crunch mail_addr_find \
        verify_clnt xtext anvil_clnt scache ehlo_mask \
        valid_mailhost_addr own_inet_addr header_body_checks \
        data_redirect addr_match_list safe_ultostr verify_sender_addr \
-       mail_version mail_dict server_acl
+       mail_version mail_dict server_acl uxtext
 
 LIBS   = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
 LIB_DIR        = ../../lib
@@ -305,6 +306,11 @@ strip_addr: $(LIB) $(LIBS)
        $(CC) -DTEST $(CFLAGS) -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
        mv junk $@.o
 
+uxtext: $(LIB) $(LIBS)
+       mv $@.o junk
+       $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
+       mv junk $@.o
+
 verify_clnt: $(LIB) $(LIBS)
        mv $@.o junk
        $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
@@ -1252,15 +1258,19 @@ input_transp.o: cleanup_user.h
 input_transp.o: input_transp.c
 input_transp.o: input_transp.h
 input_transp.o: mail_params.h
+int_filt.o: ../../include/attr.h
+int_filt.o: ../../include/iostuff.h
 int_filt.o: ../../include/msg.h
 int_filt.o: ../../include/name_mask.h
 int_filt.o: ../../include/sys_defs.h
 int_filt.o: ../../include/vbuf.h
+int_filt.o: ../../include/vstream.h
 int_filt.o: ../../include/vstring.h
 int_filt.o: cleanup_user.h
 int_filt.o: int_filt.c
 int_filt.o: int_filt.h
 int_filt.o: mail_params.h
+int_filt.o: mail_proto.h
 is_header.o: ../../include/sys_defs.h
 is_header.o: is_header.c
 is_header.o: is_header.h
@@ -1951,7 +1961,6 @@ post_mail.o: ../../include/vbuf.h
 post_mail.o: ../../include/vstream.h
 post_mail.o: ../../include/vstring.h
 post_mail.o: cleanup_user.h
-post_mail.o: int_filt.h
 post_mail.o: mail_date.h
 post_mail.o: mail_params.h
 post_mail.o: mail_proto.h
@@ -2203,6 +2212,19 @@ smtp_stream.o: ../../include/vstring.h
 smtp_stream.o: ../../include/vstring_vstream.h
 smtp_stream.o: smtp_stream.c
 smtp_stream.o: smtp_stream.h
+smtputf8.o: ../../include/attr.h
+smtputf8.o: ../../include/iostuff.h
+smtputf8.o: ../../include/msg.h
+smtputf8.o: ../../include/name_mask.h
+smtputf8.o: ../../include/sys_defs.h
+smtputf8.o: ../../include/vbuf.h
+smtputf8.o: ../../include/vstream.h
+smtputf8.o: ../../include/vstring.h
+smtputf8.o: cleanup_user.h
+smtputf8.o: mail_params.h
+smtputf8.o: mail_proto.h
+smtputf8.o: smtputf8.c
+smtputf8.o: smtputf8.h
 split_addr.o: ../../include/split_at.h
 split_addr.o: ../../include/sys_defs.h
 split_addr.o: mail_addr.h
@@ -2323,6 +2345,12 @@ user_acl.o: mypwd.h
 user_acl.o: string_list.h
 user_acl.o: user_acl.c
 user_acl.o: user_acl.h
+uxtext.o: ../../include/msg.h
+uxtext.o: ../../include/sys_defs.h
+uxtext.o: ../../include/vbuf.h
+uxtext.o: ../../include/vstring.h
+uxtext.o: uxtext.c
+uxtext.o: uxtext.h
 valid_mailhost_addr.o: ../../include/msg.h
 valid_mailhost_addr.o: ../../include/myaddrinfo.h
 valid_mailhost_addr.o: ../../include/sys_defs.h
index 76abd0bd6774be5d2abf3879bfde26e8a32a10f8..51a7a5bfee1117d78aad40971a4e33d13cac04d5 100644 (file)
@@ -6,24 +6,26 @@
 /* SYNOPSIS
 /*     #include <abounce.h>
 /*
-/*     void    abounce_flush(flags, queue, id, encoding, sender,
+/*     void    abounce_flush(flags, queue, id, encoding, smtputf8, sender,
 /*                             dsn_envid, dsn_ret, callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    abounce_flush_verp(flags, queue, id, encoding, sender,
+/*     void    abounce_flush_verp(flags, queue, id, encoding, smtputf8, sender,
 /*                             dsn_envid, dsn_ret, verp, callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    adefer_flush(flags, queue, id, encoding, sender,
+/*     void    adefer_flush(flags, queue, id, encoding, smtputf8, sender,
 /*                             dsn_envid, dsn_ret, callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    adefer_flush_verp(flags, queue, id, encoding, sender,
+/*     void    adefer_flush_verp(flags, queue, id, encoding, smtputf8, sender,
 /*                             dsn_envid, dsn_ret, verp, callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    adefer_warn(flags, queue, id, encoding, sender,
+/*     void    adefer_warn(flags, queue, id, encoding, smtputf8, sender,
 /*                             dsn_envid, dsn_ret, callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    atrace_flush(flags, queue, id, encoding, sender,
+/*     void    atrace_flush(flags, queue, id, encoding, smtputf8, sender,
 /*                             dsn_envid, dsn_ret, callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     file has the same name as the original message file.
 /* .IP encoding
 /*     The body content encoding: MAIL_ATTR_ENC_{7BIT,8BIT,NONE}.
+/* .IP smtputf8
+/*     The level of SMTPUTF8 support (to be defined).
 /* .IP sender
 /*     The sender envelope address.
 /* .IP dsn_envid
@@ -257,6 +265,7 @@ static void abounce_request_verp(const char *class, const char *service,
                                         int command, int flags,
                                         const char *queue, const char *id,
                                         const char *encoding,
+                                        int smtputf8,
                                         const char *sender,
                                         const char *dsn_envid,
                                         int dsn_ret,
@@ -284,13 +293,14 @@ static void abounce_request_verp(const char *class, const char *service,
                   ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                   ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                   ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                  ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
                   ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                   ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                   ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
                   ATTR_TYPE_STR, MAIL_ATTR_VERPDL, verp,
                   ATTR_TYPE_END) == 0
        && vstream_fflush(ap->fp) == 0) {
-       ABOUNCE_EVENT_ENABLE(vstream_fileno(ap->fp), abounce_event, 
+       ABOUNCE_EVENT_ENABLE(vstream_fileno(ap->fp), abounce_event,
                             (char *) ap, ABOUNCE_TIMEOUT);
     } else {
        abounce_done(ap, -1);
@@ -300,27 +310,28 @@ static void abounce_request_verp(const char *class, const char *service,
 /* abounce_flush_verp - asynchronous bounce flush */
 
 void    abounce_flush_verp(int flags, const char *queue, const char *id,
-                                  const char *encoding, const char *sender,
-                                  const char *dsn_envid, int dsn_ret,
-                                  const char *verp, ABOUNCE_FN callback,
+                                  const char *encoding, int smtputf8,
+                                  const char *sender, const char *dsn_envid,
+                                  int dsn_ret, const char *verp,
+                                  ABOUNCE_FN callback,
                                   char *context)
 {
     abounce_request_verp(MAIL_CLASS_PRIVATE, var_bounce_service,
-                        BOUNCE_CMD_VERP, flags, queue, id, encoding,
+                     BOUNCE_CMD_VERP, flags, queue, id, encoding, smtputf8,
                       sender, dsn_envid, dsn_ret, verp, callback, context);
 }
 
 /* adefer_flush_verp - asynchronous defer flush */
 
 void    adefer_flush_verp(int flags, const char *queue, const char *id,
-                                 const char *encoding, const char *sender,
-                                 const char *dsn_envid, int dsn_ret,
-                                 const char *verp, ABOUNCE_FN callback,
-                                 char *context)
+                                 const char *encoding, int smtputf8,
+                                 const char *sender, const char *dsn_envid,
+                                 int dsn_ret, const char *verp,
+                                 ABOUNCE_FN callback, char *context)
 {
     flags |= BOUNCE_FLAG_DELRCPT;
     abounce_request_verp(MAIL_CLASS_PRIVATE, var_defer_service,
-                        BOUNCE_CMD_VERP, flags, queue, id, encoding,
+                     BOUNCE_CMD_VERP, flags, queue, id, encoding, smtputf8,
                       sender, dsn_envid, dsn_ret, verp, callback, context);
 }
 
@@ -329,7 +340,8 @@ void    adefer_flush_verp(int flags, const char *queue, const char *id,
 static void abounce_request(const char *class, const char *service,
                                    int command, int flags,
                                    const char *queue, const char *id,
-                                   const char *encoding, const char *sender,
+                                   const char *encoding, int smtputf8,
+                                   const char *sender,
                                    const char *dsn_envid, int dsn_ret,
                                    ABOUNCE_FN callback, char *context)
 {
@@ -353,12 +365,13 @@ static void abounce_request(const char *class, const char *service,
                   ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                   ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                   ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                  ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
                   ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                   ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                   ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
                   ATTR_TYPE_END) == 0
        && vstream_fflush(ap->fp) == 0) {
-       ABOUNCE_EVENT_ENABLE(vstream_fileno(ap->fp), abounce_event, 
+       ABOUNCE_EVENT_ENABLE(vstream_fileno(ap->fp), abounce_event,
                             (char *) ap, ABOUNCE_TIMEOUT);
     } else {
        abounce_done(ap, -1);
@@ -368,48 +381,49 @@ static void abounce_request(const char *class, const char *service,
 /* abounce_flush - asynchronous bounce flush */
 
 void    abounce_flush(int flags, const char *queue, const char *id,
-                             const char *encoding, const char *sender,
-                             const char *dsn_envid, int dsn_ret,
-                             ABOUNCE_FN callback, char *context)
+                             const char *encoding, int smtputf8,
+                             const char *sender, const char *dsn_envid,
+                             int dsn_ret, ABOUNCE_FN callback,
+                             char *context)
 {
     abounce_request(MAIL_CLASS_PRIVATE, var_bounce_service, BOUNCE_CMD_FLUSH,
-                   flags, queue, id, encoding, sender, dsn_envid, dsn_ret,
-                   callback, context);
+                   flags, queue, id, encoding, smtputf8, sender, dsn_envid,
+                   dsn_ret, callback, context);
 }
 
 /* adefer_flush - asynchronous defer flush */
 
 void    adefer_flush(int flags, const char *queue, const char *id,
-                            const char *encoding, const char *sender,
-                            const char *dsn_envid, int dsn_ret,
-                            ABOUNCE_FN callback, char *context)
+                            const char *encoding, int smtputf8,
+                            const char *sender, const char *dsn_envid,
+                            int dsn_ret, ABOUNCE_FN callback, char *context)
 {
     flags |= BOUNCE_FLAG_DELRCPT;
     abounce_request(MAIL_CLASS_PRIVATE, var_defer_service, BOUNCE_CMD_FLUSH,
-                   flags, queue, id, encoding, sender, dsn_envid, dsn_ret,
-                   callback, context);
+                   flags, queue, id, encoding, smtputf8, sender, dsn_envid,
+                   dsn_ret, callback, context);
 }
 
 /* adefer_warn - send copy of defer log to sender as warning bounce */
 
 void    adefer_warn(int flags, const char *queue, const char *id,
-                           const char *encoding, const char *sender,
-                           const char *dsn_envid, int dsn_ret,
-                           ABOUNCE_FN callback, char *context)
+                           const char *encoding, int smtputf8,
+                           const char *sender, const char *dsn_envid,
+                           int dsn_ret, ABOUNCE_FN callback, char *context)
 {
     abounce_request(MAIL_CLASS_PRIVATE, var_defer_service, BOUNCE_CMD_WARN,
-                   flags, queue, id, encoding, sender, dsn_envid, dsn_ret,
-                   callback, context);
+                   flags, queue, id, encoding, smtputf8, sender, dsn_envid,
+                   dsn_ret, callback, context);
 }
 
 /* atrace_flush - asynchronous trace flush */
 
 void    atrace_flush(int flags, const char *queue, const char *id,
-                            const char *encoding, const char *sender,
-                            const char *dsn_envid, int dsn_ret,
-                            ABOUNCE_FN callback, char *context)
+                            const char *encoding, int smtputf8,
+                            const char *sender, const char *dsn_envid,
+                            int dsn_ret, ABOUNCE_FN callback, char *context)
 {
     abounce_request(MAIL_CLASS_PRIVATE, var_trace_service, BOUNCE_CMD_TRACE,
-                   flags, queue, id, encoding, sender, dsn_envid, dsn_ret,
-                   callback, context);
+                   flags, queue, id, encoding, smtputf8, sender, dsn_envid,
+                   dsn_ret, callback, context);
 }
index dc4264b6b871efff7e87b45aa02ee82d2754e2a8..18141be21c199b99467aa65ede9bcba2871ad2c8 100644 (file)
   */
 typedef void (*ABOUNCE_FN) (int, char *);
 
-extern void abounce_flush(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
-extern void adefer_flush(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
-extern void adefer_warn(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
-extern void atrace_flush(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
+extern void abounce_flush(int, const char *, const char *, const char *, int, const char *, const char *, int, ABOUNCE_FN, char *);
+extern void adefer_flush(int, const char *, const char *, const char *, int, const char *, const char *, int, ABOUNCE_FN, char *);
+extern void adefer_warn(int, const char *, const char *, const char *, int, const char *, const char *, int, ABOUNCE_FN, char *);
+extern void atrace_flush(int, const char *, const char *, const char *, int, const char *, const char *, int, ABOUNCE_FN, char *);
 
-extern void abounce_flush_verp(int, const char *, const char *, const char *, const char *, const char *, int, const char *, ABOUNCE_FN, char *);
-extern void adefer_flush_verp(int, const char *, const char *, const char *, const char *, const char *, int, const char *, ABOUNCE_FN, char *);
+extern void abounce_flush_verp(int, const char *, const char *, const char *, int, const char *, const char *, int, const char *, ABOUNCE_FN, char *);
+extern void adefer_flush_verp(int, const char *, const char *, const char *, int, const char *, const char *, int, const char *, ABOUNCE_FN, char *);
 
 /* LICENSE
 /* .ad
index e246ce3eaf2f1f7192e59fc34cab310b9900907e..94e7df75be27c16bed6b173c41c99f34cff23972 100644 (file)
 /*     const char *relay;
 /*     DSN     *dsn;
 /*
-/*     int     bounce_flush(flags, queue, id, encoding, sender,
+/*     int     bounce_flush(flags, queue, id, encoding, smtputf8, sender,
 /*                             dsn_envid, dsn_ret)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*
-/*     int     bounce_flush_verp(flags, queue, id, encoding, sender,
-/*                             dsn_envid, dsn_ret, verp_delims)
+/*     int     bounce_flush_verp(flags, queue, id, encoding, smtputf8,
+/*                             sender, dsn_envid, dsn_ret, verp_delims)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     const char *verp_delims;
 /*
-/*     int     bounce_one(flags, queue, id, encoding, sender, envid, ret,
-/*                             stats, recipient, relay, dsn)
+/*     int     bounce_one(flags, queue, id, encoding, smtputf8, sender,
+/*                             dsn_envid, ret, stats, recipient, relay, dsn)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     RECIPIENT *rcpt;
 /*     const char *relay;
 /*
-/*     int     bounce_one_intern(flags, queue, id, encoding, sender, envid, ret,
-/*                             stats, recipient, relay, dsn)
+/*     int     bounce_one_intern(flags, queue, id, encoding, smtputf8, sender,
+/*                             dsn_envid, ret, stats, recipient, relay, dsn)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     This information is used for syslogging only.
 /* .IP encoding
 /*     The body content encoding: MAIL_ATTR_ENC_{7BIT,8BIT,NONE}.
+/* .IP smtputf8
+/*     The level of SMTPUTF8 support (to be defined).
 /* .IP sender
 /*     The sender envelope address.
 /* .IP dsn_envid
@@ -233,7 +239,7 @@ int     bounce_append(int flags, const char *id, MSG_STATS *stats,
      * DSN filter (Postfix 2.12).
      */
     if (delivery_status_filter != 0
-      && (dsn_res = dsn_filter_lookup(delivery_status_filter, &my_dsn)) != 0) {
+    && (dsn_res = dsn_filter_lookup(delivery_status_filter, &my_dsn)) != 0) {
        if (dsn_res->status[0] == '4')
            return (defer_append_intern(flags, id, stats, rcpt, relay, dsn_res));
        my_dsn = *dsn_res;
@@ -335,8 +341,9 @@ int     bounce_append_intern(int flags, const char *id, MSG_STATS *stats,
 /* bounce_flush - flush the bounce log and deliver to the sender */
 
 int     bounce_flush(int flags, const char *queue, const char *id,
-                            const char *encoding, const char *sender,
-                            const char *dsn_envid, int dsn_ret)
+                            const char *encoding, int smtputf8,
+                            const char *sender, const char *dsn_envid,
+                            int dsn_ret)
 {
 
     /*
@@ -351,6 +358,7 @@ int     bounce_flush(int flags, const char *queue, const char *id,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
                            ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                            ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                            ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
@@ -367,9 +375,9 @@ int     bounce_flush(int flags, const char *queue, const char *id,
 /* bounce_flush_verp - verpified notification */
 
 int     bounce_flush_verp(int flags, const char *queue, const char *id,
-                                 const char *encoding, const char *sender,
-                                 const char *dsn_envid, int dsn_ret,
-                                 const char *verp_delims)
+                                 const char *encoding, int smtputf8,
+                                 const char *sender, const char *dsn_envid,
+                                 int dsn_ret, const char *verp_delims)
 {
 
     /*
@@ -384,6 +392,7 @@ int     bounce_flush_verp(int flags, const char *queue, const char *id,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
                            ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                            ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                            ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
@@ -401,9 +410,9 @@ int     bounce_flush_verp(int flags, const char *queue, const char *id,
 /* bounce_one - send notice for one recipient */
 
 int     bounce_one(int flags, const char *queue, const char *id,
-                          const char *encoding, const char *sender,
-                          const char *dsn_envid, int dsn_ret,
-                          MSG_STATS *stats, RECIPIENT *rcpt,
+                          const char *encoding, int smtputf8,
+                          const char *sender, const char *dsn_envid,
+                          int dsn_ret, MSG_STATS *stats, RECIPIENT *rcpt,
                           const char *relay, DSN *dsn)
 {
     DSN     my_dsn = *dsn;
@@ -421,22 +430,23 @@ int     bounce_one(int flags, const char *queue, const char *id,
      * DSN filter (Postfix 2.12).
      */
     if (delivery_status_filter != 0
-      && (dsn_res = dsn_filter_lookup(delivery_status_filter, &my_dsn)) != 0) {
+    && (dsn_res = dsn_filter_lookup(delivery_status_filter, &my_dsn)) != 0) {
        if (dsn_res->status[0] == '4')
            return (defer_append_intern(flags, id, stats, rcpt, relay, dsn_res));
        my_dsn = *dsn_res;
     }
-    return (bounce_one_intern(flags, queue, id, encoding, sender, dsn_envid,
-                             dsn_ret, stats, rcpt, relay, &my_dsn));
+    return (bounce_one_intern(flags, queue, id, encoding, smtputf8, sender,
+                         dsn_envid, dsn_ret, stats, rcpt, relay, &my_dsn));
 }
 
 /* bounce_one_intern - send notice for one recipient */
 
 int     bounce_one_intern(int flags, const char *queue, const char *id,
-                                 const char *encoding, const char *sender,
-                                 const char *dsn_envid, int dsn_ret,
-                                 MSG_STATS *stats, RECIPIENT *rcpt,
-                                 const char *relay, DSN *dsn)
+                                 const char *encoding, int smtputf8,
+                                 const char *sender, const char *dsn_envid,
+                                 int dsn_ret, MSG_STATS *stats,
+                                 RECIPIENT *rcpt, const char *relay,
+                                 DSN *dsn)
 {
     DSN     my_dsn = *dsn;
     int     status;
@@ -489,6 +499,7 @@ int     bounce_one_intern(int flags, const char *queue, const char *id,
                                ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                                ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                                ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                               ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
                                ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                              ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                                ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
index b72503edb20f7d69b4d5220bbf4035cbda6c883d..e2d67bd3a86c2a44c9830fe8063efedb935065e9 100644 (file)
   */
 extern int bounce_append(int, const char *, MSG_STATS *, RECIPIENT *,
                                 const char *, DSN *);
-extern int bounce_flush(int, const char *, const char *, const char *,
+extern int bounce_flush(int, const char *, const char *, const char *, int,
                                const char *, const char *, int);
-extern int bounce_flush_verp(int, const char *, const char *, const char *,
+extern int bounce_flush_verp(int, const char *, const char *, const char *, int,
                             const char *, const char *, int, const char *);
-extern int bounce_one(int, const char *, const char *, const char *,
+extern int bounce_one(int, const char *, const char *, const char *, int,
                              const char *, const char *,
                              int, MSG_STATS *, RECIPIENT *,
                              const char *, DSN *);
@@ -79,7 +79,7 @@ extern DSN_FILTER *delivery_status_filter;
 extern int bounce_append_intern(int, const char *, MSG_STATS *, RECIPIENT *,
                                        const char *, DSN *);
 extern int bounce_one_intern(int, const char *, const char *, const char *,
-                                    const char *, const char *,
+                                    int, const char *, const char *,
                                     int, MSG_STATS *, RECIPIENT *,
                                     const char *, DSN *);
 
index d2a687c833270ec8dec127fb2b55bddc52cdbfee..11c7e08814711a59e6bb09b186b4db3f204fa6c5 100644 (file)
@@ -53,6 +53,7 @@ static struct cleanup_flag_map cleanup_flag_map[] = {
     CLEANUP_FLAG_MAP_OK, "enable_address_mapping",
     CLEANUP_FLAG_MILTER, "enable_milters",
     CLEANUP_FLAG_SMTP_REPLY, "enable_smtp_reply",
+    CLEANUP_FLAG_SMTPUTF8, "smtputf8_requested",
 };
 
 /* cleanup_strflags - map flags code to printable string */
index 0a098d3da65abd3b415d09995c6cb0f298dd7315..a4de82a65e5e37d50a3ef1180d3864a22a014785 100644 (file)
@@ -23,6 +23,8 @@
 #define CLEANUP_FLAG_MAP_OK    (1<<5)  /* Ok to map addresses */
 #define CLEANUP_FLAG_MILTER    (1<<6)  /* Enable Milter applications */
 #define CLEANUP_FLAG_SMTP_REPLY        (1<<7)  /* Enable SMTP reply */
+#define CLEANUP_FLAG_SMTPUTF8  (1<<8)  /* SMTPUTF8 requested */
+#define CLEANUP_FLAG_AUTOUTF8  (1<<9)  /* Autodetect SMTPUTF8 */
 
 #define CLEANUP_FLAG_FILTER_ALL        (CLEANUP_FLAG_FILTER | CLEANUP_FLAG_MILTER)
  /*
index 7ca6071d48d90ef99777efef3e8cf27cfb1cb9a6..110d2fc91fba8d24f5d7e222fe90e1aa1a448860 100644 (file)
 /*     const char *relay;
 /*     DSN     *dsn;
 /*
-/*     int     defer_flush(flags, queue, id, encoding, sender,
+/*     int     defer_flush(flags, queue, id, encoding, smtputf8, sender,
 /*                             dsn_envid, dsn_ret)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*
-/*     int     defer_warn(flags, queue, id, encoding, sender,
-/*                             dsn_envid, dsn_ret)
+/*     int     defer_warn(flags, queue, id, encoding, smtputf8, sender, 
+                               dsn_envid, dsn_ret)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*
-/*     int     defer_one(flags, queue, id, encoding, sender, envid, ret,
-/*                             stats, recipient, relay, dsn)
+/*     int     defer_one(flags, queue, id, encoding, smtputf8, sender,
+/*                             dsn_envid, ret, stats, recipient, relay, dsn)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
 /*     const char *encoding;
+/*     int     smtputf8;
 /*     const char *sender;
 /*     const char *dsn_envid;
 /*     int     dsn_ret;
 /*     Delivery status. See dsn(3). The specified action is ignored.
 /* .IP encoding
 /*     The body content encoding: MAIL_ATTR_ENC_{7BIT,8BIT,NONE}.
+/* .IP smtputf8
+/*     The level of SMTPUTF8 support (to be defined).
 /* .IP sender
 /*     The sender envelope address.
 /* .IP dsn_envid
@@ -289,8 +294,9 @@ int     defer_append_intern(int flags, const char *id, MSG_STATS *stats,
 /* defer_flush - flush the defer log and deliver to the sender */
 
 int     defer_flush(int flags, const char *queue, const char *id,
-                           const char *encoding, const char *sender,
-                           const char *dsn_envid, int dsn_ret)
+                           const char *encoding, int smtputf8,
+                           const char *sender, const char *dsn_envid,
+                           int dsn_ret)
 {
     flags |= BOUNCE_FLAG_DELRCPT;
 
@@ -300,6 +306,7 @@ int     defer_flush(int flags, const char *queue, const char *id,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
                            ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                            ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                            ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
@@ -314,8 +321,8 @@ int     defer_flush(int flags, const char *queue, const char *id,
  * do not flush the log */
 
 int     defer_warn(int flags, const char *queue, const char *id,
-                          const char *encoding, const char *sender,
-                          const char *envid, int dsn_ret)
+                       const char *encoding, int smtputf8,
+                        const char *sender, const char *envid, int dsn_ret)
 {
     if (mail_command_client(MAIL_CLASS_PRIVATE, var_defer_service,
                            ATTR_TYPE_INT, MAIL_ATTR_NREQ, BOUNCE_CMD_WARN,
@@ -323,6 +330,7 @@ int     defer_warn(int flags, const char *queue, const char *id,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, id,
                            ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                           ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
                            ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
                            ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, envid,
                            ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, dsn_ret,
@@ -336,9 +344,9 @@ int     defer_warn(int flags, const char *queue, const char *id,
 /* defer_one - defer mail for one recipient */
 
 int     defer_one(int flags, const char *queue, const char *id,
-                         const char *encoding, const char *sender,
-                         const char *dsn_envid, int dsn_ret,
-                         MSG_STATS *stats, RECIPIENT *rcpt,
+                         const char *encoding, int smtputf8,
+                         const char *sender, const char *dsn_envid,
+                         int dsn_ret, MSG_STATS *stats, RECIPIENT *rcpt,
                          const char *relay, DSN *dsn)
 {
     DSN     my_dsn = *dsn;
@@ -358,9 +366,9 @@ int     defer_one(int flags, const char *queue, const char *id,
     if (delivery_status_filter != 0
     && (dsn_res = dsn_filter_lookup(delivery_status_filter, &my_dsn)) != 0) {
        if (dsn_res->status[0] == '5')
-           return (bounce_one_intern(flags, queue, id, encoding, sender,
-                                     dsn_envid, dsn_ret, stats, rcpt,
-                                     relay, dsn_res));
+           return (bounce_one_intern(flags, queue, id, encoding, smtputf8,
+                                     sender, dsn_envid, dsn_ret, stats,
+                                     rcpt, relay, dsn_res));
        my_dsn = *dsn_res;
     }
     return (defer_append_intern(flags, id, stats, rcpt, relay, &my_dsn));
index 90f94e20d91d9629f26a8da5c48b48601e13621d..a015052f5da1ca073eee5556053d4a7d52d572e1 100644 (file)
   */
 extern int defer_append(int, const char *, MSG_STATS *, RECIPIENT *,
                                const char *, DSN *);
-extern int defer_flush(int, const char *, const char *, const char *,
+extern int defer_flush(int, const char *, const char *, const char *, int,
                               const char *, const char *, int);
-extern int defer_warn(int, const char *, const char *, const char *,
+extern int defer_warn(int, const char *, const char *, const char *, int,
                              const char *, const char *, int);
-extern int defer_one(int, const char *, const char *, const char *,
+extern int defer_one(int, const char *, const char *, const char *, int,
                             const char *, const char *,
                             int, MSG_STATS *, RECIPIENT *,
                             const char *, DSN *);
index 0eaa45ddffacc0fb5d9beae4080a2c3144cc544a..01b70b942056e247b7af1282e9cec10e7a2644a3 100644 (file)
@@ -105,6 +105,7 @@ static int deliver_pass_send_request(VSTREAM *stream, DELIVER_REQUEST *request,
               ATTR_TYPE_LONG, MAIL_ATTR_SIZE, request->data_size,
               ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, nexthop,
               ATTR_TYPE_STR, MAIL_ATTR_ENCODING, request->encoding,
+              ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, request->smtputf8,
               ATTR_TYPE_STR, MAIL_ATTR_SENDER, request->sender,
               ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, request->dsn_envid,
               ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, request->dsn_ret,
index e32e82fb9d3c62fee340bb025321787bae929664..1eccd7d21c30c26b40db96c1862ba438e5f04bca 100644 (file)
@@ -208,6 +208,7 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
     static VSTRING *dsn_envid;
     static RCPT_BUF *rcpt_buf;
     int     rcpt_count;
+    int     smtputf8;
     int     dsn_ret;
 
     /*
@@ -247,6 +248,7 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
                  ATTR_TYPE_LONG, MAIL_ATTR_SIZE, &request->data_size,
                  ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, nexthop,
                  ATTR_TYPE_STR, MAIL_ATTR_ENCODING, encoding,
+                 ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, &smtputf8,
                  ATTR_TYPE_STR, MAIL_ATTR_SENDER, address,
                  ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, dsn_envid,
                  ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, &dsn_ret,
@@ -265,7 +267,7 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
                  ATTR_TYPE_STR, MAIL_ATTR_LOG_IDENT, log_ident,
                  ATTR_TYPE_STR, MAIL_ATTR_RWR_CONTEXT, rewrite_context,
                  ATTR_TYPE_INT, MAIL_ATTR_RCPT_COUNT, &rcpt_count,
-                 ATTR_TYPE_END) != 22) {
+                 ATTR_TYPE_END) != 23) {
        msg_warn("%s: error receiving common attributes", myname);
        return (-1);
     }
@@ -281,6 +283,8 @@ static int deliver_request_get(VSTREAM *stream, DELIVER_REQUEST *request)
     request->queue_id = mystrdup(vstring_str(queue_id));
     request->nexthop = mystrdup(vstring_str(nexthop));
     request->encoding = mystrdup(vstring_str(encoding));
+    /* Fix 20140708: dedicated smtputf8 attribute with its own flags. */
+    request->smtputf8 = smtputf8;
     request->sender = mystrdup(vstring_str(address));
     request->client_name = mystrdup(vstring_str(client_name));
     request->client_addr = mystrdup(vstring_str(client_addr));
index d2ca7719df978e03cd7f253482b3149a75f5592c..8ab36fc1a9c6a5e38b0d6adb4b5f6b8e4d6c73c1 100644 (file)
@@ -36,6 +36,7 @@ typedef struct DELIVER_REQUEST {
     long    data_size;                 /* message size */
     char   *nexthop;                   /* next hop name */
     char   *encoding;                  /* content encoding */
+    int     smtputf8;                  /* SMTPUTF8 level */
     char   *sender;                    /* envelope sender */
     MSG_STATS msg_stats;               /* time profile */
     RECIPIENT_LIST rcpt_list;          /* envelope recipients */
index ba603a60497a722cd75781d670adeb83294efb0d..0b7bf80277a116ecf1d18d7ea7d997bd2af26040 100644 (file)
@@ -1340,7 +1340,7 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name)
     /*
      * Don't frustrate future attempts to make Postfix UTF-8 transparent.
      */
-    if (!valid_utf_8(name, strlen(name))) {
+    if (!valid_utf8_string(name, strlen(name))) {
        if (msg_verbose)
            msg_info("%s: %s: Skipping lookup of non-UTF-8 key '%s'",
                     myname, dict_ldap->parser->name, name);
index 8eb0da2f78c6c7ccde0a9aff39dc64ffbf276183..9f68a0d972e532000178019726c0e6eff0b4bcbc 100644 (file)
@@ -165,7 +165,7 @@ static const char *dict_sqlite_lookup(DICT *dict, const char *name)
     /*
      * Don't frustrate future attempts to make Postfix UTF-8 transparent.
      */
-    if (!valid_utf_8(name, strlen(name))) {
+    if (!valid_utf8_string(name, strlen(name))) {
        if (msg_verbose)
            msg_info("%s: %s: Skipping lookup of non-UTF-8 key '%s'",
                     myname, dict_sqlite->parser->name, name);
index 9c60dc74949b15cfb0e76df1317c610e27653d5a..1671beb3ec0121bacbc02a93906e396852385576 100644 (file)
@@ -18,6 +18,7 @@
 /*     #define EHLO_MASK_XFORWARD      (1<<9)
 /*     #define EHLO_MASK_ENHANCEDSTATUSCODES   (1<<10)
 /*     #define EHLO_MASK_DSN           (1<<11)
+/*     #define EHLO_MASK_SMTPUTF8      (1<<12)
 /*     #define EHLO_MASK_SILENT        (1<<15)
 /*
 /*     int     ehlo_mask(keyword_list)
@@ -75,6 +76,7 @@ static const NAME_MASK ehlo_mask_table[] = {
     "STARTTLS", EHLO_MASK_STARTTLS,
     "ENHANCEDSTATUSCODES", EHLO_MASK_ENHANCEDSTATUSCODES,
     "DSN", EHLO_MASK_DSN,
+    "EHLO_MASK_SMTPUTF8", EHLO_MASK_SMTPUTF8,
     "SILENT-DISCARD", EHLO_MASK_SILENT,        /* XXX In-band signaling */
     0,
 };
index 62256f1127b9478fb9ff2e0f41340add9a5f2a08..3ef2a2d870d401ccef92bef66812bc13a0e840a2 100644 (file)
@@ -27,6 +27,7 @@
 #define EHLO_MASK_XFORWARD     (1<<9)
 #define EHLO_MASK_ENHANCEDSTATUSCODES  (1<<10)
 #define EHLO_MASK_DSN          (1<<11)
+#define EHLO_MASK_SMTPUTF8     (1<<12)
 #define EHLO_MASK_SILENT       (1<<15)
 
 extern int ehlo_mask(const char *);
index a93a3e69872b260c98bc02c6fe9bed439e03e4fc..7c5f8b51f7b7aebd6f5a2a08ca5d5b0b0fbc96f8 100644 (file)
 /*     the internal_mail_filter_classes configuration parameter.
 /*
 /*     Specify one of the following:
-/* .IP INT_FILT_MASK_NONE
-/*     Mail that must be excluded from inspection (address probes, etc.).
-/* .IP INT_FILT_MASK_NOTIFY
+/* .IP MAIL_SRC_MASK_NOTIFY
 /*     Postmaster notifications from the smtpd(8) and smtp(8)
 /*     protocol adapters.
-/* .IP INT_FILT_MASK_BOUNCE
+/* .IP MAIL_SRC_MASK_BOUNCE
 /*     Delivery status notifications from the bounce(8) server.
+/* .PP
+/*     Other MAIL_SRC_MASK_XXX arguments are permited but will
+/*     have no effect.
 /* DIAGNOSTICS
 /*     Fatal: invalid mail category name.
 /* LICENSE
@@ -47,6 +48,7 @@
 
 #include <mail_params.h>
 #include <cleanup_user.h>
+#include <mail_proto.h>
 #include <int_filt.h>
 
 /* int_filt_flags - map mail class to submission flags */
 int     int_filt_flags(int class)
 {
     static const NAME_MASK table[] = {
-       INT_FILT_CLASS_NOTIFY, INT_FILT_MASK_NOTIFY,
-       INT_FILT_CLASS_BOUNCE, INT_FILT_MASK_BOUNCE,
+       MAIL_SRC_NAME_NOTIFY, MAIL_SRC_MASK_NOTIFY,
+       MAIL_SRC_NAME_BOUNCE, MAIL_SRC_MASK_BOUNCE,
+       MAIL_SRC_NAME_SENDMAIL, 0,
+       MAIL_SRC_NAME_SMTPD, 0,
+       MAIL_SRC_NAME_QMQPD, 0,
+       MAIL_SRC_NAME_FORWARD, 0,
+       MAIL_SRC_NAME_VERIFY, 0,
        0,
     };
     int     filtered_classes = 0;
index f7b2d2ce17f3dcbd53c9fbd9e04b0d4c4be565ee..a6e479ff354009c94672ea719baa219cbe3d1f0f 100644 (file)
 /*     bool    var_long_queue_ids;
 /*     bool    var_daemon_open_fatal;
 /*     char    *var_dsn_filter;
+/*     int     var_smtputf8_enable
+/*     int     var_strict_smtputf8;
+/*     char    *var_smtputf8_autoclass;
 /*
 /*     void    mail_params_init()
 /*
@@ -316,6 +319,9 @@ bool    var_multi_enable;
 bool    var_long_queue_ids;
 bool    var_daemon_open_fatal;
 char   *var_dsn_filter;
+int     var_smtputf8_enable;
+int     var_strict_smtputf8;
+char   *var_smtputf8_autoclass;
 
 const char null_format_string[1] = "";
 
@@ -598,6 +604,7 @@ void    mail_params_init()
        /* multi_instance_wrapper may have dependencies but not dependents. */
        VAR_MULTI_WRAPPER, DEF_MULTI_WRAPPER, &var_multi_wrapper, 0, 0,
        VAR_DSN_FILTER, DEF_DSN_FILTER, &var_dsn_filter, 0, 0,
+       VAR_SMTPUTF8_AUTOCLASS, DEF_SMTPUTF8_AUTOCLASS, &var_smtputf8_autoclass, 1, 0,
        0,
     };
     static const CONFIG_STR_FN_TABLE function_str_defaults_2[] = {
@@ -659,6 +666,8 @@ void    mail_params_init()
        VAR_CYRUS_SASL_AUTHZID, DEF_CYRUS_SASL_AUTHZID, &var_cyrus_sasl_authzid,
        VAR_MULTI_ENABLE, DEF_MULTI_ENABLE, &var_multi_enable,
        VAR_LONG_QUEUE_IDS, DEF_LONG_QUEUE_IDS, &var_long_queue_ids,
+       VAR_SMTPUTF8_ENABLE, DEF_SMTPUTF8_ENABLE, &var_smtputf8_enable,
+       VAR_STRICT_SMTPUTF8, DEF_STRICT_SMTPUTF8, &var_strict_smtputf8,
        0,
     };
     const char *cp;
@@ -734,6 +743,16 @@ void    mail_params_init()
     dict_db_cache_size = var_db_read_buf;
     dict_lmdb_map_size = var_lmdb_map_size;
     inet_windowsize = var_inet_windowsize;
+    temp_utf8_kludge = var_smtputf8_enable;
+
+    /*
+     * Report run-time versus compile-time discrepancies.
+     */
+#ifdef NO_IDNA
+    if (var_smtputf8_enable)
+       msg_warn("%s is true, but EAI support is not compiled in",
+                VAR_SMTPUTF8_ENABLE);
+#endif
 
     /*
      * Variables whose defaults are determined at runtime, after other
index 877d89c03773d31bbaf82829349f153770e29a4e..3b402a708ba10b6d187737c536b83723a879358f 100644 (file)
@@ -3822,6 +3822,22 @@ extern char *var_shlib_dir;
 #endif
 extern char *var_meta_dir;
 
+ /*
+  * SMTPUTF8 support.
+  */
+#define VAR_SMTPUTF8_ENABLE            "smtputf8_enable"
+#define DEF_SMTPUTF8_ENABLE            0
+extern int var_smtputf8_enable;
+
+#define VAR_STRICT_SMTPUTF8            "strict_smtputf8"
+#define DEF_STRICT_SMTPUTF8            0
+extern int var_strict_smtputf8;
+
+#define VAR_SMTPUTF8_AUTOCLASS         "smtputf8_autodetect_classes"
+#define DEF_SMTPUTF8_AUTOCLASS         MAIL_SRC_NAME_SENDMAIL ", " \
+                                       MAIL_SRC_NAME_VERIFY
+extern char *var_smtputf8_autoclass;
+
 /* LICENSE
 /* .ad
 /* .fi
index 976b12590af392d10503a48f203602e7605cfc1d..d9979ec2d9346a775faaa9862228cd282b553b9e 100644 (file)
 #define MAIL_SERVICE_DNSBLOG   "dnsblog"
 #define MAIL_SERVICE_TLSPROXY  "tlsproxy"
 
+ /*
+  * Mail source classes. Used to specify policy decisions for content
+  * inspection and SMTPUTF8 detection.
+  */
+#define MAIL_SRC_NAME_SENDMAIL "sendmail"      /* sendmail(1) */
+#define MAIL_SRC_NAME_SMTPD    "smtpd" /* smtpd(8) */
+#define MAIL_SRC_NAME_QMQPD    "qmqpd" /* qmqpd(8) */
+#define MAIL_SRC_NAME_FORWARD  "forward"       /* local(8) forward/alias */
+#define MAIL_SRC_NAME_BOUNCE   "bounce"/* bounce(8) */
+#define MAIL_SRC_NAME_NOTIFY   "notify"/* protocol etc. errors */
+#define MAIL_SRC_NAME_VERIFY   "verify"/* protocol etc. errors */
+#define MAIL_SRC_NAME_ALL      "all"   /* all sources */
+
+#define MAIL_SRC_MASK_SENDMAIL (1<<0)  /* sendmail(1) */
+#define MAIL_SRC_MASK_SMTPD    (1<<1)  /* smtpd(8) */
+#define MAIL_SRC_MASK_QMQPD    (1<<2)  /* qmqpd(8) */
+#define MAIL_SRC_MASK_FORWARD  (1<<3)  /* local(8) forward/alias */
+#define MAIL_SRC_MASK_BOUNCE   (1<<4)  /* bounce(8) */
+#define MAIL_SRC_MASK_NOTIFY   (1<<5)  /* protocol etc. errors */
+#define MAIL_SRC_MASK_VERIFY   (1<<6)  /* protocol etc. errors */
+
+#define MAIL_SRC_MASK_ALL \
+       ( MAIL_SRC_MASK_SENDMAIL | MAIL_SRC_MASK_SMTPD \
+       | MAIL_SRC_MASK_QMQPD |  MAIL_SRC_MASK_FORWARD \
+       | MAIL_SRC_MASK_BOUNCE | MAIL_SRC_MASK_NOTIFY)
+
  /*
   * Well-known socket or FIFO directories. The main difference is in file
   * access permissions.
@@ -244,6 +270,7 @@ extern char *mail_pathname(const char *, const char *);
 #define MAIL_ATTR_DSN_RET      "ret_flags"     /* dsn full/headers */
 #define MAIL_ATTR_DSN_NOTIFY   "notify_flags"  /* dsn notify flags */
 #define MAIL_ATTR_DSN_ORCPT    "dsn_orig_rcpt" /* dsn original recipient */
+#define MAIL_ATTR_SMTPUTF8     "smtputf8"      /* RFC6531 support */
 
  /*
   * TLSPROXY support.
index 48e87fe7257befcde02dac78c112b6fcab7f06c7..8c24fd99c88f5a20207a9214d1b04bc0a7b6e943 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      "20140709"
+#define MAIL_RELEASE_DATE      "20140713"
 #define MAIL_VERSION_NUMBER    "2.12"
 
 #ifdef SNAPSHOT
index bac033d16149675dcc3b378b533be25b3e0f703b..71cd14989bf8bd869dd23ce8c2bcb21e36ba53a4 100644 (file)
 /* .IP MIME_OPT_REPORT_NESTING
 /*     Report errors that set the MIME_ERR_NESTING error flag
 /*     (see above).
-/* .IP MIME_OPT_RECURSE_ALL_MESSAGE
-/*     Recurse into message/anything types other than message/rfc822.
-/*     This feature can detect "bad" information in headers of
-/*     message/partial and message/external-body types. It must
-/*     not be used with 8-bit -> 7-bit MIME transformations.
 /* .IP MIME_OPT_DOWNGRADE
 /*     Transform content that claims to be 8-bit into quoted-printable.
 /*     Where appropriate, update Content-Transfer-Encoding: message
@@ -335,6 +330,7 @@ struct MIME_STATE {
 #define MIME_STYPE_RFC822      2
 #define MIME_STYPE_PARTIAL     3
 #define MIME_STYPE_EXTERN_BODY 4
+#define MIME_STYPE_GLOBAL      5
 
  /*
   * MIME parser states. We steal from the public interface.
@@ -591,6 +587,8 @@ static void mime_state_content_type(MIME_STATE *state,
                    state->curr_stype = MIME_STYPE_PARTIAL;
                else if (TOKEN_MATCH(state->token[2], "external-body"))
                    state->curr_stype = MIME_STYPE_EXTERN_BODY;
+               else if (TOKEN_MATCH(state->token[2], "global"))
+                   state->curr_stype = MIME_STYPE_GLOBAL;
            }
            return;
        }
@@ -963,8 +961,14 @@ int     mime_state_update(MIME_STATE *state, int rec_type,
            if (len == 0) {
                state->body_offset = 0;         /* XXX */
                if (state->curr_ctype == MIME_CTYPE_MESSAGE) {
-                   if (state->curr_stype == MIME_STYPE_RFC822
-                   || (state->static_flags & MIME_OPT_RECURSE_ALL_MESSAGE))
+                   if (state->curr_stype == MIME_STYPE_RFC822)
+                       SET_MIME_STATE(state, MIME_STATE_NESTED,
+                                      MIME_CTYPE_TEXT, MIME_STYPE_PLAIN,
+                                      MIME_ENC_7BIT, MIME_ENC_7BIT);
+                   else if (state->curr_stype == MIME_STYPE_GLOBAL
+                        && ((state->static_flags & MIME_OPT_DOWNGRADE) == 0
+                            || state->curr_domain == MIME_ENC_7BIT))
+                       /* XXX EAI: inspect encoded message/global. */
                        SET_MIME_STATE(state, MIME_STATE_NESTED,
                                       MIME_CTYPE_TEXT, MIME_STYPE_PLAIN,
                                       MIME_ENC_7BIT, MIME_ENC_7BIT);
index 22deb4fdbe0e08eb16e10ba46077081aa3e74082..230f4c3c1b2c6b11840a14396195201a239c637f 100644 (file)
@@ -6,28 +6,28 @@
 /* SYNOPSIS
 /*     #include <post_mail.h>
 /*
-/*     VSTREAM *post_mail_fopen(sender, recipient, filter_class, trace_flags,
+/*     VSTREAM *post_mail_fopen(sender, recipient, source_class, trace_flags,
 /*             queue_id)
 /*     const char *sender;
 /*     const char *recipient;
-/*     int     filter_class;
+/*     int     source_class;
 /*     int     trace_flags;
 /*     VSTRING *queue_id;
 /*
 /*     VSTREAM *post_mail_fopen_nowait(sender, recipient,
-/*                                     filter_class, trace_flags, queue_id)
+/*                                     source_class, trace_flags, queue_id)
 /*     const char *sender;
 /*     const char *recipient;
-/*     int     filter_class;
+/*     int     source_class;
 /*     int     trace_flags;
 /*     VSTRING *queue_id;
 /*
 /*     void    post_mail_fopen_async(sender, recipient,
-/*                                     filter_class, trace_flags,
+/*                                     source_class, trace_flags,
 /*                                     queue_id, notify, context)
 /*     const char *sender;
 /*     const char *recipient;
-/*     int     filter_class;
+/*     int     source_class;
 /*     int     trace_flags;
 /*     VSTRING *queue_id;
 /*     void    (*notify)(VSTREAM *stream, char *context);
 /* .IP recipient
 /*     The recipient envelope address. It is up to the application
 /*     to produce To: headers.
-/* .IP filter_class
-/*     The internal mail filtering class, as defined in
-/*     \fB<int_filt.h>\fR.  Depending on the setting of the
-/*     internal_mail_filter_classes parameter the message will or
-/*     won't be subject to content inspection.
+/* .IP source_class
+/*     The message source class, as defined in \fB<mail_proto.h>\fR.
+/*     Depending on the setting of the internal_mail_source_classes
+/*     and smtputf8_autodetect_classes parameters, the message
+/*     will or won't be subject to content inspection or SMTPUTF8
+/*     autodetection.
 /* .IP trace_flags
 /*     Message tracing flags as specified in \fB<deliver_request.h>\fR.
 /* .IP queue_id
 typedef struct {
     char   *sender;
     char   *recipient;
-    int     filter_class;
+    int     source_class;
     int     trace_flags;
     POST_MAIL_NOTIFY notify;
     void   *context;
@@ -183,14 +184,15 @@ typedef struct {
 
 static void post_mail_init(VSTREAM *stream, const char *sender,
                                   const char *recipient,
-                                  int filter_class, int trace_flags,
+                                  int source_class, int trace_flags,
                                   VSTRING *queue_id)
 {
     VSTRING *id = queue_id ? queue_id : vstring_alloc(100);
     struct timeval now;
     const char *date;
-    int cleanup_flags =
-       int_filt_flags(filter_class) | CLEANUP_FLAG_MASK_INTERNAL;
+    int     cleanup_flags =
+    int_filt_flags(source_class) | CLEANUP_FLAG_MASK_INTERNAL
+    | smtputf8_autodetect(source_class);
 
     GETTIMEOFDAY(&now);
     date = mail_date(now.tv_sec);
@@ -235,13 +237,13 @@ static void post_mail_init(VSTREAM *stream, const char *sender,
 /* post_mail_fopen - prepare for posting a message */
 
 VSTREAM *post_mail_fopen(const char *sender, const char *recipient,
-                                int filter_class, int trace_flags,
+                                int source_class, int trace_flags,
                                 VSTRING *queue_id)
 {
     VSTREAM *stream;
 
     stream = mail_connect_wait(MAIL_CLASS_PUBLIC, var_cleanup_service);
-    post_mail_init(stream, sender, recipient, filter_class, trace_flags,
+    post_mail_init(stream, sender, recipient, source_class, trace_flags,
                   queue_id);
     return (stream);
 }
@@ -249,14 +251,14 @@ VSTREAM *post_mail_fopen(const char *sender, const char *recipient,
 /* post_mail_fopen_nowait - prepare for posting a message */
 
 VSTREAM *post_mail_fopen_nowait(const char *sender, const char *recipient,
-                                       int filter_class, int trace_flags,
+                                       int source_class, int trace_flags,
                                        VSTRING *queue_id)
 {
     VSTREAM *stream;
 
     if ((stream = mail_connect(MAIL_CLASS_PUBLIC, var_cleanup_service,
                               BLOCKING)) != 0)
-       post_mail_init(stream, sender, recipient, filter_class, trace_flags,
+       post_mail_init(stream, sender, recipient, source_class, trace_flags,
                       queue_id);
     return (stream);
 }
@@ -282,7 +284,7 @@ static void post_mail_open_event(int event, char *context)
        event_disable_readwrite(vstream_fileno(state->stream));
        non_blocking(vstream_fileno(state->stream), BLOCKING);
        post_mail_init(state->stream, state->sender,
-                      state->recipient, state->filter_class,
+                      state->recipient, state->source_class,
                       state->trace_flags, state->queue_id);
        myfree(state->sender);
        myfree(state->recipient);
@@ -333,7 +335,7 @@ static void post_mail_open_event(int event, char *context)
 /* post_mail_fopen_async - prepare for posting a message */
 
 void    post_mail_fopen_async(const char *sender, const char *recipient,
-                                     int filter_class, int trace_flags,
+                                     int source_class, int trace_flags,
                                      VSTRING *queue_id,
                                      void (*notify) (VSTREAM *, void *),
                                      void *context)
@@ -345,7 +347,7 @@ void    post_mail_fopen_async(const char *sender, const char *recipient,
     state = (POST_MAIL_STATE *) mymalloc(sizeof(*state));
     state->sender = mystrdup(sender);
     state->recipient = mystrdup(recipient);
-    state->filter_class = filter_class;
+    state->source_class = source_class;
     state->trace_flags = trace_flags;
     state->notify = notify;
     state->context = context;
index b76a2510ef0c7cf7d733c0f8b9c8a1fa58b5516b..f679ba4ac4a4b7235f3863da10d797debe4ac0a4 100644 (file)
@@ -21,7 +21,7 @@
   * Global library.
   */
 #include <cleanup_user.h>
-#include <int_filt.h>
+#include <mail_proto.h>
 
  /*
   * External interface.
index f6668cdc88123ef73915bf7e6e45b0deab7a9a4c..aab4ab36408913879efac1e118e57f789d205764 100644 (file)
   * 
   * See also: REC_TYPE_PTR_FORMAT below.
   */
-#define REC_TYPE_SIZE_FORMAT   "%15ld %15ld %15ld %15ld %15ld"
+#define REC_TYPE_SIZE_FORMAT   "%15ld %15ld %15ld %15ld %15ld %15ld"
 #define REC_TYPE_SIZE_CAST1    long    /* Vmailer extra offs - data offs */
 #define REC_TYPE_SIZE_CAST2    long    /* Postfix 1.0 data offset */
 #define REC_TYPE_SIZE_CAST3    long    /* Postfix 1.0 recipient count */
 #define REC_TYPE_SIZE_CAST4    long    /* Postfix 2.1 qmgr flags */
 #define REC_TYPE_SIZE_CAST5    long    /* Postfix 2.4 content length */
+#define REC_TYPE_SIZE_CAST6    long    /* Postfix 2.12 smtputf8 flags */
 
  /*
   * The warn record specifies when the next warning that the message was
diff --git a/postfix/src/global/smtputf8.c b/postfix/src/global/smtputf8.c
new file mode 100644 (file)
index 0000000..d86e084
--- /dev/null
@@ -0,0 +1,95 @@
+/*++
+/* NAME
+/*     smtputf8 3
+/* SUMMARY
+/*     SMTPUTF8 support
+/* SYNOPSIS
+/*     #include <smtputf8.h>
+/*
+/*     int     smtputf8_autodetect(class)
+/*     int     class;
+/* DESCRIPTION
+/*     smtputf8_autodetect() determines whether the cleanup server
+/*     should perform SMTPUTF8 detection, depending on the declared
+/*     source class and the setting of the smtputf8_autodetect_classes
+/*     configuration parameter.
+/*
+/*     Specify one of the following:
+/* .IP MAIL_SRC_MASK_SENDMAIL
+/*     Submission with the Postfix sendmail(1) command.
+/* .IP MAIL_SRC_MASK_SMTPD
+/*     Mail received with the smtpd(8) daemon.
+/* .IP MAIL_SRC_MASK_QMQPD
+/*     Mail received with the qmqpd(8) daemon.
+/* .IP MAIL_SRC_MASK_FORWARD
+/*     Local forwarding or aliasing.
+/* .IP MAIL_SRC_MASK_BOUNCE
+/*     Submission by the bounce(8) daemon. 
+/* .IP MAIL_SRC_MASK_NOTIFY
+/*     Postmaster notification from the smtp(8) or smtpd(8) daemon.
+/* .IP MAIL_SRC_MASK_VERIFY
+/*     Address verification probe.
+/* DIAGNOSTICS
+/*     Panic: no valid class argument.
+/*
+/*     Specify one of the following:
+/*     Warning: the smtputf8_autodetect_classes parameter specifies
+/*     an invalid source category name.
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+/* System library. */
+
+#include <sys_defs.h>
+
+/* Utility library. */
+
+#include <name_mask.h>
+#include <msg.h>
+
+/* Global library. */
+
+#include <mail_params.h>
+#include <cleanup_user.h>
+#include <mail_proto.h>
+#include <smtputf8.h>
+
+/* smtputf8_autodetect - enable SMTPUTF8 autodetection */
+
+int     smtputf8_autodetect(int class)
+{
+    const char myname[] = "smtputf8_autodetect";
+    static const NAME_MASK table[] = {
+       MAIL_SRC_NAME_SENDMAIL, MAIL_SRC_MASK_SENDMAIL,
+       MAIL_SRC_NAME_SMTPD, MAIL_SRC_MASK_SMTPD,
+       MAIL_SRC_NAME_QMQPD, MAIL_SRC_MASK_QMQPD,
+       MAIL_SRC_NAME_FORWARD, MAIL_SRC_MASK_FORWARD,
+       MAIL_SRC_NAME_BOUNCE, MAIL_SRC_MASK_BOUNCE,
+       MAIL_SRC_NAME_NOTIFY, MAIL_SRC_MASK_NOTIFY,
+       MAIL_SRC_NAME_VERIFY, MAIL_SRC_MASK_VERIFY,
+       MAIL_SRC_NAME_ALL, MAIL_SRC_MASK_ALL,
+       0,
+    };
+    int     autodetect_classes = 0;
+
+    if (class == 0 || (class & ~MAIL_SRC_MASK_ALL) != 0)
+       msg_panic("%s: bad source class: %d", myname, class);
+    if (*var_smtputf8_autoclass) {
+       autodetect_classes =
+           name_mask(VAR_SMTPUTF8_AUTOCLASS, table, var_smtputf8_autoclass);
+       if (autodetect_classes == 0)
+           msg_warn("%s: bad input: %s", VAR_SMTPUTF8_AUTOCLASS,
+                    var_smtputf8_autoclass);
+       if (autodetect_classes & class)
+           return (CLEANUP_FLAG_AUTOUTF8);
+    }
+    return (0);
+}
diff --git a/postfix/src/global/smtputf8.h b/postfix/src/global/smtputf8.h
new file mode 100644 (file)
index 0000000..1758fc8
--- /dev/null
@@ -0,0 +1,111 @@
+#ifndef _SMTPUTF8_H_INCLUDED_
+#define _SMTPUTF8_H_INCLUDED_
+
+/*++
+/* NAME
+/*     smtputf8 3h
+/* SUMMARY
+/*     SMTPUTF8 support
+/* SYNOPSIS
+/*     #include <smtputf8.h>
+/* DESCRIPTION
+/* .nf
+
+ /*
+  * Avoiding chicken-and-egg problems during the initial SMTPUTF8 roll-out in
+  * environments with pre-existing mail flows that contain UTF8.
+  * 
+  * Prior to SMTPUTF8, mail flows that contain UTF8 worked because the vast
+  * majority of MTAs is perfectly capable of handling UTF8 in addres
+  * localparts (and in headers), even if pre-SMTPUTF8 standards do not
+  * support this practice.
+  * 
+  * When turning on Postfix SMTPUTF8 support for the first time, we don't want
+  * to suddenly break pre-existing mail flows that contain UTF8 because 1) a
+  * client does not request SMTPUTF8 support, and because 2) a down-stream
+  * MTA does not announce SMTPUTF8 support.
+  * 
+  * While 1) is easy enough to avoid (keep accepting UTF8 in addres localparts
+  * just like Postfix has always done), 2) presents a thornier problem. The
+  * root cause of that problem is the need for SMTPUTF8 autodetection.
+  * 
+  * What is SMTPUTF8 autodetection? Postfix cannot rely solely on the sender's
+  * declaration that a message requires SMTPUTF8 support, because UTF8 may be
+  * introduced during local processing (for example, the client hostname in
+  * Postfix's Received: header, adding @$myorigin or .$mydomain to an
+  * incomplete address, address rewriting, alias expansion, automatic BCC
+  * recipients, local forwarding, and changes made by header checks or Milter
+  * applications).
+  * 
+  * In summary, after local processing has happened, Postfix may decide that a
+  * message requires SMTPUTF8 support, even when that message initially did
+  * not require SMTPUTF8 support. This could make the message undeliverable
+  * to destinations that do not support SMTPUTF8. In an environment with
+  * pre-existing mail flows that contain UTF8, we want to avoid disrupting
+  * those mail flows when rolling out SMTPUTF8 support.
+  * 
+  * For the vast majority of sites, the simplest solution is to autodetect
+  * SMTPUTF8 support only for Postfix sendmail command-line submissions, at
+  * least as long as SMTPUTF8 support has not yet achieved wold domination.
+  * 
+  * However, sites that add UTF8 content via local processing (see above) should
+  * autodetect SMTPUTF8 support for all email.
+  * 
+  * smtputf8_autodetect() uses the setting of the smtputf8_autodetect_classes
+  * parameter, and the mail source classes defined in mail_params.h.
+  */
+extern int smtputf8_autodetect(int);
+
+ /*
+  * The flag SMTPUTF8_FLAG_REQUESTED is raised on request by the sender, or
+  * when a queue file contains at least one UTF8 envelope recipient.
+  * 
+  * The flag SMTPUTF8_FLAG_HEADER is raised when a queue file contains at least
+  * one UTF8 message header.
+  * 
+  * The flag SMTPUTF8_FLAG_SENDER is raised when a queue file contains an UTF8
+  * envelope sender.
+  * 
+  * The three flags SMTPUTF8_FLAG_REQUESTED/HEADER/SENDER are stored in the
+  * queue file, the three flags are sent with delivery requests to Postfix
+  * delivery agents, and the three flags are sent with "flush" requests to
+  * the bounce daemon to ensure that the resulting notification message will
+  * have a content-transfer-encoding of 8bit.
+  * 
+  * In the near future, mailing lists will have a mix of UTF8 and non-UTF8
+  * subscribers. With the following flag, Postfix can require SMTPUTF8
+  * delivery only when it is really required.
+  * 
+  * The flag SMTPUTF8_FLAG_RECIPIENT is raised when a delivery request (NOT:
+  * message) contains at least one UTF8 envelope recipient. The flag is NOT
+  * stored in the queue file, and the flag sent in requests to the bounce
+  * daemon ONLY when bouncing a single recipient. The flag is used ONLY in
+  * requests to Postfix delivery agents, to give Postfix flexibility when
+  * delivering messages to non-SMTPUTF8 servers.
+  * 
+  * If a delivery request has none of the flags SMTPUTF8_FLAG_RECIPIENT,
+  * SMTPUTF8_FLAG_SENDER, or SMTPUTF8_FLAG_HEADER, then the message can
+  * safely be delivered to a non-SMTPUTF8 server.
+  * 
+  * To relax this requirement, implement RFC2047 header encoding in the Postfix
+  * SMTP client, and adjust the SMTPUTF8_MASK_ALWAYS macro.
+  */
+#define SMTPUTF8_FLAG_REQUESTED        (1<<0)  /* queue file/delivery/bounce request */
+#define SMTPUTF8_FLAG_HEADER   (1<<1)  /* queue file/delivery/bounce request */
+#define SMTPUTF8_FLAG_SENDER   (1<<2)  /* queue file/delivery/bounce request */
+#define SMTPUTF8_FLAG_RECIPIENT        (1<<3)  /* delivery request only */
+
+#define SMTPUTF8_MASK_ALWAYS (SMTPUTF8_FLAG_HEADER | SMTPUTF8_FLAG_SENDER)
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
diff --git a/postfix/src/global/uxtext.c b/postfix/src/global/uxtext.c
new file mode 100644 (file)
index 0000000..ccd0d84
--- /dev/null
@@ -0,0 +1,263 @@
+/*++
+/* NAME
+/*     uxtext 3
+/* SUMMARY
+/*     quote/unquote text, xtext style.
+/* SYNOPSIS
+/*     #include <uxtext.h>
+/*
+/*     VSTRING *uxtext_quote(quoted, unquoted, special)
+/*     VSTRING *quoted;
+/*     const char *unquoted;
+/*     const char *special;
+/*
+/*     VSTRING *uxtext_quote_append(unquoted, quoted, special)
+/*     VSTRING *unquoted;
+/*     const char *quoted;
+/*     const char *special;
+/*
+/*     VSTRING *uxtext_unquote(unquoted, quoted)
+/*     VSTRING *unquoted;
+/*     const char *quoted;
+/*
+/*     VSTRING *uxtext_unquote_append(unquoted, quoted)
+/*     VSTRING *unquoted;
+/*     const char *quoted;
+/* DESCRIPTION
+/*     uxtext_quote() takes a null-terminated UTF8 string and
+/*     replaces characters \, <33(10) and >126(10), as well as
+/*     characters specified with "special" with \x{XX}, XX being
+/*     a 2-6-digit uppercase hexadecimal equivalent.
+/*
+/*     uxtext_quote_append() is like uxtext_quote(), but appends
+/*     the conversion result to the result buffer.
+/*
+/*     uxtext_unquote() performs the opposite transformation. This
+/*     function understands lowercase, uppercase, and mixed case
+/*     \x{XX...} sequences.  The result value is the unquoted
+/*     argument in case of success, a null pointer otherwise.
+/*
+/*     uxtext_unquote_append() is like uxtext_unquote(), but appends
+/*     the conversion result to the result buffer.
+/* BUGS
+/*     This module cannot process null characters in data.
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Arnt Gulbrandsen
+/*
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+/* System library. */
+
+#include <sys_defs.h>
+#include <string.h>
+#include <ctype.h>
+
+/* Utility library. */
+
+#include "msg.h"
+#include "vstring.h"
+#include "uxtext.h"
+
+/* Application-specific. */
+
+#define STR(x) vstring_str(x)
+#define LEN(x) VSTRING_LEN(x)
+
+/* uxtext_quote_append - append unquoted data to quoted data */
+
+VSTRING *uxtext_quote_append(VSTRING *quoted, const char *unquoted,
+                                    const char *special)
+{
+    unsigned const char *cp;
+    int     ch;
+
+    for (cp = (unsigned const char *) unquoted; (ch = *cp) != 0; cp++) {
+       /* Fix 20140709: the '\' character must always be quoted. */
+       if (ch != '\\' && ch > 32 && ch < 127
+           && (*special == 0 || strchr(special, ch) == 0)) {
+           VSTRING_ADDCH(quoted, ch);
+       } else {
+
+           /*
+            * had RFC6533 been written like 6531 and 6532, this else clause
+            * would be one line long.
+            */
+           int     unicode = 0;
+           int     pick = 0;
+
+           if (ch < 0x80) {
+               //0000 0000 - 0000 007 F 0x xxxxxx
+                   unicode = ch;
+           } else if ((ch & 0xe0) == 0xc0) {
+               //0000 0080 - 0000 07 FF 110 xxxxx 10 xxxxxx
+                   unicode = (ch & 0x1f);
+               pick = 1;
+           } else if ((ch & 0xf0) == 0xe0) {
+               //0000 0800 - 0000 FFFF 1110 xxxx 10 xxxxxx 10 xxxxxx
+                   unicode = (ch & 0x0f);
+               pick = 2;
+           } else if ((ch & 0xf8) == 0xf0) {
+               //0001 0000 - 001 F FFFF 11110 xxx 10 xxxxxx 10 xxxxxx 10 xxxxxx
+                   unicode = (ch & 0x07);
+               pick = 3;
+           } else if ((ch & 0xfc) == 0xf8) {
+               //0020 0000 - 03 FF FFFF 111110 xx 10 xxxxxx 10 xxxxxx...10 xxxxxx
+                   unicode = (ch & 0x03);
+               pick = 4;
+           } else if ((ch & 0xfe) == 0xfc) {
+               //0400 0000 - 7 FFF FFFF 1111110 x 10 xxxxxx...10 xxxxxx
+                   unicode = (ch & 0x01);
+               pick = 5;
+           } else {
+               return (0);
+           }
+           while (pick > 0) {
+               ch = *++cp;
+               if ((ch & 0xc0) != 0x80)
+                   return (0);
+               unicode = unicode << 6 | (ch & 0x3f);
+               pick--;
+           }
+           vstring_sprintf_append(quoted, "\\x{%02X}", unicode);
+       }
+    }
+    VSTRING_TERMINATE(quoted);
+    return (quoted);
+}
+
+/* uxtext_quote - unquoted data to quoted */
+
+VSTRING *uxtext_quote(VSTRING *quoted, const char *unquoted, const char *special)
+{
+    VSTRING_RESET(quoted);
+    uxtext_quote_append(quoted, unquoted, special);
+    return (quoted);
+}
+
+/* uxtext_unquote_append - quoted data to unquoted */
+
+VSTRING *uxtext_unquote_append(VSTRING *unquoted, const char *quoted)
+{
+    const char *cp;
+    int     ch;
+
+    for (cp = quoted; (ch = *cp) != 0; cp++) {
+       if (ch == '\\' && cp[1] == 'x' && cp[2] == '{') {
+           cp += 2;
+           int     unicode = 0;
+
+           while ((ch = *++cp) != '}') {
+               if (ISDIGIT(ch))
+                   unicode = (unicode << 4) + (ch - '0');
+               else if (ch >= 'a' && ch <= 'f')
+                   unicode = (unicode << 4) + (ch - 'a' + 10);
+               else if (ch >= 'A' && ch <= 'F')
+                   unicode = (unicode << 4) + (ch - 'A' + 10);
+               else
+                   return (0);                 /* also covers the null
+                                                * terminator */
+               if (unicode > 0x10ffff)
+                   return (0);
+           }
+
+           /*
+            * the following block is from
+            * https://github.com/aox/aox/blob/master/encodings/utf.cpp, with
+            * permission by the authors.
+            */
+           if (unicode < 0x80) {
+               VSTRING_ADDCH(unquoted, (char) unicode);
+           } else if (unicode < 0x800) {
+               VSTRING_ADDCH(unquoted, 0xc0 | ((char) (unicode >> 6)));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode & 0x3f)));
+           } else if (unicode < 0x10000) {
+               VSTRING_ADDCH(unquoted, 0xe0 | ((char) (unicode >> 12)));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 6) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode & 0x3f)));
+           } else if (unicode < 0x200000) {
+               VSTRING_ADDCH(unquoted, 0xf0 | ((char) (unicode >> 18)));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 12) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 6) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode & 0x3f)));
+           } else if (unicode < 0x4000000) {
+               VSTRING_ADDCH(unquoted, 0xf8 | ((char) (unicode >> 24)));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 18) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 12) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 6) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode & 0x3f)));
+           } else {
+               VSTRING_ADDCH(unquoted, 0xfc | ((char) (unicode >> 30)));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 24) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 18) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 12) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode >> 6) & 0x3f));
+               VSTRING_ADDCH(unquoted, 0x80 | ((char) (unicode & 0x3f)));
+           }
+       } else {
+           VSTRING_ADDCH(unquoted, ch);
+       }
+    }
+    VSTRING_TERMINATE(unquoted);
+    return (unquoted);
+}
+
+/* uxtext_unquote - quoted data to unquoted */
+
+VSTRING *uxtext_unquote(VSTRING *unquoted, const char *quoted)
+{
+    VSTRING_RESET(unquoted);
+    uxtext_unquote_append(unquoted, quoted);
+    return (unquoted);
+}
+
+#ifdef TEST
+
+ /*
+  * Proof-of-concept test program: convert to quoted and back.
+  */
+#include <vstream.h>
+
+#define BUFLEN 1024
+
+static ssize_t read_buf(VSTREAM *fp, VSTRING *buf)
+{
+    ssize_t len;
+
+    VSTRING_RESET(buf);
+    len = vstream_fread(fp, STR(buf), vstring_avail(buf));
+    VSTRING_AT_OFFSET(buf, len);               /* XXX */
+    VSTRING_TERMINATE(buf);
+    return (len);
+}
+
+int     main(int unused_argc, char **unused_argv)
+{
+    VSTRING *unquoted = vstring_alloc(BUFLEN);
+    VSTRING *quoted = vstring_alloc(100);
+    ssize_t len;
+
+    while ((len = read_buf(VSTREAM_IN, unquoted)) > 0) {
+       uxtext_quote(quoted, STR(unquoted), "+=");
+       if (uxtext_unquote(unquoted, STR(quoted)) == 0)
+           msg_fatal("bad input: %.100s", STR(quoted));
+       if (LEN(unquoted) != len)
+           msg_fatal("len %ld != unquoted len %ld",
+                     (long) len, (long) LEN(unquoted));
+       if (vstream_fwrite(VSTREAM_OUT, STR(unquoted), LEN(unquoted)) != LEN(unquoted))
+           msg_fatal("write error: %m");
+    }
+    vstream_fflush(VSTREAM_OUT);
+    vstring_free(unquoted);
+    vstring_free(quoted);
+    return (0);
+}
+
+#endif
diff --git a/postfix/src/global/uxtext.h b/postfix/src/global/uxtext.h
new file mode 100644 (file)
index 0000000..761adf9
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef _UXTEXT_H_INCLUDED_
+#define _UXTEXT_H_INCLUDED_
+
+/*++
+/* NAME
+/*     uxtext 3h
+/* SUMMARY
+/*     quote/unquote text, RFC 6533 style.
+/* SYNOPSIS
+/*     #include <uxtext.h>
+/* DESCRIPTION
+/* .nf
+
+ /*
+  * Utility library.
+  */
+#include <vstring.h>
+
+ /*
+  * External interface.
+  */
+extern VSTRING *uxtext_quote(VSTRING *, const char *, const char *);
+extern VSTRING *uxtext_quote_append(VSTRING *, const char *, const char *);
+extern VSTRING *uxtext_unquote(VSTRING *, const char *);
+extern VSTRING *uxtext_unquote_append(VSTRING *, const char *);
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
index 1471a632756a64ff085746b6ec79161c2eba847d..552b00efcb7f805af851617d41e03c829a126e07 100644 (file)
@@ -297,6 +297,7 @@ forward.o: ../../include/recipient_list.h
 forward.o: ../../include/record.h
 forward.o: ../../include/resolve_clnt.h
 forward.o: ../../include/sent.h
+forward.o: ../../include/smtputf8.h
 forward.o: ../../include/stringops.h
 forward.o: ../../include/sys_defs.h
 forward.o: ../../include/tok822.h
index fb7da4f2ec82996bb211fd0b27b52f2b6191c489..90843b3b0fedd77490a6f7b1ac3825a347c6aa35 100644 (file)
@@ -79,6 +79,7 @@
 #include <mail_date.h>
 #include <mail_params.h>
 #include <dsn_mask.h>
+#include <smtputf8.h>
 
 /* Application-specific. */
 
@@ -147,7 +148,9 @@ static FORWARD_INFO *forward_open(DELIVER_REQUEST *request, const char *sender)
     info->queue_id = mystrdup(STR(buffer));
     GETTIMEOFDAY(&info->posting_time);
 
-#define FORWARD_CLEANUP_FLAGS (CLEANUP_FLAG_BOUNCE | CLEANUP_FLAG_MASK_INTERNAL)
+#define FORWARD_CLEANUP_FLAGS \
+       (CLEANUP_FLAG_BOUNCE | CLEANUP_FLAG_MASK_INTERNAL \
+       | smtputf8_autodetect(MAIL_SRC_MASK_FORWARD))
 
     attr_print(cleanup, ATTR_FLAG_NONE,
               ATTR_TYPE_INT, MAIL_ATTR_FLAGS, FORWARD_CLEANUP_FLAGS,
index 0da3b70254858f4e5f57d7f2d892ceb871ba102c..6b82dd3216c5a00e7165ce23338b2eebfbcb2eb9 100644 (file)
@@ -707,6 +707,7 @@ static int local_deliver(DELIVER_REQUEST *rqst, char *service)
     state.msg_attr.fp = rqst->fp;
     state.msg_attr.offset = rqst->data_offset;
     state.msg_attr.encoding = rqst->encoding;
+    state.msg_attr.smtputf8 = rqst->smtputf8;
     state.msg_attr.sender = rqst->sender;
     state.msg_attr.dsn_envid = rqst->dsn_envid;
     state.msg_attr.dsn_ret = rqst->dsn_ret;
index 0e9656de4f0427a4ef8e547ca7c01c46bf6b22e4..4052000c97c5dc505ed874f252fc301a1406d1ce 100644 (file)
@@ -72,6 +72,7 @@ typedef struct DELIVER_ATTR {
     char   *queue_id;                  /* mail queue id */
     long    offset;                    /* data offset */
     char   *encoding;                  /* MIME encoding */
+    int     smtputf8;                  /* from delivery request */
     const char *sender;                        /* taken from envelope */
     char   *dsn_envid;                 /* DSN envelope ID */
     int     dsn_ret;                   /* DSN headers/full */
@@ -134,7 +135,7 @@ typedef struct LOCAL_STATE {
        attr.queue_id, &attr.msg_stats, &attr.rcpt, attr.relay, \
        DSN_FROM_DSN_BUF(attr.why)
 #define BOUNCE_ONE_ATTR(attr) \
-       attr.queue_name, attr.queue_id, attr.encoding, \
+       attr.queue_name, attr.queue_id, attr.encoding, attr.smtputf8, \
        attr.sender, attr.dsn_envid, attr.dsn_ret, \
        &attr.msg_stats, &attr.rcpt, attr.relay, \
        DSN_FROM_DSN_BUF(attr.why)
index 5d3bacc0d549bc7fe74a62450ee7fc7743764e4c..34314f7646b73edd354697c7081350a91c3d2e93 100644 (file)
@@ -96,7 +96,6 @@ event_server.o: ../../include/deliver_request.h
 event_server.o: ../../include/dict.h
 event_server.o: ../../include/dsn.h
 event_server.o: ../../include/dsn_buf.h
-event_server.o: ../../include/dsn_filter.h
 event_server.o: ../../include/events.h
 event_server.o: ../../include/htable.h
 event_server.o: ../../include/iostuff.h
@@ -302,7 +301,6 @@ multi_server.o: ../../include/deliver_request.h
 multi_server.o: ../../include/dict.h
 multi_server.o: ../../include/dsn.h
 multi_server.o: ../../include/dsn_buf.h
-multi_server.o: ../../include/dsn_filter.h
 multi_server.o: ../../include/events.h
 multi_server.o: ../../include/htable.h
 multi_server.o: ../../include/iostuff.h
@@ -343,7 +341,6 @@ single_server.o: ../../include/deliver_request.h
 single_server.o: ../../include/dict.h
 single_server.o: ../../include/dsn.h
 single_server.o: ../../include/dsn_buf.h
-single_server.o: ../../include/dsn_filter.h
 single_server.o: ../../include/events.h
 single_server.o: ../../include/htable.h
 single_server.o: ../../include/iostuff.h
@@ -384,7 +381,6 @@ trigger_server.o: ../../include/deliver_request.h
 trigger_server.o: ../../include/dict.h
 trigger_server.o: ../../include/dsn.h
 trigger_server.o: ../../include/dsn_buf.h
-trigger_server.o: ../../include/dsn_filter.h
 trigger_server.o: ../../include/events.h
 trigger_server.o: ../../include/htable.h
 trigger_server.o: ../../include/iostuff.h
index 780061d7160a2d3d6dd86367ce6938de4760eeeb..09d52367c9f4429df6f8b82a262991eb1c8c5478 100644 (file)
@@ -168,6 +168,7 @@ qmgr_deliver.o: ../../include/mymalloc.h
 qmgr_deliver.o: ../../include/rcpt_print.h
 qmgr_deliver.o: ../../include/recipient_list.h
 qmgr_deliver.o: ../../include/scan_dir.h
+qmgr_deliver.o: ../../include/smtputf8.h
 qmgr_deliver.o: ../../include/stringops.h
 qmgr_deliver.o: ../../include/sys_defs.h
 qmgr_deliver.o: ../../include/vbuf.h
index 802ce12eee2631f549e10bd9abd2ef74abbe03e2..6d61eb45bc3f93d9dfaead88484019f1d9fc731a 100644 (file)
@@ -298,6 +298,7 @@ struct QMGR_MESSAGE {
     char   *sender;                    /* complete address */
     char   *dsn_envid;                 /* DSN envelope ID */
     int     dsn_ret;                   /* DSN headers/full */
+    int     smtputf8;                  /* requires unicode */
     char   *verp_delims;               /* VERP delimiters */
     char   *filter_xport;              /* filtering transport */
     char   *inspect_xport;             /* inspecting transport */
index d93a2cd105ba1765be73507ddc83b8930c6ca750..c3e446cb53ffc528371bbb3588fdf3ba56b33fb0 100644 (file)
@@ -296,6 +296,7 @@ void    qmgr_active_done(QMGR_MESSAGE *message)
                              message->queue_name,
                              message->queue_id,
                              message->encoding,
+                             message->smtputf8,
                              message->sender,
                              message->dsn_envid,
                              message->dsn_ret,
@@ -306,6 +307,7 @@ void    qmgr_active_done(QMGR_MESSAGE *message)
                                   message->queue_name,
                                   message->queue_id,
                                   message->encoding,
+                                  message->smtputf8,
                                   message->sender,
                                   message->dsn_envid,
                                   message->dsn_ret,
@@ -389,6 +391,7 @@ static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
                     message->queue_name,
                     message->queue_id,
                     message->encoding,
+                    message->smtputf8,
                     message->sender,
                     message->dsn_envid,
                     message->dsn_ret,
@@ -441,6 +444,7 @@ static void qmgr_active_done_25_generic(QMGR_MESSAGE *message)
                             message->queue_name,
                             message->queue_id,
                             message->encoding,
+                            message->smtputf8,
                             message->sender,
                             message->dsn_envid,
                             message->dsn_ret,
@@ -451,6 +455,7 @@ static void qmgr_active_done_25_generic(QMGR_MESSAGE *message)
                                  message->queue_name,
                                  message->queue_id,
                                  message->encoding,
+                                 message->smtputf8,
                                  message->sender,
                                  message->dsn_envid,
                                  message->dsn_ret,
@@ -466,6 +471,7 @@ static void qmgr_active_done_25_generic(QMGR_MESSAGE *message)
                        message->queue_name,
                        message->queue_id,
                        message->encoding,
+                       message->smtputf8,
                        message->sender,
                        message->dsn_envid,
                        message->dsn_ret,
index ce81fd70286d01290fc39306b4313738b93b3b0a..3a0e9f32e2cf694c53edfae65b7f2d55944195f9 100644 (file)
@@ -71,6 +71,7 @@
 #include <dsn_buf.h>
 #include <dsb_scan.h>
 #include <rcpt_print.h>
+#include <smtputf8.h>
 
 /* Application-specific. */
 
@@ -135,6 +136,16 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
     MSG_STATS stats;
     char   *sender;
     int     flags;
+    int     smtputf8 = message->smtputf8;
+    const char *addr;
+
+    /*
+     * Todo: integrate with code up-stream that builds the delivery request.
+     */
+    for (recipient = list.info; recipient < list.info + list.len; recipient++)
+       if (var_smtputf8_enable && (addr = recipient->address)[0]
+           && !allascii(addr) && valid_utf8_string(addr, strlen(addr)))
+           smtputf8 |= SMTPUTF8_FLAG_RECIPIENT;
 
     /*
      * If variable envelope return path is requested, change prefix+@origin
@@ -162,6 +173,7 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
               ATTR_TYPE_LONG, MAIL_ATTR_SIZE, message->cont_length,
               ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, entry->queue->nexthop,
               ATTR_TYPE_STR, MAIL_ATTR_ENCODING, message->encoding,
+              ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, message->smtputf8,
               ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
               ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, message->dsn_envid,
               ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, message->dsn_ret,
index e2f9237410e4029b4079973a5574844e87b86d8c..cb87d367bfdbdfd97518e04b297d3c6c2e9c2cd0 100644 (file)
@@ -168,6 +168,7 @@ static QMGR_MESSAGE *qmgr_message_create(const char *queue_name,
     message->sender = 0;
     message->dsn_envid = 0;
     message->dsn_ret = 0;
+    message->smtputf8 = 0;
     message->filter_xport = 0;
     message->inspect_xport = 0;
     message->redirect_addr = 0;
@@ -516,10 +517,11 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
            continue;
        if (rec_type == REC_TYPE_SIZE) {
            if (message->data_offset == 0) {
-               if ((count = sscanf(start, "%ld %ld %d %d %ld",
+               if ((count = sscanf(start, "%ld %ld %d %d %ld %d",
                                 &message->data_size, &message->data_offset,
                                    &nrcpt, &message->rflags,
-                                   &message->cont_length)) >= 3) {
+                                   &message->cont_length,
+                                   &message->smtputf8)) >= 3) {
                    /* Postfix >= 1.0 (a.k.a. 20010228). */
                    if (message->data_offset <= 0 || message->data_size <= 0) {
                        msg_warn("%s: invalid size record: %.100s",
index ea876c22a0ce442b268233f7a32bad9bda25841f..613cc87687e8ce0fe858370531bd566818ba762f 100644 (file)
@@ -80,6 +80,7 @@ pickup.o: ../../include/record.h
 pickup.o: ../../include/safe_open.h
 pickup.o: ../../include/scan_dir.h
 pickup.o: ../../include/set_ugid.h
+pickup.o: ../../include/smtputf8.h
 pickup.o: ../../include/stringops.h
 pickup.o: ../../include/sys_defs.h
 pickup.o: ../../include/vbuf.h
index 5fc5c1ca30499f6ffa267a6b1358e79fecb7110a..02f1608f4ec744a4ec060675a250cd536e796788 100644 (file)
 #include <input_transp.h>
 #include <rec_attr_map.h>
 #include <mail_version.h>
+#include <smtputf8.h>
 
 /* Single-threaded server skeleton. */
 
@@ -198,7 +199,7 @@ static int cleanup_service_error_reason(PICKUP_INFO *info, int status,
      */
     if (reason == 0 || *reason == 0)
        msg_warn("%s: error writing %s: %s",
-                 info->path, info->id, cleanup_strerror(status));
+                info->path, info->id, cleanup_strerror(status));
     return ((status & (CLEANUP_STAT_BAD | CLEANUP_STAT_RCPT)) ?
            REMOVE_MESSAGE_FILE : KEEP_MESSAGE_FILE);
 }
@@ -465,6 +466,8 @@ static int pickup_file(PICKUP_INFO *info)
     /* As documented in postsuper(1). */
     if (MAIL_IS_REQUEUED(info))
        cleanup_flags &= ~CLEANUP_FLAG_MILTER;
+    else
+       cleanup_flags |= smtputf8_autodetect(MAIL_SRC_MASK_SENDMAIL);
 
     cleanup = mail_connect_wait(MAIL_CLASS_PUBLIC, var_cleanup_service);
     if (attr_scan(cleanup, ATTR_FLAG_STRICT,
index a5951b32ca17cf2b98db15babfbcf9ac4a7d4ad1..a15f41afb8415b12b7b9afac99264c3cc6a7f153 100644 (file)
@@ -296,6 +296,7 @@ postscreen_smtpd.o: ../../include/argv.h
 postscreen_smtpd.o: ../../include/attr.h
 postscreen_smtpd.o: ../../include/dict.h
 postscreen_smtpd.o: ../../include/dict_cache.h
+postscreen_smtpd.o: ../../include/dns.h
 postscreen_smtpd.o: ../../include/ehlo_mask.h
 postscreen_smtpd.o: ../../include/events.h
 postscreen_smtpd.o: ../../include/htable.h
@@ -313,6 +314,7 @@ postscreen_smtpd.o: ../../include/mymalloc.h
 postscreen_smtpd.o: ../../include/name_code.h
 postscreen_smtpd.o: ../../include/name_mask.h
 postscreen_smtpd.o: ../../include/server_acl.h
+postscreen_smtpd.o: ../../include/sock_addr.h
 postscreen_smtpd.o: ../../include/string_list.h
 postscreen_smtpd.o: ../../include/stringops.h
 postscreen_smtpd.o: ../../include/sys_defs.h
@@ -328,6 +330,7 @@ postscreen_starttls.o: ../../include/attr.h
 postscreen_starttls.o: ../../include/connect.h
 postscreen_starttls.o: ../../include/dict.h
 postscreen_starttls.o: ../../include/dict_cache.h
+postscreen_starttls.o: ../../include/dns.h
 postscreen_starttls.o: ../../include/events.h
 postscreen_starttls.o: ../../include/htable.h
 postscreen_starttls.o: ../../include/iostuff.h
@@ -342,6 +345,7 @@ postscreen_starttls.o: ../../include/mymalloc.h
 postscreen_starttls.o: ../../include/name_code.h
 postscreen_starttls.o: ../../include/name_mask.h
 postscreen_starttls.o: ../../include/server_acl.h
+postscreen_starttls.o: ../../include/sock_addr.h
 postscreen_starttls.o: ../../include/string_list.h
 postscreen_starttls.o: ../../include/stringops.h
 postscreen_starttls.o: ../../include/sys_defs.h
index 77bb8f4758ffbb69d8cab628eaff95f063906c1b..6e8fa0de6824067f7e3c7fad8f0cec1ea617b76f 100644 (file)
@@ -337,6 +337,9 @@ static void psc_smtpd_format_ehlo_reply(VSTRING *buf, int discard_mask
        PSC_EHLO_APPEND(saved_len, psc_temp, "250-8BITMIME\r\n");
     if ((discard_mask & EHLO_MASK_DSN) == 0)
        PSC_EHLO_APPEND(saved_len, psc_temp, "250-DSN\r\n");
+    /* Fix 20140708: announce SMTPUTF8. */
+    if (var_smtputf8_enable && (discard_mask & EHLO_MASK_SMTPUTF8) == 0)
+       PSC_EHLO_APPEND(saved_len, psc_temp, "250-SMTPUTF8\r\n");
     STR(psc_temp)[saved_len + 3] = ' ';
 }
 
index 1286518eaf057a69288b815722f280689e0ac4ec..6bf8824da39f4149861beeae016818df1703eb67 100644 (file)
@@ -170,6 +170,7 @@ qmgr_deliver.o: ../../include/mymalloc.h
 qmgr_deliver.o: ../../include/rcpt_print.h
 qmgr_deliver.o: ../../include/recipient_list.h
 qmgr_deliver.o: ../../include/scan_dir.h
+qmgr_deliver.o: ../../include/smtputf8.h
 qmgr_deliver.o: ../../include/stringops.h
 qmgr_deliver.o: ../../include/sys_defs.h
 qmgr_deliver.o: ../../include/vbuf.h
index 6737e42c099c4bc66d143414b13eee8f6e0f4be4..d5f48453d180d262dd0d976fac9de2dc7d9c9701 100644 (file)
@@ -343,6 +343,7 @@ struct QMGR_MESSAGE {
     char   *sender;                    /* complete address */
     char   *dsn_envid;                 /* DSN envelope ID */
     int     dsn_ret;                   /* DSN headers/full */
+    int     smtputf8;                  /* requires unicode */
     char   *verp_delims;               /* VERP delimiters */
     char   *filter_xport;              /* filtering transport */
     char   *inspect_xport;             /* inspecting transport */
index d93a2cd105ba1765be73507ddc83b8930c6ca750..c3e446cb53ffc528371bbb3588fdf3ba56b33fb0 100644 (file)
@@ -296,6 +296,7 @@ void    qmgr_active_done(QMGR_MESSAGE *message)
                              message->queue_name,
                              message->queue_id,
                              message->encoding,
+                             message->smtputf8,
                              message->sender,
                              message->dsn_envid,
                              message->dsn_ret,
@@ -306,6 +307,7 @@ void    qmgr_active_done(QMGR_MESSAGE *message)
                                   message->queue_name,
                                   message->queue_id,
                                   message->encoding,
+                                  message->smtputf8,
                                   message->sender,
                                   message->dsn_envid,
                                   message->dsn_ret,
@@ -389,6 +391,7 @@ static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
                     message->queue_name,
                     message->queue_id,
                     message->encoding,
+                    message->smtputf8,
                     message->sender,
                     message->dsn_envid,
                     message->dsn_ret,
@@ -441,6 +444,7 @@ static void qmgr_active_done_25_generic(QMGR_MESSAGE *message)
                             message->queue_name,
                             message->queue_id,
                             message->encoding,
+                            message->smtputf8,
                             message->sender,
                             message->dsn_envid,
                             message->dsn_ret,
@@ -451,6 +455,7 @@ static void qmgr_active_done_25_generic(QMGR_MESSAGE *message)
                                  message->queue_name,
                                  message->queue_id,
                                  message->encoding,
+                                 message->smtputf8,
                                  message->sender,
                                  message->dsn_envid,
                                  message->dsn_ret,
@@ -466,6 +471,7 @@ static void qmgr_active_done_25_generic(QMGR_MESSAGE *message)
                        message->queue_name,
                        message->queue_id,
                        message->encoding,
+                       message->smtputf8,
                        message->sender,
                        message->dsn_envid,
                        message->dsn_ret,
index 2fbb0493e741763ed55734d11c046d9fc0d96aab..49f3ac1aa14dd71d7f2f7af70e8aa6013bc3399f 100644 (file)
@@ -76,6 +76,7 @@
 #include <dsn_buf.h>
 #include <dsb_scan.h>
 #include <rcpt_print.h>
+#include <smtputf8.h>
 
 /* Application-specific. */
 
@@ -140,6 +141,16 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
     MSG_STATS stats;
     char   *sender;
     int     flags;
+    int     smtputf8 = message->smtputf8;
+    const char *addr;
+
+    /*
+     * Todo: integrate with code up-stream that builds the delivery request.
+     */
+    for (recipient = list.info; recipient < list.info + list.len; recipient++)
+       if (var_smtputf8_enable && (addr = recipient->address)[0]
+           && !allascii(addr) && valid_utf8_string(addr, strlen(addr)))
+           smtputf8 |= SMTPUTF8_FLAG_RECIPIENT;
 
     /*
      * If variable envelope return path is requested, change prefix+@origin
@@ -167,6 +178,7 @@ static int qmgr_deliver_send_request(QMGR_ENTRY *entry, VSTREAM *stream)
               ATTR_TYPE_LONG, MAIL_ATTR_SIZE, message->cont_length,
               ATTR_TYPE_STR, MAIL_ATTR_NEXTHOP, entry->queue->nexthop,
               ATTR_TYPE_STR, MAIL_ATTR_ENCODING, message->encoding,
+              ATTR_TYPE_INT, MAIL_ATTR_SMTPUTF8, smtputf8,
               ATTR_TYPE_STR, MAIL_ATTR_SENDER, sender,
               ATTR_TYPE_STR, MAIL_ATTR_DSN_ENVID, message->dsn_envid,
               ATTR_TYPE_INT, MAIL_ATTR_DSN_RET, message->dsn_ret,
index e6bbaf65cf5873727efee9f8649b01d7bf0d33c0..19323467dfb598e8d8d9b791c5ceb89807b5e1ae 100644 (file)
@@ -179,6 +179,7 @@ static QMGR_MESSAGE *qmgr_message_create(const char *queue_name,
     message->sender = 0;
     message->dsn_envid = 0;
     message->dsn_ret = 0;
+    message->smtputf8 = 0;
     message->filter_xport = 0;
     message->inspect_xport = 0;
     message->redirect_addr = 0;
@@ -557,10 +558,11 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
            continue;
        if (rec_type == REC_TYPE_SIZE) {
            if (message->data_offset == 0) {
-               if ((count = sscanf(start, "%ld %ld %d %d %ld",
+               if ((count = sscanf(start, "%ld %ld %d %d %ld %d",
                                 &message->data_size, &message->data_offset,
                                    &message->rcpt_unread, &message->rflags,
-                                   &message->cont_length)) >= 3) {
+                                   &message->cont_length,
+                                   &message->smtputf8)) >= 3) {
                    /* Postfix >= 1.0 (a.k.a. 20010228). */
                    if (message->data_offset <= 0 || message->data_size <= 0) {
                        msg_warn("%s: invalid size record: %.100s",
index 4a0098e2cd3f2c1610bda70c8cfc81dd858d90ba..74cab19d66342b0778c6e0275422c88ee736ba44 100644 (file)
@@ -89,6 +89,7 @@ qmqpd.o: ../../include/quote_flags.h
 qmqpd.o: ../../include/rec_type.h
 qmqpd.o: ../../include/recipient_list.h
 qmqpd.o: ../../include/record.h
+qmqpd.o: ../../include/smtputf8.h
 qmqpd.o: ../../include/sys_defs.h
 qmqpd.o: ../../include/vbuf.h
 qmqpd.o: ../../include/verp_sender.h
index 6b8f4f610610692c34c4068a0b4b3ee7d289e26a..7e01485ccf853aac5b0450d0e256e03ee9732e74 100644 (file)
 /* .IP "\fBreceive_override_options (empty)\fR"
 /*     Enable or disable recipient validation, built-in content
 /*     filtering, or address mapping.
+/* SMTPUTF8 CONTROLS
+/* .ad
+/* .fi
+/*     Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+/* .IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+/*     Detect that a message requires SMTPUTF8 support for the specified
+/*     mail origin classes.
 /* RESOURCE AND RATE CONTROLS
 /* .ad
 /* .fi
 #include <lex_822.h>
 #include <verp_sender.h>
 #include <input_transp.h>
+#include <smtputf8.h>
 
 /* Single-threaded server skeleton. */
 
@@ -241,6 +249,7 @@ static void qmqpd_open_file(QMQPD_STATE *state)
      */
     cleanup_flags = input_transp_cleanup(CLEANUP_FLAG_MASK_EXTERNAL,
                                         qmqpd_input_transp_mask);
+    cleanup_flags |= smtputf8_autodetect(MAIL_SRC_MASK_QMQPD);
     state->dest = mail_stream_service(MAIL_CLASS_PUBLIC, var_cleanup_service);
     if (state->dest == 0
        || attr_print(state->dest->stream, ATTR_FLAG_NONE,
index 83dac65af664882bc74ceb26d82aa6d122bf5bbd..d68a294d1be7f4f6b15dc9f5e0043f02fe38b6ca 100644 (file)
 /* .IP "\fBdelay_warning_time (0h)\fR"
 /*     The time after which the sender receives a copy of the message
 /*     headers of mail that is still queued.
-/* .IP "\fBenable_errors_to (no)\fR"
-/*     Report mail delivery errors to the address specified with the
-/*     non-standard Errors-To: message header, instead of the envelope
-/*     sender address (this feature is removed with Postfix version 2.2, is
-/*     turned off by default with Postfix version 2.1, and is always turned on
-/*     with older Postfix versions).
 /* .IP "\fBmail_owner (postfix)\fR"
 /*     The UNIX system account that owns the Postfix queue and most Postfix
 /*     daemon processes.
index bc284e68da4db442aed1b5a154712612f262ca10..65bdd39e08cdd20e84fe06138aecae5776c7f37c 100644 (file)
@@ -151,6 +151,7 @@ smtp_addr.o: ../../include/inet_proto.h
 smtp_addr.o: ../../include/mail_params.h
 smtp_addr.o: ../../include/maps.h
 smtp_addr.o: ../../include/match_list.h
+smtp_addr.o: ../../include/midna.h
 smtp_addr.o: ../../include/mime_state.h
 smtp_addr.o: ../../include/msg.h
 smtp_addr.o: ../../include/msg_stats.h
@@ -187,11 +188,12 @@ smtp_chat.o: ../../include/dsn_util.h
 smtp_chat.o: ../../include/header_body_checks.h
 smtp_chat.o: ../../include/header_opts.h
 smtp_chat.o: ../../include/htable.h
-smtp_chat.o: ../../include/int_filt.h
+smtp_chat.o: ../../include/iostuff.h
 smtp_chat.o: ../../include/line_wrap.h
 smtp_chat.o: ../../include/mail_addr.h
 smtp_chat.o: ../../include/mail_error.h
 smtp_chat.o: ../../include/mail_params.h
+smtp_chat.o: ../../include/mail_proto.h
 smtp_chat.o: ../../include/maps.h
 smtp_chat.o: ../../include/match_list.h
 smtp_chat.o: ../../include/mime_state.h
@@ -331,7 +333,6 @@ smtp_map11.o: ../../include/string_list.h
 smtp_map11.o: ../../include/sys_defs.h
 smtp_map11.o: ../../include/tls.h
 smtp_map11.o: ../../include/tok822.h
-smtp_map11.o: ../../include/valid_hostname.h
 smtp_map11.o: ../../include/vbuf.h
 smtp_map11.o: ../../include/vstream.h
 smtp_map11.o: ../../include/vstring.h
@@ -380,6 +381,7 @@ smtp_proto.o: ../../include/record.h
 smtp_proto.o: ../../include/resolve_clnt.h
 smtp_proto.o: ../../include/scache.h
 smtp_proto.o: ../../include/smtp_stream.h
+smtp_proto.o: ../../include/smtputf8.h
 smtp_proto.o: ../../include/sock_addr.h
 smtp_proto.o: ../../include/split_at.h
 smtp_proto.o: ../../include/string_list.h
@@ -387,6 +389,7 @@ smtp_proto.o: ../../include/stringops.h
 smtp_proto.o: ../../include/sys_defs.h
 smtp_proto.o: ../../include/tls.h
 smtp_proto.o: ../../include/tok822.h
+smtp_proto.o: ../../include/uxtext.h
 smtp_proto.o: ../../include/vbuf.h
 smtp_proto.o: ../../include/vstream.h
 smtp_proto.o: ../../include/vstring.h
@@ -689,6 +692,7 @@ smtp_tls_policy.o: ../../include/sys_defs.h
 smtp_tls_policy.o: ../../include/tls.h
 smtp_tls_policy.o: ../../include/tok822.h
 smtp_tls_policy.o: ../../include/valid_hostname.h
+smtp_tls_policy.o: ../../include/valid_utf8_hostname.h
 smtp_tls_policy.o: ../../include/vbuf.h
 smtp_tls_policy.o: ../../include/vstream.h
 smtp_tls_policy.o: ../../include/vstring.h
index 15ecda16362f1f8bed3fcf7cb774e7a8a86bd815..158c273e6b8afcc96afcac39b7018d004e628a75 100644 (file)
@@ -96,6 +96,8 @@
 /*     RFC 3463 (Enhanced Status Codes)
 /*     RFC 4954 (AUTH command)
 /*     RFC 5321 (SMTP protocol)
+/*     RFC 6531 (Internationalized SMTP)
+/*     RFC 6533 (Internationalized Delivery Status Notifications)
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /*     Corrupted message files are marked so that the queue manager can
 /*     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).
+/* SMTPUTF8 CONTROLS
+/* .ad
+/* .fi
+/*     Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+/* .IP "\fBsmtputf8_enable (no)\fR"
+/*     Enable experimental SMTPUTF8 support for the protocols described
+/*     in RFC 6531..6533.
+/* .IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+/*     Enable SMTPUTF8 autodetection for the specified mail origin
+/*     classes.
 /* TROUBLE SHOOTING CONTROLS
 /* .ad
 /* .fi
index 70f8dbe67282d8163e2f2bc1517c5248ffba0f4b..c21aa65a5b575dbb6ddc0c2faec8987ab803c08e 100644 (file)
@@ -221,6 +221,7 @@ typedef struct SMTP_STATE {
 #define SMTP_FEATURE_XFORWARD_PORT     (1<<18)
 #define SMTP_FEATURE_EARLY_TLS_MAIL_REPLY (1<<19)      /* CVE-2009-3555 */
 #define SMTP_FEATURE_XFORWARD_IDENT    (1<<20)
+#define SMTP_FEATURE_SMTPUTF8          (1<<21) /* RFC 6531 */
 
  /*
   * Features that passivate under the endpoint.
index deba52f7b133c87eb7831f05f20c79e4dfeff4d3..4a684ae709014eca126c63ac96d544b5f5ed616a 100644 (file)
@@ -85,6 +85,7 @@
 #include <stringops.h>
 #include <myaddrinfo.h>
 #include <inet_proto.h>
+#include <midna.h>
 
 /* Global library. */
 
@@ -342,7 +343,7 @@ static DNS_RR *smtp_truncate_self(DNS_RR *addr_list, unsigned pref)
 
 /* smtp_domain_addr - mail exchanger address lookup */
 
-DNS_RR *smtp_domain_addr(char *name, DNS_RR **mxrr, int misc_flags,
+DNS_RR *smtp_domain_addr(const char *name, DNS_RR **mxrr, int misc_flags,
                                 DSN_BUF *why, int *found_myself)
 {
     DNS_RR *mx_names;
@@ -351,6 +352,7 @@ DNS_RR *smtp_domain_addr(char *name, DNS_RR **mxrr, int misc_flags,
     unsigned best_pref;
     unsigned best_found;
     int     r = 0;                     /* Resolver flags */
+    const char *aname;
 
     dsb_reset(why);                            /* Paranoia */
 
@@ -367,6 +369,17 @@ DNS_RR *smtp_domain_addr(char *name, DNS_RR **mxrr, int misc_flags,
     if (smtp_dns_support == SMTP_DNS_DNSSEC)
        r |= RES_USE_DNSSEC;
 
+    /*
+     * IDNA support.
+     */
+#ifndef NO_EAI
+    if (!allascii(name) && (aname = midna_utf8_to_ascii(name)) != 0) {
+       if (msg_verbose)
+           msg_info("%s asciified to %s", name, aname);
+    } else
+#endif
+       aname = name;
+
     /*
      * Look up the mail exchanger hosts listed for this name. Sort the
      * results by preference. Look up the corresponding host addresses, and
@@ -409,21 +422,21 @@ DNS_RR *smtp_domain_addr(char *name, DNS_RR **mxrr, int misc_flags,
      * at hostnames provides a partial solution for MX hosts behind a NAT
      * gateway.
      */
-    switch (dns_lookup(name, T_MX, r, &mx_names, (VSTRING *) 0, why->reason)) {
+    switch (dns_lookup(aname, T_MX, r, &mx_names, (VSTRING *) 0, why->reason)) {
     default:
        dsb_status(why, "4.4.3");
        if (var_ign_mx_lookup_err)
-           addr_list = smtp_host_addr(name, misc_flags, why);
+           addr_list = smtp_host_addr(aname, misc_flags, why);
        break;
     case DNS_INVAL:
        dsb_status(why, "5.4.4");
        if (var_ign_mx_lookup_err)
-           addr_list = smtp_host_addr(name, misc_flags, why);
+           addr_list = smtp_host_addr(aname, misc_flags, why);
        break;
     case DNS_FAIL:
        dsb_status(why, "5.4.3");
        if (var_ign_mx_lookup_err)
-           addr_list = smtp_host_addr(name, misc_flags, why);
+           addr_list = smtp_host_addr(aname, misc_flags, why);
        break;
     case DNS_OK:
        mx_names = dns_rr_sort(mx_names, dns_rr_compare_pref_any);
@@ -472,7 +485,7 @@ DNS_RR *smtp_domain_addr(char *name, DNS_RR **mxrr, int misc_flags,
        }
        break;
     case DNS_NOTFOUND:
-       addr_list = smtp_host_addr(name, misc_flags, why);
+       addr_list = smtp_host_addr(aname, misc_flags, why);
        break;
     }
 
@@ -489,18 +502,30 @@ DNS_RR *smtp_host_addr(const char *host, int misc_flags, DSN_BUF *why)
 {
     DNS_RR *addr_list;
     int     res_opt = 0;
+    const char *ahost;
 
     dsb_reset(why);                            /* Paranoia */
 
     if (smtp_dns_support == SMTP_DNS_DNSSEC)
        res_opt |= RES_USE_DNSSEC;
 
+    /*
+     * IDNA support.
+     */
+#ifndef NO_EAI
+    if (!allascii(host) && (ahost = midna_utf8_to_ascii(host)) != 0) {
+       if (msg_verbose)
+           msg_info("%s asciified to %s", host, ahost);
+    } else
+#endif
+       ahost = host;
+
     /*
      * If the host is specified by numerical address, just convert the
      * address to internal form. Otherwise, the host is specified by name.
      */
 #define PREF0  0
-    addr_list = smtp_addr_one((DNS_RR *) 0, host, res_opt, PREF0, why);
+    addr_list = smtp_addr_one((DNS_RR *) 0, ahost, res_opt, PREF0, why);
     if (addr_list
        && (misc_flags & SMTP_MISC_FLAG_LOOP_DETECT)
        && smtp_find_self(addr_list) != 0) {
index cf0b6898cb74ef2caf59c2be7bd7471f5f7691af..8f20961e560a96e6d7821b30fd77d8a01678068c 100644 (file)
@@ -17,7 +17,7 @@
   * Internal interfaces.
   */
 extern DNS_RR *smtp_host_addr(const char *, int, DSN_BUF *);
-extern DNS_RR *smtp_domain_addr(char *, DNS_RR **, int, DSN_BUF *, int *);
+extern DNS_RR *smtp_domain_addr(const char *, DNS_RR **, int, DSN_BUF *, int *);
 
 /* LICENSE
 /* .ad
index 5e2f82c7d9bc4b59a0ee3f07ef6a50fdd669b56a..f11b37c891165e442372bd94f81ca52f4cc60b1f 100644 (file)
@@ -458,7 +458,7 @@ void    smtp_chat_notify(SMTP_SESSION *session)
 
     notice = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                    var_error_rcpt,
-                                   INT_FILT_MASK_NOTIFY,
+                                   MAIL_SRC_MASK_NOTIFY,
                                    NULL_TRACE_FLAGS, NO_QUEUE_ID);
     if (notice == 0) {
        msg_warn("postmaster notify: %m");
index 19c374fa6638137a4fbb1d21449789565f00a383..acff1eba4cf5f9fa60dc1dc08a6dd95ab851d811 100644 (file)
@@ -979,6 +979,7 @@ static void smtp_connect_inet(SMTP_STATE *state, const char *nexthop,
                session->state = state;
 #ifdef USE_TLS
                session->tls = state->tls;      /* TEMPORARY */
+               /* XXX: EAI: Convert to A-label here or in TLS library */
                session->tls_nexthop = domain;  /* for TLS_LEV_SECURE */
 #endif
                if (addr->pref == domain_best_pref)
index 8d7f75817a9a70a504d2ebd5e9e24584c8354e54..96326ebe66b7e817787f1ad407aca5fa7eb26415 100644 (file)
@@ -62,7 +62,6 @@
 #include <dict.h>
 #include <argv.h>
 #include <tok822.h>
-#include <valid_hostname.h>
 
 /* Global library. */
 
index 1661eee83fb8758361583d738ba7e4daee63347b..7be90fbbe54ed5956244b7f4b1bb3cf944d47e59 100644 (file)
 #include <lex_822.h>
 #include <dsn_mask.h>
 #include <xtext.h>
+#include <uxtext.h>
+#include <smtputf8.h>
 
 /* Application-specific. */
 
@@ -231,6 +233,11 @@ char   *xfer_request[SMTP_STATE_LAST] = {
     "QUIT command",
 };
 
+ /*
+  * Note: MIME downgrade never happens for mail that must be delivered with
+  * SMTPUTF8 (the sender requested SMTPUTF8, AND the delivery request
+  * involves at least one UTF-8 envelope address or header value.
+  */
 #define SMTP_MIME_DOWNGRADE(session, request) \
     (var_disable_mime_oconv == 0 \
      && (session->features & SMTP_FEATURE_8BITMIME) == 0 \
@@ -547,6 +554,9 @@ int     smtp_helo(SMTP_STATE *state)
                } else if (strcasecmp(word, "DSN") == 0) {
                    if ((discard_mask & EHLO_MASK_DSN) == 0)
                        session->features |= SMTP_FEATURE_DSN;
+               } else if (strcasecmp(word, "SMTPUTF8") == 0) {
+                   if ((discard_mask & EHLO_MASK_SMTPUTF8) == 0)
+                       session->features |= SMTP_FEATURE_SMTPUTF8;
                }
                n++;
            }
@@ -556,6 +566,59 @@ int     smtp_helo(SMTP_STATE *state)
        msg_info("server features: 0x%x size %.0f",
                 session->features, (double) session->size_limit);
 
+    /*
+     * Decide if this delivery requires SMTPUTF8 server support.
+     * 
+     * For now, we require that the remote SMTP server supports SMTPUTF8 when
+     * the sender requested SMTPUTF8 support.
+     * 
+     * XXX EAI Refine this to: the sender requested SMTPUTF8 support AND the
+     * delivery request involves at least one UTF-8 envelope address or
+     * header value.
+     * 
+     * If the sender requested SMTPUTF8 support but the delivery request
+     * involves no UTF-8 envelope address or header value, then we could
+     * still deliver such mail to a non-SMTPUTF8 server, except that we must
+     * either uxtext-encode ORCPT parameters or not send them. We cannot
+     * encode the ORCPT in xtext, because legacy SMTP requires that the
+     * unencoded address consist entirely of printable (graphic and white
+     * space) characters from the US-ASCII repertoire (RFC 3461 section 4). A
+     * correct uxtext encoder will produce a result that an xtext decoder
+     * will pass through unchanged.
+     * 
+     * XXX Should we try to encode headers with RFC 2047 when delivering to a
+     * non-SMTPUTF8 server? That could make life easier for mailing lists.
+     */
+#define DELIVERY_REQUIRES_SMTPUTF8 \
+       ((request->smtputf8 & SMTPUTF8_FLAG_REQUESTED) \
+       && (request->smtputf8 & ~SMTPUTF8_FLAG_REQUESTED))
+
+    /*
+     * Require that the server supports SMTPUTF8 when delivery requires
+     * SMTPUTF8.
+     * 
+     * Fix 20140706: moved this before negotiating TLS, AUTH, and so on.
+     */
+    if ((session->features & SMTP_FEATURE_SMTPUTF8) == 0
+       && DELIVERY_REQUIRES_SMTPUTF8)
+       return (smtp_mesg_fail(state, DSN_BY_LOCAL_MTA,
+                              SMTP_RESP_FAKE(&fake, "5.6.7"),
+                              "SMTPUTF8 is required, "
+                              "but was not offered by host %s",
+                              session->namaddr));
+
+    /*
+     * Fix 20140706: don't do silly things when the remote server announces
+     * SMTPUTF8 but not 8BITMIME support. Our primary mission is to deliver
+     * mail, not to force people into compliance.
+     */
+    if ((session->features & SMTP_FEATURE_SMTPUTF8) != 0
+       && (session->features & SMTP_FEATURE_8BITMIME) == 0) {
+       msg_info("host %s offers SMTPUTF8 support, but not 8BITMIME",
+                session->namaddr);
+       session->features |= SMTP_FEATURE_8BITMIME;
+    }
+
     /*
      * We use SMTP command pipelining if the server said it supported it.
      * Since we use blocking I/O, RFC 2197 says that we should inspect the
@@ -1378,6 +1441,18 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
                                           dsn_ret_str(request->dsn_ret));
            }
 
+           /*
+            * Request SMTPUTF8 when the remote SMTP server supports
+            * SMTPUTF8.
+            * 
+            * If the sender requested SMTPUTF8 but the remote SMTP server does
+            * not support SMTPUTF8, then we have already determined earlier
+            * that delivering this message without SMTPUTF8 will not break
+            * the SMTPUTF8 promise that was made to the sender.
+            */
+           if ((session->features & SMTP_FEATURE_SMTPUTF8) != 0)
+               vstring_strcat(next_command, " SMTPUTF8");
+
            /*
             * We authenticate the local MTA only, but not the sender.
             */
@@ -1432,17 +1507,33 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
                            vstring_str(session->scratch));
            if (session->features & SMTP_FEATURE_DSN) {
                /* XXX DSN xtext encode address value not type. */
-               if (rcpt->dsn_orcpt[0]) {
-                   xtext_quote(session->scratch, rcpt->dsn_orcpt, "+=");
-                   vstring_sprintf_append(next_command, " ORCPT=%s",
-                                          vstring_str(session->scratch));
-               } else if (rcpt->orig_addr[0]) {
+               const char *orcpt_type_addr = rcpt->dsn_orcpt;
+
+               /* Fix 20140706: don't use empty rcpt->orig_addr. */
+               if (orcpt_type_addr[0] == 0 && rcpt->orig_addr[0] != 0) {
                    quote_822_local(session->scratch, rcpt->orig_addr);
-                   vstring_sprintf(session->scratch2, "rfc822;%s",
+                   vstring_sprintf(session->scratch2, "%s;%s",
+                   /* Fix 20140707: sender must request SMTPUTF8. */
+                                   (request->smtputf8 != 0
+                             && !allascii(vstring_str(session->scratch))) ?
+                                   "utf-8" : "rfc822",
                                    vstring_str(session->scratch));
-                   xtext_quote(session->scratch, vstring_str(session->scratch2), "+=");
-                   vstring_sprintf_append(next_command, " ORCPT=%s",
-                                          vstring_str(session->scratch));
+                   orcpt_type_addr = vstring_str(session->scratch2);
+               }
+               if (orcpt_type_addr[0] != 0) {
+                   /* Fix 20140706: don't send unquoted ORCPT. */
+                   /* Fix 20140707: quoting method must match orcpt type. */
+                   /* Fix 20140707: handle uxtext encoder errors. */
+                   if (strncasecmp(orcpt_type_addr, "utf-8;", 6) == 0) {
+                       if (uxtext_quote(session->scratch,
+                                        orcpt_type_addr, "+=") != 0)
+                           vstring_sprintf_append(next_command, " ORCPT=%s",
+                                            vstring_str(session->scratch));
+                   } else {
+                       xtext_quote(session->scratch, orcpt_type_addr, "=");
+                       vstring_sprintf_append(next_command, " ORCPT=%s",
+                                            vstring_str(session->scratch));
+                   }
                }
                if (rcpt->dsn_notify)
                    vstring_sprintf_append(next_command, " NOTIFY=%s",
index f280810e1e9c76e1e633442aa267386af257378c..59118f2b36f40ceff6427b4147c62c405fe5d14a 100644 (file)
@@ -98,7 +98,7 @@
 #include <mymalloc.h>
 #include <vstring.h>
 #include <stringops.h>
-#include <valid_hostname.h>
+#include <valid_utf8_hostname.h>
 #include <ctable.h>
 
 /* Global library. */
@@ -375,7 +375,7 @@ static void tls_policy_lookup(SMTP_TLS_POLICY *tls, int *site_level,
      * 
      * XXX UNIX-domain connections query with the pathname as destination.
      */
-    if (!valid_hostname(site_name, DONT_GRIPE)) {
+    if (!valid_utf8_hostname(var_smtputf8_enable, site_name, DONT_GRIPE)) {
        tls_policy_lookup_one(tls, site_level, site_name, site_class);
        return;
     }
index 4e3397d0edf08ce40fe58532dc1979bb096bb63e..7fcc49d267c564554deff943450d4e988d67a485 100644 (file)
@@ -207,6 +207,7 @@ smtpd.o: ../../include/recipient_list.h
 smtpd.o: ../../include/record.h
 smtpd.o: ../../include/resolve_clnt.h
 smtpd.o: ../../include/smtp_stream.h
+smtpd.o: ../../include/smtputf8.h
 smtpd.o: ../../include/sock_addr.h
 smtpd.o: ../../include/split_at.h
 smtpd.o: ../../include/string_list.h
@@ -215,6 +216,7 @@ smtpd.o: ../../include/sys_defs.h
 smtpd.o: ../../include/tls.h
 smtpd.o: ../../include/tls_proxy.h
 smtpd.o: ../../include/tok822.h
+smtpd.o: ../../include/uxtext.h
 smtpd.o: ../../include/valid_hostname.h
 smtpd.o: ../../include/valid_mailhost_addr.h
 smtpd.o: ../../include/vbuf.h
@@ -239,7 +241,6 @@ smtpd_chat.o: ../../include/argv.h
 smtpd_chat.o: ../../include/attr.h
 smtpd_chat.o: ../../include/cleanup_user.h
 smtpd_chat.o: ../../include/dns.h
-smtpd_chat.o: ../../include/int_filt.h
 smtpd_chat.o: ../../include/iostuff.h
 smtpd_chat.o: ../../include/line_wrap.h
 smtpd_chat.o: ../../include/mac_expand.h
@@ -303,6 +304,7 @@ smtpd_check.o: ../../include/mail_stream.h
 smtpd_check.o: ../../include/maps.h
 smtpd_check.o: ../../include/match_list.h
 smtpd_check.o: ../../include/match_parent_style.h
+smtpd_check.o: ../../include/midna.h
 smtpd_check.o: ../../include/milter.h
 smtpd_check.o: ../../include/msg.h
 smtpd_check.o: ../../include/msg_stats.h
@@ -328,6 +330,7 @@ smtpd_check.o: ../../include/sys_defs.h
 smtpd_check.o: ../../include/tls.h
 smtpd_check.o: ../../include/valid_hostname.h
 smtpd_check.o: ../../include/valid_mailhost_addr.h
+smtpd_check.o: ../../include/valid_utf8_hostname.h
 smtpd_check.o: ../../include/vbuf.h
 smtpd_check.o: ../../include/verify_clnt.h
 smtpd_check.o: ../../include/vstream.h
index 8784cf236a7813e3c8afaed487152c8b7590f2c5..efdd50255f666ad878f06f8f3e59a61a3141470e 100644 (file)
@@ -53,6 +53,8 @@
 /*     RFC 4409 (Message submission)
 /*     RFC 4954 (AUTH command)
 /*     RFC 5321 (SMTP protocol)
+/*     RFC 6531 (Internationalized SMTP)
+/*     RFC 6533 (Internationalized Delivery Status Notifications)
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /*
 /* .IP "\fBsmtpd_tls_cipherlist (empty)\fR"
 /*     Obsolete Postfix < 2.3 control for the Postfix SMTP server TLS
 /*     cipher list.
+/* SMTPUTF8 CONTROLS
+/* .ad
+/* .fi
+/*     Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+/* .IP "\fBsmtputf8_enable (no)\fR"
+/*     Enable experimental SMTPUTF8 support for the protocols described
+/*     in RFC 6531..6533.
+/* .IP "\fBstrict_smtputf8 (no)\fR"
+/*     Enable stricter enforcement of the SMTPUTF8 protocol.
+/* .IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+/*     Detect that a message requires SMTPUTF8 support for the specified
+/*     mail origin classes.
 /* VERP SUPPORT CONTROLS
 /* .ad
 /* .fi
 #include <valid_mailhost_addr.h>
 #include <dsn_mask.h>
 #include <xtext.h>
+#include <uxtext.h>
 #include <tls_proxy.h>
 #include <verify_sender_addr.h>
+#include <smtputf8.h>
 
 /* Single-threaded server skeleton. */
 
@@ -1812,6 +1828,8 @@ static int ehlo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        EHLO_APPEND(state, "8BITMIME");
     if ((discard_mask & EHLO_MASK_DSN) == 0)
        EHLO_APPEND(state, "DSN");
+    if (var_smtputf8_enable && (discard_mask & EHLO_MASK_SMTPUTF8) == 0)
+       EHLO_APPEND(state, "SMTPUTF8");
 
     /*
      * Send the reply.
@@ -1892,6 +1910,10 @@ static int mail_open_stream(SMTPD_STATE *state)
        cleanup_flags = input_transp_cleanup(CLEANUP_FLAG_MASK_EXTERNAL,
                                             smtpd_input_transp_mask)
            | CLEANUP_FLAG_SMTP_REPLY;
+       if (state->flags & SMTPD_FLAG_SMTPUTF8)
+           cleanup_flags |= CLEANUP_FLAG_SMTPUTF8;
+       else
+           cleanup_flags |= smtputf8_autodetect(MAIL_SRC_MASK_SMTPD);
        state->dest = mail_stream_service(MAIL_CLASS_PUBLIC,
                                          var_cleanup_service);
        if (state->dest == 0
@@ -2185,7 +2207,7 @@ static int extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg,
        if ((STR(state->addr_buf)[0] == 0 && !allow_empty_addr)
            || (strict_rfc821 && STR(state->addr_buf)[0] == '@')
            || (SMTPD_STAND_ALONE(state) == 0
-               && smtpd_check_addr(STR(state->addr_buf)) != 0)) {
+               && smtpd_check_addr(state, STR(state->addr_buf)) != 0)) {
            msg_warn("Illegal address syntax from %s in %s command: %s",
                     state->namaddr, state->where,
                     printable(STR(arg->vstrval), '?'));
@@ -2313,6 +2335,10 @@ static int mail_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
                smtpd_chat_reply(state, "552 5.3.4 Message size exceeds file system imposed limit");
                return (-1);
            }
+       } else if (var_smtputf8_enable
+                  && (state->ehlo_discard_mask & EHLO_MASK_SMTPUTF8) == 0
+                  && strcasecmp(arg, "SMTPUTF8") == 0) {       /* RFC 6531 */
+           state->flags |= SMTPD_FLAG_SMTPUTF8;
 #ifdef USE_SASL_AUTH
        } else if (strncasecmp(arg, "AUTH=", 5) == 0) {
            if ((err = smtpd_sasl_mail_opt(state, arg + 5)) != 0) {
@@ -2430,6 +2456,19 @@ static int mail_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        }
     }
 
+    /*
+     * Historically, Postfix does not forbid 8-bit envelope addresses.
+     * Changing this would be a compatibility break. That can't happen in the
+     * forseeable future.
+     */
+    if (var_strict_smtputf8 && (state->flags & SMTPD_FLAG_SMTPUTF8) == 0) {
+       if (*STR(state->addr_buf) && !allascii(STR(state->addr_buf))) {
+           mail_reset(state);
+           smtpd_chat_reply(state, "553 5.6.7 Must declare SMTPUTF8 to send unicode address");
+           return (-1);
+       }
+    }
+
     /*
      * Check the queue file space, if applicable. The optional before-filter
      * speed-adjust buffers use disk space. However, we don't know if they
@@ -2640,8 +2679,10 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
            vstring_strcpy(state->dsn_orcpt_buf, arg + 6);
            if (dsn_orcpt_addr
             || (coded_addr = split_at(STR(state->dsn_orcpt_buf), ';')) == 0
-               || xtext_unquote(state->dsn_buf, coded_addr) == 0
-               || *(dsn_orcpt_type = STR(state->dsn_orcpt_buf)) == 0) {
+               || *(dsn_orcpt_type = STR(state->dsn_orcpt_buf)) == 0
+               || (strcasecmp(dsn_orcpt_type, "utf-8") == 0 ?
+                   uxtext_unquote(state->dsn_buf, coded_addr) == 0 :
+                   xtext_unquote(state->dsn_buf, coded_addr) == 0)) {
                state->error_mask |= MAIL_ERROR_PROTOCOL;
                smtpd_chat_reply(state,
                             "501 5.5.4 Error: Bad ORCPT parameter syntax");
@@ -2662,6 +2703,19 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        state->error_mask |= MAIL_ERROR_POLICY;
        return (-1);
     }
+
+    /*
+     * Historically, Postfix does not forbid 8-bit envelope addresses.
+     * Changing this would be a compatibility break. That can't happen in the
+     * forseeable future.
+     */
+    if (var_strict_smtputf8 && (state->flags & SMTPD_FLAG_SMTPUTF8) == 0) {
+       if (*STR(state->addr_buf) && !allascii(STR(state->addr_buf))) {
+           mail_reset(state);
+           smtpd_chat_reply(state, "553 5.6.7 Must declare SMTPUTF8 to send unicode address");
+           return (-1);
+       }
+    }
     if (SMTPD_STAND_ALONE(state) == 0) {
        const char *verify_sender;
 
@@ -2919,6 +2973,8 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
     const CLEANUP_STAT_DETAIL *detail;
     const char *rfc3848_sess;
     const char *rfc3848_auth;
+    const char *with_protocol = (state->flags & SMTPD_FLAG_SMTPUTF8) ?
+    "UTF8SMTP" : state->protocol;
 
 #ifdef USE_TLS
     VSTRING *peer_CN;
@@ -3081,7 +3137,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
                        state->cleanup ? "\tby %s (%s) with %s%s%s id %s" :
                        "\tby %s (%s) with %s%s%s",
                        var_myhostname, var_mail_name,
-                       state->protocol, rfc3848_sess,
+                       with_protocol, rfc3848_sess,
                        rfc3848_auth, state->queue_id);
            quote_822_local(state->buffer, state->recipient);
            out_fprintf(out_stream, REC_TYPE_NORM,
@@ -3092,7 +3148,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
                        state->cleanup ? "\tby %s (%s) with %s%s%s id %s;" :
                        "\tby %s (%s) with %s%s%s;",
                        var_myhostname, var_mail_name,
-                       state->protocol, rfc3848_sess,
+                       with_protocol, rfc3848_sess,
                        rfc3848_auth, state->queue_id);
            out_fprintf(out_stream, REC_TYPE_NORM,
                        "\t%s", mail_date(state->arrival_time.tv_sec));
@@ -3399,6 +3455,7 @@ static int vrfy_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
 {
     const char *err = 0;
     int     rate;
+    int     smtputf8 = 0;
 
     /*
      * The SMTP standard (RFC 821) disallows unquoted special characters in
@@ -3429,9 +3486,17 @@ static int vrfy_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "502 5.5.1 VRFY command is disabled");
        return (-1);
     }
+    /* Fix 20140707: handle missing address. */
+    if (var_smtputf8_enable
+       && (state->ehlo_discard_mask & EHLO_MASK_SMTPUTF8) == 0
+       && argc > 1 && strcasecmp(argv[argc - 1].strval, "SMTPUTF8") == 0) {
+       argc--;                                 /* RFC 6531 */
+       smtputf8 = 1;
+    }
     if (argc < 2) {
        state->error_mask |= MAIL_ERROR_PROTOCOL;
-       smtpd_chat_reply(state, "501 5.5.4 Syntax: VRFY address");
+       smtpd_chat_reply(state, "501 5.5.4 Syntax: VRFY address%s",
+                        var_smtputf8_enable ? " [SMTPUTF8]" : "");
        return (-1);
     }
 
@@ -3468,6 +3533,14 @@ static int vrfy_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "501 5.1.3 Bad recipient address syntax");
        return (-1);
     }
+    /* Fix 20140707: Check the VRFY command. */
+    if (smtputf8 == 0 && var_strict_smtputf8) {
+       if (*STR(state->addr_buf) && !allascii(STR(state->addr_buf))) {
+           mail_reset(state);
+           smtpd_chat_reply(state, "553 5.6.7 Must declare SMTPUTF8 to send unicode address");
+           return (-1);
+       }
+    }
     /* Use state->addr_buf, with the unquoted result from extract_addr() */
     if (SMTPD_STAND_ALONE(state) == 0
        && (err = smtpd_check_rcpt(state, STR(state->addr_buf))) != 0) {
@@ -3524,6 +3597,8 @@ static int etrn_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     /*
      * As an extension to RFC 1985 we also allow an RFC 2821 address literal
      * enclosed in [].
+     * 
+     * XXX EAI: Convert to ASCII and use that form internally.
      */
     if (!valid_hostname(argv[1].strval, DONT_GRIPE)
        && !valid_mailhost_literal(argv[1].strval, DONT_GRIPE)) {
@@ -3694,6 +3769,7 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
            if (name_status != SMTPD_PEER_CODE_OK) {
                attr_value = CLIENT_NAME_UNKNOWN;
            } else {
+               /* XXX EAI */
                if (!valid_hostname(attr_value, DONT_GRIPE)) {
                    state->error_mask |= MAIL_ERROR_PROTOCOL;
                    smtpd_chat_reply(state, "501 5.5.4 Bad %s syntax: %s",
@@ -3719,6 +3795,7 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
            if (name_status != SMTPD_PEER_CODE_OK) {
                attr_value = CLIENT_NAME_UNKNOWN;
            } else {
+               /* XXX EAI */
                if (!valid_hostname(attr_value, DONT_GRIPE)) {
                    state->error_mask |= MAIL_ERROR_PROTOCOL;
                    smtpd_chat_reply(state, "501 5.5.4 Bad %s syntax: %s",
@@ -3987,6 +4064,7 @@ static int xforward_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
            if (STREQ(attr_value, XFORWARD_UNAVAILABLE)) {
                attr_value = CLIENT_NAME_UNKNOWN;
            } else {
+               /* XXX EAI */
                neuter(attr_value, NEUTER_CHARACTERS, '?');
                if (!valid_hostname(attr_value, DONT_GRIPE)) {
                    state->error_mask |= MAIL_ERROR_PROTOCOL;
@@ -5489,7 +5567,7 @@ int     main(int argc, char **argv)
 #endif
        VAR_SMTPD_ACL_PERM_LOG, DEF_SMTPD_ACL_PERM_LOG, &var_smtpd_acl_perm_log, 0, 0,
        VAR_SMTPD_UPROXY_PROTO, DEF_SMTPD_UPROXY_PROTO, &var_smtpd_uproxy_proto, 0, 0,
-       VAR_SMTPD_POLICY_DEF_ACTION, DEF_SMTPD_POLICY_DEF_ACTION, &var_smtpd_policy_def_action, 1, 0, 
+       VAR_SMTPD_POLICY_DEF_ACTION, DEF_SMTPD_POLICY_DEF_ACTION, &var_smtpd_policy_def_action, 1, 0,
        0,
     };
     static const CONFIG_RAW_TABLE raw_table[] = {
index 8bd11763c8e648f16e63fd616f171805c33e9264..5677684cd74b09b6786ebc6e4d4069eacde498bf 100644 (file)
@@ -190,9 +190,11 @@ typedef struct {
 #define SMTPD_FLAG_HANGUP         (1<<0)       /* 421/521 disconnect */
 #define SMTPD_FLAG_ILL_PIPELINING  (1<<1)      /* inappropriate pipelining */
 #define SMTPD_FLAG_AUTH_USED      (1<<2)       /* don't reuse SASL state */
+#define SMTPD_FLAG_SMTPUTF8       (1<<3)       /* RFC 6531/2 transaction */
 
  /* Security: don't reset SMTPD_FLAG_AUTH_USED. */
-#define SMTPD_MASK_MAIL_KEEP           ~0      /* keep all after MAIL reset */
+#define SMTPD_MASK_MAIL_KEEP \
+           ~(SMTPD_FLAG_SMTPUTF8)              /* Fix 20140706 */
 
 #define SMTPD_STATE_XFORWARD_INIT  (1<<0)      /* xforward preset done */
 #define SMTPD_STATE_XFORWARD_NAME  (1<<1)      /* client name received */
index a1016cd9c4c90ec26762108acb93906b229b602f..7549b5c37a46fc728902f0cd4d81acc4b1e6f288 100644 (file)
@@ -264,7 +264,7 @@ void    smtpd_chat_notify(SMTPD_STATE *state)
 
     notice = post_mail_fopen_nowait(mail_addr_double_bounce(),
                                    var_error_rcpt,
-                                   INT_FILT_MASK_NOTIFY,
+                                   MAIL_SRC_MASK_NOTIFY,
                                    NULL_TRACE_FLAGS, NO_QUEUE_ID);
     if (notice == 0) {
        msg_warn("postmaster notify: %m");
index 8850cff702a0aa8b443e0867d44c9397d59dcdbd..eded7b908a5028ccb8c012339e449a458132631c 100644 (file)
@@ -9,7 +9,8 @@
 /*
 /*     void    smtpd_check_init()
 /*
-/*     int     smtpd_check_addr(address)
+/*     int     smtpd_check_addr(state, address)
+/*     SMTPD_STATE *state;
 /*     const char *address;
 /*
 /*     char    *smtpd_check_rewrite(state)
 #include <myaddrinfo.h>
 #include <inet_proto.h>
 #include <ip_match.h>
+#include <valid_utf8_hostname.h>
+#include <midna.h>
 
 /* DNS library. */
 
@@ -1180,7 +1183,7 @@ static int reject_invalid_hostname(SMTPD_STATE *state, char *name,
     test_name = dup_if_truncate(name);
 
     /*
-     * Validate the hostname.
+     * Validate the HELO/EHLO hostname. Fix 20140706: EAI not allowed here.
      */
     if (!valid_hostname(test_name, DONT_GRIPE)
        && !valid_hostaddr(test_name, DONT_GRIPE))      /* XXX back compat */
@@ -1218,9 +1221,11 @@ static int reject_non_fqdn_hostname(SMTPD_STATE *state, char *name,
     test_name = dup_if_truncate(name);
 
     /*
-     * Validate the hostname.
+     * Validate the hostname. For backwards compatibility, permit non-ASCII
+     * names only when the client requested SMTPUTF8 support.
      */
-    if (!valid_hostname(test_name, DONT_GRIPE) || !strchr(test_name, '.'))
+    if (valid_utf8_hostname(state->flags & SMTPD_FLAG_SMTPUTF8,
+                test_name, DONT_GRIPE) == 0 || strchr(test_name, '.') == 0)
        stat = smtpd_check_reject(state, MAIL_ERROR_POLICY,
                                  var_non_fqdn_code, "5.5.2",
                         "<%s>: %s rejected: need fully-qualified hostname",
@@ -1843,9 +1848,11 @@ static int reject_non_fqdn_address(SMTPD_STATE *state, char *addr,
     test_dom = dup_if_truncate(domain);
 
     /*
-     * Validate the domain.
+     * Validate the domain. For backwards compatibility, permit non-ASCII
+     * names only when the client requested SMTPUTF8 support.
      */
-    if (!*test_dom || !valid_hostname(test_dom, DONT_GRIPE) || !strchr(test_dom, '.'))
+    if (!*test_dom || !valid_utf8_hostname(state->flags & SMTPD_FLAG_SMTPUTF8,
+                           test_dom, DONT_GRIPE) || !strchr(test_dom, '.'))
        stat = smtpd_check_reject(state, MAIL_ERROR_POLICY,
                                  var_non_fqdn_code, "4.5.2",
                          "<%s>: %s rejected: need fully-qualified address",
@@ -3399,6 +3406,7 @@ static const SMTPD_RBL_STATE *find_dnsxl_domain(SMTPD_STATE *state,
     const char *reply_addr;
     const char *byte_codes;
     const char *suffix;
+    const char *adomain;
 
     /*
      * Extract the domain, tack on the RBL domain name and query the DNS for
@@ -3416,13 +3424,27 @@ static const SMTPD_RBL_STATE *find_dnsxl_domain(SMTPD_STATE *state,
      * the name has an alphanumerical prefix. We play safe, and skip both
      * RHSBL and RHSWL queries for names ending in a numerical suffix.
      */
-    if (domain[0] == 0 || valid_hostname(domain, DONT_GRIPE) == 0)
+    if (domain[0] == 0)
        return (SMTPD_CHECK_DUNNO);
     suffix = strrchr(domain, '.');
     if (alldig(suffix == 0 ? domain : suffix + 1))
        return (SMTPD_CHECK_DUNNO);
 
-    query = vstring_alloc(100);
+    /*
+     * Fix 20140706: convert domain to ASCII.
+     * 
+     * Caution: early returns must not leak adomain.
+     */
+#ifndef NO_EAI
+    if (!allascii(domain) && (adomain = midna_utf8_to_ascii(domain)) != 0) {
+       if (msg_verbose)
+           msg_info("%s asciified to %s", domain, adomain);
+    } else
+#endif
+       adomain = domain;
+
+    if (valid_hostname(domain, DONT_GRIPE) == 0)
+       query = vstring_alloc(100);
     vstring_sprintf(query, "%s.%s", domain, rbl_domain);
     reply_addr = split_at(STR(query), '=');
     rbl = (SMTPD_RBL_STATE *) ctable_locate(smtpd_rbl_cache, STR(query));
@@ -4380,10 +4402,11 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
 
 /* smtpd_check_addr - address sanity check */
 
-int     smtpd_check_addr(const char *addr)
+int     smtpd_check_addr(SMTPD_STATE *state, const char *addr)
 {
     const RESOLVE_REPLY *resolve_reply;
     const char *myname = "smtpd_check_addr";
+    const char *domain;
 
     if (msg_verbose)
        msg_info("%s: addr=%s", myname, addr);
@@ -4398,6 +4421,18 @@ int     smtpd_check_addr(const char *addr)
     resolve_reply = smtpd_resolve_addr(addr);
     if (resolve_reply->flags & RESOLVE_FLAG_ERROR)
        return (-1);
+
+    /*
+     * Backwards compatibility: if the client does not request SMTPUTF8
+     * support, then behave like Postfix < 2.12 trivial-rewrite, and don't
+     * allow non-ASCII email domains. Historically, Postfix does not reject
+     * UTF8 etc. in the address localpart.
+     */
+    if ((state->flags & SMTPD_FLAG_SMTPUTF8) == 0
+       && (domain = strrchr(STR(resolve_reply->recipient), '@')) != 0
+       && *(domain += 1) != 0 && !allascii(domain))
+       return (-1);
+
     return (0);
 }
 
index b76a4990f4bbfbe6b0a8227fb71104fc953aa84e..fb415914d0b494924969df470a02e35ff78ef598 100644 (file)
@@ -13,7 +13,7 @@
   * External interface.
   */
 extern void smtpd_check_init(void);
-extern int smtpd_check_addr(const char *);
+extern int smtpd_check_addr(SMTPD_STATE *, const char *);
 extern char *smtpd_check_rewrite(SMTPD_STATE *);
 extern char *smtpd_check_client(SMTPD_STATE *);
 extern char *smtpd_check_helo(SMTPD_STATE *, char *);
index 3daf50b51d229cabf12cbe648ee9464dd40d191b..814ba384cd52d9c792ce54a28146e4c89a07b5fc 100644 (file)
@@ -44,7 +44,7 @@ root_tests:
 $(LIB):        $(OBJS)
        $(AR) $(ARFL) $(LIB) $?
        $(RANLIB) $(LIB)
-       $(SHLIB_LD) -o $(LIB) $(OBJS)
+       $(SHLIB_LD) -o $(LIB) $(OBJS) $(SHLIB_SYSLIBS)
 
 $(LIB_DIR)/$(LIB): $(LIB)
        cp $(LIB) $(LIB_DIR)
index 516c851d807aef0e49c782e30860d1aaf2e57e4b..80dce59978e36dce88945e94eee5766b904a010a 100644 (file)
@@ -91,6 +91,7 @@ resolve.o: ../../include/sys_defs.h
 resolve.o: ../../include/tok822.h
 resolve.o: ../../include/valid_hostname.h
 resolve.o: ../../include/valid_mailhost_addr.h
+resolve.o: ../../include/valid_utf8_hostname.h
 resolve.o: ../../include/vbuf.h
 resolve.o: ../../include/vstream.h
 resolve.o: ../../include/vstring.h
index d9a709e30fad24eed739c6b792d2aa548bee7316..f571869d4896d5c2250c8c4d72e4d0f23536a555 100644 (file)
@@ -57,7 +57,7 @@
 #include <vstream.h>
 #include <vstring_vstream.h>
 #include <split_at.h>
-#include <valid_hostname.h>
+#include <valid_utf8_hostname.h>
 #include <stringops.h>
 #include <mymalloc.h>
 
@@ -329,7 +329,6 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
            tree->head = tok822_scan(var_empty_addr, &tree->tail);
            continue;
        }
-
        /* XXX Re-resolve with @$myhostname for backwards compatibility. */
        if (domain == 0 && saved_domain == 0) {
            tok822_sub_append(tree, tok822_alloc('@', (char *) 0));
@@ -382,7 +381,8 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
     if (*rcpt_domain == '[') {
        if (!valid_mailhost_literal(rcpt_domain, DONT_GRIPE))
            *flags |= RESOLVE_FLAG_ERROR;
-    } else if (!valid_hostname(rcpt_domain, DONT_GRIPE)) {
+    } else if (!valid_utf8_hostname(var_smtputf8_enable, rcpt_domain,
+                                   DONT_GRIPE)) {
        if (var_resolve_num_dom && valid_hostaddr(rcpt_domain, DONT_GRIPE)) {
            vstring_insert(nextrcpt, rcpt_domain - STR(nextrcpt), "[", 1);
            vstring_strcat(nextrcpt, "]");
index 5a03a52f42b23a13056c094d906a66284684737c..2320099b4a355db79d957cbf04c3c7160ad72cb4 100644 (file)
@@ -33,11 +33,12 @@ SRCS        = alldig.c allprint.c argv.c argv_split.c attr_clnt.c attr_print0.c \
        write_buf.c sane_basename.c format_tv.c allspace.c \
        allascii.c load_file.c killme_after.c vstream_tweak.c \
        pass_trigger.c edit_file.c inet_windowsize.c \
-       unix_pass_fd_fix.c dict_cache.c valid_utf_8.c dict_thash.c \
+       unix_pass_fd_fix.c dict_cache.c valid_utf8_string.c dict_thash.c \
        ip_match.c nbbio.c base32_code.c dict_test.c \
        dict_fail.c msg_rate_delay.c dict_surrogate.c warn_stat.c \
        dict_sockmap.c line_number.c recv_pass_attr.c pass_accept.c \
-       poll_fd.c timecmp.c slmdb.c dict_pipe.c dict_random.c
+       poll_fd.c timecmp.c slmdb.c dict_pipe.c dict_random.c \
+       valid_utf8_hostname.c midna.c
 OBJS   = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \
        attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \
@@ -72,11 +73,12 @@ OBJS        = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        write_buf.o sane_basename.o format_tv.o allspace.o \
        allascii.o load_file.o killme_after.o vstream_tweak.o \
        pass_trigger.o edit_file.o inet_windowsize.o \
-       unix_pass_fd_fix.o dict_cache.o valid_utf_8.o dict_thash.o \
+       unix_pass_fd_fix.o dict_cache.o valid_utf8_string.o dict_thash.o \
        ip_match.o nbbio.o base32_code.o dict_test.o \
        dict_fail.o msg_rate_delay.o dict_surrogate.o warn_stat.o \
        dict_sockmap.o line_number.o recv_pass_attr.o pass_accept.o \
-       poll_fd.o timecmp.o $(NON_PLUGIN_MAP_OBJ) dict_pipe.o dict_random.o
+       poll_fd.o timecmp.o $(NON_PLUGIN_MAP_OBJ) dict_pipe.o dict_random.o \
+       valid_utf8_hostname.o midna.o
 # MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf.
 # When hard-linking these, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
 # otherwise it sets the PLUGIN_* macros.
@@ -104,7 +106,8 @@ HDRS        = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
        vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h \
        edit_file.h dict_cache.h dict_thash.h ip_match.h nbbio.h base32_code.h \
        dict_fail.h warn_stat.h dict_sockmap.h line_number.h timecmp.h \
-       slmdb.h compat_va_copy.h dict_pipe.h dict_random.h
+       slmdb.h compat_va_copy.h dict_pipe.h dict_random.h \
+       valid_utf8_hostname.h midna.h
 TESTSRC        = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
        stream_test.c dup2_pass_on_exec.c
 DEFS   = -I. -D$(SYSTYPE)
@@ -122,8 +125,8 @@ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
        attr_scan0 host_port attr_scan_plain attr_print_plain htable \
        unix_recv_fd unix_send_fd stream_recv_fd stream_send_fd hex_code \
        myaddrinfo myaddrinfo4 inet_proto sane_basename format_tv \
-       valid_utf_8 ip_match base32_code msg_rate_delay netstring \
-       vstream timecmp dict_cache
+       valid_utf8_string ip_match base32_code msg_rate_delay netstring \
+       vstream timecmp dict_cache midna
 PLUGIN_MAP_SO = $(LIB_PREFIX)pcre$(LIB_SUFFIX)
 
 LIB_DIR        = ../../lib
@@ -459,7 +462,7 @@ format_tv: $(LIB)
        $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
        mv junk $@.o
 
-valid_utf_8: $(LIB)
+valid_utf8_string: $(LIB)
        mv $@.o junk
        $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
        mv junk $@.o
@@ -499,6 +502,11 @@ dict_cache: $(LIB)
        $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
        mv junk $@.o
 
+midna: $(LIB)
+       mv $@.o junk
+       $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
+       mv junk $@.o
+
 tests: valid_hostname_test mac_expand_test dict_test unescape_test \
        hex_quote_test ctable_test inet_addr_list_test base64_code_test \
        attr_scan64_test attr_scan0_test dict_pcre_test host_port_test \
@@ -1092,11 +1100,11 @@ dict_open.o: dict_nis.h
 dict_open.o: dict_nisplus.h
 dict_open.o: dict_open.c
 dict_open.o: dict_pcre.h
+dict_open.o: dict_pipe.h
 dict_open.o: dict_random.h
 dict_open.o: dict_regexp.h
 dict_open.o: dict_sdbm.h
 dict_open.o: dict_sockmap.h
-dict_open.o: dict_pipe.h
 dict_open.o: dict_static.h
 dict_open.o: dict_tcp.h
 dict_open.o: dict_thash.h
@@ -1127,6 +1135,19 @@ dict_pcre.o: vbuf.h
 dict_pcre.o: vstream.h
 dict_pcre.o: vstring.h
 dict_pcre.o: warn_stat.h
+dict_pipe.o: argv.h
+dict_pipe.o: dict.h
+dict_pipe.o: dict_pipe.c
+dict_pipe.o: dict_pipe.h
+dict_pipe.o: htable.h
+dict_pipe.o: msg.h
+dict_pipe.o: myflock.h
+dict_pipe.o: mymalloc.h
+dict_pipe.o: stringops.h
+dict_pipe.o: sys_defs.h
+dict_pipe.o: vbuf.h
+dict_pipe.o: vstream.h
+dict_pipe.o: vstring.h
 dict_random.o: argv.h
 dict_random.o: dict.h
 dict_random.o: dict_random.c
@@ -1186,19 +1207,6 @@ dict_sockmap.o: sys_defs.h
 dict_sockmap.o: vbuf.h
 dict_sockmap.o: vstream.h
 dict_sockmap.o: vstring.h
-dict_pipe.o: argv.h
-dict_pipe.o: dict.h
-dict_pipe.o: dict_pipe.c
-dict_pipe.o: dict_pipe.h
-dict_pipe.o: htable.h
-dict_pipe.o: msg.h
-dict_pipe.o: myflock.h
-dict_pipe.o: mymalloc.h
-dict_pipe.o: stringops.h
-dict_pipe.o: sys_defs.h
-dict_pipe.o: vbuf.h
-dict_pipe.o: vstream.h
-dict_pipe.o: vstring.h
 dict_static.o: argv.h
 dict_static.o: dict.h
 dict_static.o: dict_static.c
@@ -1239,6 +1247,7 @@ dict_tcp.o: vstring.h
 dict_tcp.o: vstring_vstream.h
 dict_test.o: argv.h
 dict_test.o: dict.h
+dict_test.o: dict_db.h
 dict_test.o: dict_lmdb.h
 dict_test.o: dict_test.c
 dict_test.o: msg.h
@@ -1406,6 +1415,7 @@ host_port.o: split_at.h
 host_port.o: stringops.h
 host_port.o: sys_defs.h
 host_port.o: valid_hostname.h
+host_port.o: valid_utf8_hostname.h
 host_port.o: vbuf.h
 host_port.o: vstring.h
 htable.o: htable.c
@@ -1513,6 +1523,8 @@ load_file.o: vbuf.h
 load_file.o: vstream.h
 load_file.o: warn_stat.h
 load_lib.o: load_lib.c
+load_lib.o: load_lib.h
+load_lib.o: msg.h
 load_lib.o: sys_defs.h
 lowercase.o: lowercase.c
 lowercase.o: stringops.h
@@ -1580,6 +1592,12 @@ match_ops.o: sys_defs.h
 match_ops.o: vbuf.h
 match_ops.o: vstream.h
 match_ops.o: vstring.h
+midna.o: ctable.h
+midna.o: midna.c
+midna.o: midna.h
+midna.o: msg.h
+midna.o: mymalloc.h
+midna.o: sys_defs.h
 msg.o: msg.c
 msg.o: msg.h
 msg.o: msg_output.h
@@ -2001,11 +2019,21 @@ valid_hostname.o: valid_hostname.c
 valid_hostname.o: valid_hostname.h
 valid_hostname.o: vbuf.h
 valid_hostname.o: vstring.h
-valid_utf_8.o: stringops.h
-valid_utf_8.o: sys_defs.h
-valid_utf_8.o: valid_utf_8.c
-valid_utf_8.o: vbuf.h
-valid_utf_8.o: vstring.h
+valid_utf8_hostname.o: midna.h
+valid_utf8_hostname.o: msg.h
+valid_utf8_hostname.o: mymalloc.h
+valid_utf8_hostname.o: stringops.h
+valid_utf8_hostname.o: sys_defs.h
+valid_utf8_hostname.o: valid_hostname.h
+valid_utf8_hostname.o: valid_utf8_hostname.c
+valid_utf8_hostname.o: valid_utf8_hostname.h
+valid_utf8_hostname.o: vbuf.h
+valid_utf8_hostname.o: vstring.h
+valid_utf8_string.o: stringops.h
+valid_utf8_string.o: sys_defs.h
+valid_utf8_string.o: valid_utf8_string.c
+valid_utf8_string.o: vbuf.h
+valid_utf8_string.o: vstring.h
 vbuf.o: sys_defs.h
 vbuf.o: vbuf.c
 vbuf.o: vbuf.h
index 644d8b7d6cf37f4696e46b60ca484b158768c057..defa3b4553840921200cc924216cd8d05655dad4 100644 (file)
@@ -17,6 +17,9 @@
 /*     name or address, and the service name or port number.
 /*     The input string is modified.
 /*
+/*     Host/domain names are validated with valid_utf8_hostname(),
+/*     and host addresses are validated with valid_hostaddr().
+/*
 /*     The following input formats are understood (null means
 /*     a null pointer argument):
 /*
@@ -88,8 +91,8 @@
 
 #include <msg.h>
 #include <split_at.h>
-#include <stringops.h>
-#include <valid_hostname.h>
+#include <stringops.h>                 /* XXX temp_utf8_kludge */
+#include <valid_utf8_hostname.h>
 
 /* Global library. */
 
@@ -154,7 +157,8 @@ const char *host_port(char *buf, char **host, char *def_host,
      * Final sanity checks. We're still sloppy, allowing bare numerical
      * network addresses instead of requiring proper [ipaddress] forms.
      */
-    if (*host != def_host && !valid_hostname(*host, DONT_GRIPE)
+    if (*host != def_host 
+       && !valid_utf8_hostname(temp_utf8_kludge, *host, DONT_GRIPE)
        && !valid_hostaddr(*host, DONT_GRIPE))
        return ("valid hostname or network address required");
     if (*port != def_service && ISDIGIT(**port) && !alldig(*port))
diff --git a/postfix/src/util/midna.c b/postfix/src/util/midna.c
new file mode 100644 (file)
index 0000000..320f2d4
--- /dev/null
@@ -0,0 +1,149 @@
+/*++
+/* NAME
+/*     midna 3
+/* SUMMARY
+/*     Postfix domain name conversion
+/* SYNOPSIS
+/*     #include <midna.h>
+/*
+/*     int midna_cache_size;
+/*
+/*     const char *midna_utf8_to_ascii(
+/*     const char *name)
+/* DESCRIPTION
+/*     The functions in this module transform domain names from
+/*     or to IDNA form. The result is cached to avoid repeated
+/*     conversion of the same name.
+/*
+/*     midna_utf8_to_ascii() converts an UTF-8 domain name to
+/*     ASCII.  The result is a null pointer in case of error.
+/*
+/*     midna_cache_size specifies the size of the conversion result
+/*     cache.  This value is used only once, upon the first lookup
+/*     request.
+/* SEE ALSO
+/*     msg(3) diagnostics interface
+/* DIAGNOSTICS
+/*     Fatal errors: memory allocation problem.
+/*     Warnings: conversion error.
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Arnt Gulbrandsen
+/*
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+ /*
+  * System library.
+  */
+#include <sys_defs.h>
+#include <string.h>
+
+#ifndef NO_EAI
+#include <unicode/uidna.h>
+
+ /*
+  * Utility library.
+  */
+#include <mymalloc.h>
+#include <msg.h>
+#include <ctable.h>
+#include <midna.h>
+
+ /*
+  * Application-specific.
+  */
+#define DEF_MIDNA_CACHE_SIZE   100
+
+int midna_cache_size = DEF_MIDNA_CACHE_SIZE;
+
+/* midna_utf8_to_ascii_create - convert UTF8 domain to ASCII */
+
+static void *midna_utf8_to_ascii_create(const char *name, void *unused_context)
+{
+    const char myname[] = "midna_utf8_to_ascii_create";
+    char    buf[1024];                 /* XXX */
+    UErrorCode error = U_ZERO_ERROR;
+    UIDNAInfo info = UIDNA_INFO_INITIALIZER;
+    UIDNA  *idna;
+    int     anl;
+
+    idna = uidna_openUTS46(UIDNA_DEFAULT, &error);
+    anl = uidna_nameToASCII_UTF8(idna,
+                                name, strlen(name),
+                                buf, sizeof(buf),
+                                &info,
+                                &error);
+    uidna_close(idna);
+    if (U_SUCCESS(error) && info.errors == 0 && anl > 0) {
+       return (mystrndup(buf, anl));
+    } else {
+       msg_warn("%s: Problem translating domain \"%s\" to IDNA form: %s",
+                myname, name, u_errorName(error));
+       return (0);
+    }
+}
+
+/* midna_utf8_to_ascii_free - cache element destructor */
+
+static void midna_utf8_to_ascii_free(void *value, void *unused_context)
+{
+    if (value)
+       myfree(value);
+}
+
+/* midna_utf8_to_ascii - convert UTF8 hostname to ASCII */
+
+const char *midna_utf8_to_ascii(const char *name)
+{
+    static CTABLE *midna_utf8_to_ascii_cache = 0;
+
+    if (midna_utf8_to_ascii_cache == 0)
+       midna_utf8_to_ascii_cache = ctable_create(midna_cache_size,
+                                                 midna_utf8_to_ascii_create,
+                                                 midna_utf8_to_ascii_free,
+                                                 (void *) 0);
+    return (ctable_locate(midna_utf8_to_ascii_cache, name));
+}
+
+#ifdef TEST
+
+ /*
+  * Test program - reads hostnames from stdin, reports invalid hostnames to
+  * stderr.
+  */
+#include <stdlib.h>
+
+#include <stringops.h>                 /* XXX temp_utf8_kludge */
+#include <vstring.h>
+#include <vstream.h>
+#include <vstring_vstream.h>
+#include <msg_vstream.h>
+
+int     main(int argc, char **argv)
+{
+    VSTRING *buffer = vstring_alloc(1);
+    const char *res;
+
+    msg_vstream_init(argv[0], VSTREAM_ERR);
+    msg_verbose = 1;
+    temp_utf8_kludge = 1;
+
+    while (vstring_fgets_nonl(buffer, VSTREAM_IN)) {
+       msg_info("testing: \"%s\"", vstring_str(buffer));
+       res = midna_utf8_to_ascii(vstring_str(buffer));
+       if (res != 0)
+           msg_info("result: \"%s\"", res);
+    }
+    exit(0);
+}
+
+#endif
+
+#endif
diff --git a/postfix/src/util/midna.h b/postfix/src/util/midna.h
new file mode 100644 (file)
index 0000000..97e3978
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef _MIDNA_H_INCLUDED_
+#define _MIDNA_H_INCLUDED_
+
+/*++
+/* NAME
+/*     mail_idna 3h
+/* SUMMARY
+/*     domain name conversion
+/* SYNOPSIS
+/*     #include <mail_idna.h>
+/* DESCRIPTION
+/* .nf
+
+ /*
+  * External interface.
+  */
+extern const char *midna_utf8_to_ascii(const char *);
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
index 9e27f94d4bfae04a9ed36aaa42aed999e363b43c..1ba0731c7e1510740f4683f3dd182368116a14f8 100644 (file)
@@ -6,19 +6,24 @@
 /* SYNOPSIS
 /*     #include <stringops.h>
 /*
+/*     int     temp_utf8_kludge;
+/*
 /*     char    *printable(buffer, replacement)
 /*     char    *buffer;
 /*     int     replacement;
 /* DESCRIPTION
-/*     printable() replaces non-ASCII or non-printable characters in its input
-/*     by the given replacement.
+/*     printable() replaces non-printable characters
+/*     in its input with the given replacement.
+/*
+/*     temp_utf8_kludge controls whether UTF8 is considered printable.
+/*     By default, non-ASCII text is replaced.
 /*
 /*     Arguments:
 /* .IP buffer
 /*     The null-terminated input string.
 /* .IP replacement
 /*     Replacement value for characters in \fIbuffer\fR that do not
-/*     pass the isprint(3) test.
+/*     pass the ASCII isprint(3) test or that are not valid UTF8.
 /* LICENSE
 /* .ad
 /* .fi
 
 #include "stringops.h"
 
+int temp_utf8_kludge = 0;
+
 char   *printable(char *string, int replacement)
 {
-    char   *cp;
+    unsigned char *cp;
     int     ch;
 
-    for (cp = string; (ch = *(unsigned char *) cp) != 0; cp++)
-       if (!ISASCII(ch) || !ISPRINT(ch))
+    /*
+     * XXX Replace invalid UTF8 sequences (too short, over-long encodings,
+     * out-of-range code points, etc). See valid_utf8_string.c.
+     */
+    cp = (unsigned char *) string;
+    while ((ch = *cp) != 0) {
+       if (ISASCII(ch) && ISPRINT(ch)) {
+           /* ok */
+       } else if (temp_utf8_kludge && ch >= 194 && ch <= 254
+                  && cp[1] >= 128 && cp[1] < 192) {
+           /* UTF8; skip the rest of the bytes in the character. */
+           while (cp[1] >= 128 && cp[1] < 192)
+               cp++;
+       } else {
+           /* Not ASCII and not UTF8. */
            *cp = replacement;
+       }
+       cp++;
+    }
     return (string);
 }
index 85d2a747ecb45d7db0faf39d033f93c01f9d97dc..5b30bdaa4cf21b9ef6a4e485e87b8aedc69784ee 100644 (file)
@@ -19,6 +19,7 @@
  /*
   * External interface.
   */
+extern int temp_utf8_kludge;
 extern char *printable(char *, int);
 extern char *neuter(char *, const char *, int);
 extern char *lowercase(char *);
@@ -41,7 +42,7 @@ extern int allprint(const char *);
 extern int allspace(const char *);
 extern int allascii(const char *);
 extern const char *split_nameval(char *, char **, char **);
-extern int valid_utf_8(const char *, ssize_t);
+extern int valid_utf8_string(const char *, ssize_t);
 
 /* LICENSE
 /* .ad
diff --git a/postfix/src/util/valid_utf8_hostname.c b/postfix/src/util/valid_utf8_hostname.c
new file mode 100644 (file)
index 0000000..40bfa2c
--- /dev/null
@@ -0,0 +1,86 @@
+/*++
+/* NAME
+/*     valid_utf8_hostname 3
+/* SUMMARY
+/*     validate (maybe UTF-8) domain name
+/* SYNOPSIS
+/*     #include <valid_utf8_hostname.h>
+/*
+/*     int     valid_utf8_hostname(
+/*     int     enable_utf8,
+/*     const char *domain, 
+/*     int gripe)
+/* DESCRIPTION
+/*     valid_utf8_hostname() is a wrapper around valid_hostname().
+/*     If EAI support is compiled in, and enable_utf8 is true, the
+/*     name is converted from UTF-8 to ASCII per IDNA rules, before
+/*     invoking valid_hostname().
+/* SEE ALSO
+/*     valid_hostname(3) STD3 hostname validation.
+/* DIAGNOSTICS
+/*     Fatal errors: memory allocation problem.
+/*     Warnings: malformed domain name.
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+ /*
+  * System library.
+  */
+#include <sys_defs.h>
+
+ /*
+  * Utility library.
+  */
+#include <msg.h>
+#include <mymalloc.h>
+#include <stringops.h>
+#include <valid_hostname.h>
+#include <midna.h>
+#include <valid_utf8_hostname.h>
+
+/* valid_utf8_hostname - validate internationalized domain name */
+
+int     valid_utf8_hostname(int enable_utf8, const char *name, int gripe)
+{
+    const char myname[] = "valid_utf8_hostname";
+    const char *aname;
+    int     ret;
+
+    /*
+     * Trivial cases first.
+     */
+    if (*name == 0) {
+       if (gripe)
+           msg_warn("%s: empty domain name", myname);
+       return (0);
+    }
+
+    /*
+     * Convert domain name to ASCII form.
+     */
+#ifndef NO_EAI
+    if (enable_utf8 && !allascii(name)) {
+       if ((aname = midna_utf8_to_ascii(name)) == 0) {
+           if (gripe)
+               msg_warn("%s: malformed UTF-8 domain name", myname);
+           return (0);
+       }
+    } else
+#endif
+       aname = name;
+
+    /*
+     * Validate the name per STD3 (if the IDNA routines didn't already).
+     */
+    ret = valid_hostname(aname, gripe);
+
+    return (ret);
+}
diff --git a/postfix/src/util/valid_utf8_hostname.h b/postfix/src/util/valid_utf8_hostname.h
new file mode 100644 (file)
index 0000000..0c0b41f
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef _VALID_UTF8_HOSTNAME_H_INCLUDED_
+#define _VALID_UTF8_HOSTNAME_H_INCLUDED_
+
+/*++
+/* NAME
+/*     valid_utf8_hostname 3h
+/* SUMMARY
+/*     validate (maybe UTF-8) domain name
+/* SYNOPSIS
+/*     #include <valid_utf8_hostname.h>
+/* DESCRIPTION
+/* .nf
+
+ /*
+  * Utility library.
+  */
+#include <valid_hostname.h>
+
+ /*
+  * External interface
+  */
+extern int valid_utf8_hostname(int, const char *, int);
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
similarity index 85%
rename from postfix/src/util/valid_utf_8.c
rename to postfix/src/util/valid_utf8_string.c
index f953e63c88e9c228135a6da06b53e68d4e63421f..96b5b4db88e7c626564a7e33faa65cd8d0ff559f 100644 (file)
@@ -1,16 +1,16 @@
 /*++
 /* NAME
-/*     valid_utf_8 3
+/*     valid_utf8_string 3
 /* SUMMARY
 /*     predicate if string is valid UTF-8
 /* SYNOPSIS
 /*     #include <stringops.h>
 /*
-/*     int     valid_utf_8(str, len)
+/*     int     valid_utf8_string(str, len)
 /*     const char *str;
 /*     ssize_t len;
 /* DESCRIPTION
-/*     valid_utf_8() determines if a string satisfies the UTF-8
+/*     valid_utf8_string() determines if a string satisfies the UTF-8
 /*     definition in RFC 3629. That is, it contains proper encodings
 /*     of code points U+0000..U+10FFFF, excluding over-long encodings
 /*     and excluding U+D800..U+DFFF surrogates.
@@ -46,9 +46,9 @@
 
 #include <stringops.h>
 
-/* valid_utf_8 - validate string according to RFC 3629 */
+/* valid_utf8_string - validate string according to RFC 3629 */
 
-int     valid_utf_8(const char *str, ssize_t len)
+int     valid_utf8_string(const char *str, ssize_t len)
 {
     const unsigned char *end = (const unsigned char *) str + len;
     const unsigned char *cp;
@@ -74,7 +74,7 @@ int     valid_utf_8(const char *str, ssize_t len)
            if (UNEXPECTED(c0 < 0xc2)
                || UNEXPECTED(cp + 1 >= end)
            /* Require UTF-8 tail byte. */
-               || UNEXPECTED((ch = *++cp) < 0x80) || UNEXPECTED(ch > 0xbf))
+               || UNEXPECTED(((ch = *++cp) & 0xc0) != 0x80))
                return (0);
        }
        /* Three-byte encodings. */
@@ -85,7 +85,7 @@ int     valid_utf_8(const char *str, ssize_t len)
            /* Exclude U+D800..U+DFFF. */
                || UNEXPECTED(ch > (c0 == 0xed ? 0x9f : 0xbf))
            /* Require UTF-8 tail byte. */
-               || UNEXPECTED((ch = *++cp) < 0x80) || UNEXPECTED(ch > 0xbf))
+               || UNEXPECTED(((ch = *++cp) & 0xc0) != 0x80))
                return (0);
        }
        /* Four-byte encodings. */
@@ -96,9 +96,9 @@ int     valid_utf_8(const char *str, ssize_t len)
            /* Exclude code points above U+10FFFF. */
                || UNEXPECTED(ch > (c0 == 0xf4 ? 0x8f : 0xbf))
            /* Require UTF-8 tail byte. */
-               || UNEXPECTED((ch = *++cp) < 0x80) || UNEXPECTED(ch > 0xbf)
+               || UNEXPECTED(((ch = *++cp) & 0xc0) != 0x80)
            /* Require UTF-8 tail byte. */
-               || UNEXPECTED((ch = *++cp) < 0x80) || UNEXPECTED(ch > 0xbf))
+               || UNEXPECTED(((ch = *++cp) & 0xc0) != 0x80))
                return (0);
        }
        /* Invalid: c0 >= 0xf5 */
@@ -126,7 +126,7 @@ int     main(void)
     VSTRING *buf = vstring_alloc(1);
 
     while (vstring_get_nonl(buf, VSTREAM_IN) != VSTREAM_EOF) {
-       vstream_printf("%c", (LEN(buf) && !valid_utf_8(STR(buf), LEN(buf))) ?
+       vstream_printf("%c", (LEN(buf) && !valid_utf8_string(STR(buf), LEN(buf))) ?
                       '!' : ' ');
        vstream_fwrite(VSTREAM_OUT, STR(buf), LEN(buf));
        vstream_printf("\n");
index 9328930576b24709b843dd0f16c3b0c3d1ab6d5e..7ae6f4ed8c0381b3378d4e1364ea7d3c783290ad 100644 (file)
@@ -70,7 +70,6 @@ verify.o: ../../include/dict_ht.h
 verify.o: ../../include/dsn.h
 verify.o: ../../include/events.h
 verify.o: ../../include/htable.h
-verify.o: ../../include/int_filt.h
 verify.o: ../../include/iostuff.h
 verify.o: ../../include/mail_conf.h
 verify.o: ../../include/mail_params.h
index b4583580284412f03e76262d9f53df94285f2a0d..e60d4fae226f5c94b7550d9bc81fc47c6be948b1 100644 (file)
 /* .IP "\fBaddress_verify_sender_dependent_default_transport_maps ($sender_dependent_default_transport_maps)\fR"
 /*     Overrides the sender_dependent_default_transport_maps parameter
 /*     setting for address verification probes.
+/* SMTPUTF8 CONTROLS
+/* .ad
+/* .fi
+/*     Preliminary SMTPUTF8 support is introduced with Postfix 2.12.
+/* .IP "\fBsmtputf8_autodetect_classes (sendmail, verify)\fR"
+/*     Enable SMTPUTF8 autodetection for the specified mail origin
+/*     classes.
 /* MISCELLANEOUS CONTROLS
 /* .ad
 /* .fi
@@ -499,7 +506,7 @@ static void verify_query_service(VSTREAM *client_stream)
                msg_info("PROBE %s status=%d probed=%ld updated=%ld",
                         STR(addr), addr_status, now, updated);
            post_mail_fopen_async(make_verify_sender_addr(), STR(addr),
-                                 INT_FILT_MASK_NONE,
+                                 MAIL_SRC_MASK_VERIFY,
                                  DEL_REQ_FLAG_MTA_VRFY,
                                  (VSTRING *) 0,
                                  verify_post_mail_action,
diff --git a/postfix/utf8test.eml b/postfix/utf8test.eml
new file mode 100644 (file)
index 0000000..397990d
--- /dev/null
@@ -0,0 +1,4 @@
+To: jøran@blåbærsyltetøy.gulbrandsen.priv.no
+Subject: test
+
+Blah.
diff --git a/postfix/utf8test2.eml b/postfix/utf8test2.eml
new file mode 100644 (file)
index 0000000..268d509
--- /dev/null
@@ -0,0 +1,4 @@
+To: jøran@blåbærsyltetøy.gulbrandsen.priv.no.
+Subject: test
+
+Blah.