FreeBSD邮件服务Postfix问题:"fatal: open database /etc/aliases.db" http://www.liulantao.com/blogs/liulantao/ [Mon Feb 4 18:43:54 CST 2008] E: What does "fatal: open database /etc/aliases.db" mean? C: "fatal: open database /etc/aliases.db" 意味着什么? E: DB files are maintained by the Berkeley DB library. The above message means one of the following things: C: DB数据库文件由Berkeley DB链接库维护。以上的消息意味着以下的几种情况之一: E: * The existing file does not have the expected file format. The cause is one of the following: C: 已存在的文件没有期望的文件格式。原因为以下情况之一: E: o The file was created by Berkeley DB version 1 and you are using version 2 or 3 (or vice versa). C: 此文件由Berkeley DB版本1所创建,而你正在使用版本2或3(反之亦然)。 E: o The file was written in "btree" format and Postfix expects "hash" format (or vice versa). C: 文件以"btree"格式写就,而Postfix需要"hash"格式(反之亦然)。 E: To fix the problem for Postfix execute the following command as root: C: 欲为Postfix修正此问题,以root用户运行以下命令: newaliases E: This creates the aliases.db in the format that Postfix expects. C: 这将以Postfix所期望的格式创建aliases.db。 E: * Or the problem could be something completely different. If the result of running newaliases is a zero-length aliases.db file, then you probably suffer from the following problem. C: 或许问题恰好完全相反。如果运行newaliases的结果是一个空aliases.db文件,那么你可能遇到的是以下的问题。 E: o Postfix was compiled with #include files for Berkeley DB version X and was linked against object library files for Berkeley DB version Y, where X and Y are different versions of the Berkeley DB library. C: Postfix编译时包含了Berkeley DB版本X的文件,而为Berkeley DB版本Y链接为目标库文件,而X与Y为Berkeley DB的不同版本。 E: The fix for this is to properly install the Berkeley DB library. For example, RedHat version 7.0 uses the Berkeley DB version 3 object library by default, but no /usr/include/db.h file is installed by default. In order to correctly build Postfix you must install the db3-devel package. C: 解决此问题的方法是适当的安装Berkeley DB库。例如,Redhat版本7.0默认使用了Berkeley DB 版本3的目标库,却没有默认安装/usr/include/db.h文件。为了正确的建立Postfix,你必须安装db3-devel文件包。 E: On a properly installed system, including the file <db.h> and linking with -ldb should access files from the same Berkeley DB library version. C: 在一个适当安装好的系统中,包含文件<db.h>并且链接以-ldb选项将会利用Berkeley DB相同版本的库文件。 参考位置:http://www.postfix.org/faq.html#noalias