Postfix 进入 3.0.0 时代，大量热辣新特性出现
Postfix Postfix 3
Postfix 3.0.0 正式版发布了，这次发布也标志着对其 2.8 版本的支持结束。


![](/data/attachment/album/201502/10/132557vy1tapcyybyqca35.png)


Postfix 2.x 系列从2003年开始发表，已经维护了十余年了。这次大版本跨越，带来了许多有趣的特性改进，主要如下：


* 增加了SMTPUTF8 支持，支持使用国际化的域名和本地地址部分，它们由 RFC 6530 及相关文档定义（即支持类似这样的邮件地址： 商务@公司.中国，支持@技术.翻墙）。该实现是基于由 CNNIC 赞助的 Arnt Gulbrandsen 所提供的代码的。SMTPUTF8 的支持还在持续开发中， 预计会在 3.1 中完成。参见 SMTPUTF8\_README 。
* 支持 Postfix 使用动态链接库和数据库插件。参见 INSTALL 查看可用选项的描述。
* 由于 3.0 和2.x 系列的一些默认值不同，因此 Postfix 提供了一种安全网机制（compatibility\_level），可以用来兼容老版本的 2.x 设置。参见 COMPATIBILITY\_README 了解更多细节。
* 支持对多个查询表的复合查询。如 pipemap:{map1,map2...} 支持多个查询表以管道方式连接起来（即前一个查询表的结果作为后一个查询表的查询条件）；而 unionmap:{map1,map2,...} 会将同样的查询发送到多个查询表，并将结果联合起来返回。
* 支持简单的伪查询表。如 inline:{key1=value1,key2=value2,...} 可以用于替代只有几个值的外部文件查询；而 randmap{value1,value2,...} 则可以从几个特定值内随机选择一个。
* 支持对DNS 查询结果和投递状态代码和信息的查表转换。典型的，可以使用 PCRE 表来修复 DNS 查询的错误或投递错误信息。参见 smtp\_dns\_reply\_filter、 smtp\_delivery\_status\_filter 和 similarly-named 等参数。
* 配置文件支持三元操作符，如 ${name?{iftrue}:{iffalse}}；比较操作符，如 ${{expr1}==${expr2}?{iftrue}:{iffalse}}；对每个过滤器/策略服务器指定超时及其它设置； master.cf 参数支持空格，输入和输出的环境变量可以包含空格，静态表查询结果可以包含空格；对 accsess(5)和 header/body\_checks(5) 的多表查询支持预期在 3.1 版本完成。
* 入站邮件会话的命令交互情况按照会话进行记录。例如，一个暴力攻击密码的机器人会记录为： "disconnect from name[addr] ehlo=1 auth=0/1 commands=1/2"，这代表着该客户端发送了一个成功的 EHLO 命令，而 AUTH 命令失败，并且没有 QUIT 即断开会话了。这些信息有助于你从大量日志中梳理出问题脉络。


更多细节信息可以参阅[发布公告](ftp://mir1.ovh.net/ftp.postfix.org/postfix-release/official/postfix-3.0.0.RELEASE_NOTES)，及源代码中附带的 README\_FILES、INSTALL 等文档。


Postfix 3.0.0 下载地址： <ftp://mir1.ovh.net/ftp.postfix.org/postfix-release/index.html> （或选择其他的镜像）。


OK
[An on-line version of this announcement will be available at
[
http://www.postfix.org/announcements/postfix-3.0.0.html](http://www.postfix.org/announcements/postfix-3.0.0.html)]

Postfix stable release 3.0.0 is available. This release ends support for Postfix 2.8.

The main changes in no particular order are:

SMTPUTF8 support for internationalized domain names and address localparts as defined in RFC 6530 and related documents. The implementation is based on code contributed by Arnt Gulbrandsen and sponsored by CNNIC. SMTPUTF8 support is a work in progress; it is expected to be completed during the Postfix 3.1 development cycle. See SMTPUTF8_README for a summary of limitations.

Support for Postfix dynamically-linked libraries and database plugins. The implementation is based on code by LaMont Jones for Debian Linux. See INSTALL for detailed descriptions of the available options.

An OPT-IN safety net for the selective adoption of new Postfix default settings. If you do nothing, the old Postfix default settings *should* remain in effect (complain to your downstream maintainer if that is not the case). See COMPATIBILITY_README for detailed descriptions of Postfix logfile messages.

Support for operations on multiple lookup tables. The pipemap:{map1,map2...} database type implements a pipeline of lookup tables where the result from one lookup table becomes a query for the next table; the unionmap:{map1,map2,...} database type sends the same query to multiple lookup tables and concatenates their results.

Support for pseudo-tables that make simple things easy to implement. The inline:{key1=value1,key2=value2,...} table avoids the need to create an external file for just a few items; and the randmap{value1,value2,...} table implements random selection from the specified values.

Table-driven transformation of DNS lookup results and of delivery agent status codes and messages. Typically, one would use a PCRE table to fix problematic DNS responses or to fix the handling of delivery errors. See smtp_dns_reply_filter, smtp_delivery_status_filter, and similarly-named parameters for other Postfix daemons.

Improved configuration file syntax with support for the ternary operator such as ${name?{iftrue}:{iffalse}}, comparison operators such as ${{expr1}==${expr2}?{iftrue}:{iffalse}}, per-Milter and per-policy server timeout and other settings, master.cf parameters that contain whitespace, import/export_environment settings that contain whitespace, and "static" table lookup results that contain whitespace. Support for multiple lookup results in access(5) and header/body_checks(5) tables is expected to be completed in the Postfix 3.1 development cycle.

Per-session command profiles, logged at the end of each inbound SMTP session. For example, a password-guessing bot is logged as "disconnect from name[addr] ehlo=1 auth=0/1 commands=1/2", meaning that the client sent one EHLO command that worked, one AUTH command that failed, and hung up without sending a QUIT command. This information is always logged, and can help to solve puzzles without verbose logging or network sniffers.

You can find the Postfix source code at the mirrors listed at
[http://www.postfix.org/](http://www.postfix.org/).