我在 Postfix 上设置了以下 header_checks
/^Received:/ IGNORE
/^X-Originating-IP:/ IGNORE
/^X-Mailer:/ IGNORE
/Message-Id:\s+<(.*?)@www.mainserver.com>/ REPLACE Message-Id: <[email protected]>
/X-Mailer-LID:/ IGNORE
/^MIME-Version:/i PREPEND Precedence: bulk
/X-Mailer-RecptId:/ IGNORE
/X-Mailer-SID:/ IGNORE
/X-Mailer-Sent-By:/ IGNORE
/List-Unsubscribe:/ IGNORE
一旦我在 中激活它们postfix/main.cf
(运行后postmap /etc/postfix/header_checks
),postfix 就会停止工作。当我尝试发送电子邮件时,我收到以下错误日志
Jun 20 03:19:26 mail postfix/pickup[6813]: F37593F946: uid=0 from=<[email protected]>
Jun 20 03:19:26 mail postfix/cleanup[6819]: warning: pcre:/etc/postfix/header_checks is unavailable. unsupported dictionary type: pcre
Jun 20 03:19:26 mail postfix/cleanup[6819]: warning: pcre:/etc/postfix/header_checks lookup error for "Received: by mail.domain.com (Postfix, from userid 0)??id F37593F946; Thu, 20 Jun 2019 03:19:26 +0200"
Jun 20 03:19:26 mail postfix/cleanup[6819]: warning: F37593F946: header_checks map lookup problem -- message not accepted, try again later
Jun 20 03:19:26 mail postfix/pickup[6813]: warning: maildrop/F27653F945: error writing F37593F946: queue file write error
Jun 20 03:19:27 mail postfix/pickup[6813]: F42373F946: uid=0 from=<[email protected]>
Jun 20 03:19:27 mail postfix/cleanup[6819]: warning: pcre:/etc/postfix/header_checks is unavailable. unsupported dictionary type: pcre
Jun 20 03:19:27 mail postfix/cleanup[6819]: warning: pcre:/etc/postfix/header_checks lookup error for "Received: by mail.domain.com (Postfix, from userid 0)??id F42373F946; Thu, 20 Jun 2019 03:12:51 +0200"
Jun 20 03:19:27 mail postfix/cleanup[6819]: warning: F42373F946: header_checks map lookup problem -- message not accepted, try again later
Jun 20 03:19:27 mail postfix/pickup[6813]: warning: maildrop/2C3F23F172: error writing F42373F946: queue file write error
Jun 20 03:19:27 mail postfix/pickup[6813]: 00EE13F946: uid=0 from=<[email protected]>
Jun 20 03:19:27 mail postfix/cleanup[6819]: warning: pcre:/etc/postfix/header_checks is unavailable. unsupported dictionary type: pcre
Jun 20 03:19:27 mail postfix/cleanup[6819]: warning: pcre:/etc/postfix/header_checks lookup error for "Received: by mail.domain.com (Postfix, from userid 0)??id 00EE13F946; Thu, 20 Jun 2019 03:13:36 +0200"
Jun 20 03:19:27 mail postfix/cleanup[6819]: warning: 00EE13F946: header_checks map lookup problem -- message not accepted, try again later
Jun 20 03:19:27 mail postfix/pickup[6813]: warning: maildrop/924363F173: error writing 00EE13F946: queue file write error
这是什么原因造成的?我相信它可以在我旧的 CentOS 6 安装上运行,但我的 Ubuntu 18.04 安装遇到了问题。
答案1
聚合酶链反应支持在 Ubuntu 中以单独的软件包形式分发。您可以后缀无需安装postfix-pcre已安装。
您可以通过列出所有可用的查找表类型来确认这是您的问题,通常您将拥有正则表达式安装但聚合酶链反应丢失的:
$ postconf -m | grep re
betree
regexp
您可以安装聚合酶链反应查找表类型使用:
sudo apt install postfix-pcre
重新开始后缀并检查日志以查找您的(现在首次加载的)地图的潜在错误:
sudo systemctl restart postfix
sudo journalctl -u [email protected]
请注意,使用postmap
更新聚合酶链反应-type 文件没有任何有用的效果。该实用程序将(当未另行指定时)采用默认数据库类型hash:
并生成.db
输出。不用于聚合酶链反应。