postfix安装 fatal: SASL per-process initialization failed 解决

本文介绍了解决Postfix邮件服务器在使用Cyrus SASL进行身份验证时出现的兼容性问题的过程。通过调整make命令参数,成功解决了因未正确指定宏定义而导致的身份验证失败及启动异常等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

make -f Makefile.init makefiles 'CCARGS=-DUSE_SASL_AUTH -L/usr/lib/sasl2 -lsasl2 -lz -lm'

make install

配置过后启动smtp看log,发现如下错误:

 

warning: unsupported SASL server implementation: cyrus

postfix/smtpd[13710]: fatal: SASL per-process initialization failed

postfix/master[13575]: warning: process /usr/libexec/postfix/smtpd pid 13710 exit status 1

postfix/master[13575]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

经过调查,原因如下:

[Incompat 20051220] The Postfix-with-Cyrus-SASL build procedure has

changed. You now need to specify -DUSE_CYRUS_SASL in addition to

-DUSE_SASL_AUTH or else you end up without any Cyrus SASL support.

The error messages are:

    unsupported SASL server implementation: cyrus

    unsupported SASL client implementation: cyrus

更换下面的make语句。

make -f Makefile.init makefiles 'CCARGS=-DUSE_CYRUS_SASL -L/usr/lib/sasl2 -lsasl2 -lz -lm'

搞定~

 

转载于:https://my.oschina.net/jing31/blog/6362

root@xzh-VirtualBox:~# sudo journalctl -u postfix -n 50 --no-pager # 查看最近50条日志 -- Logs begin at Thu 2025-02-27 22:13:42 CST, end at Mon 2025-06-02 19:23:23 CST. -- 6月 02 12:15:41 xzh-VirtualBox systemd[1]: postfix.service: Unit cannot be reloaded because it is inactive. 6月 02 12:16:04 xzh-VirtualBox systemd[1]: postfix.service: Unit cannot be reloaded because it is inactive. 6月 02 12:20:49 xzh-VirtualBox systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 12:20:49 xzh-VirtualBox postfix/postfix-script[7571]: fatal: the Postfix mail system is already running 6月 02 12:20:50 xzh-VirtualBox systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 12:20:50 xzh-VirtualBox systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 12:20:50 xzh-VirtualBox systemd[1]: Failed to start Postfix Mail Transport Agent. 6月 02 12:26:25 xzh-VirtualBox systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 12:26:25 xzh-VirtualBox postfix/postfix-script[9080]: fatal: the Postfix mail system is already running 6月 02 12:26:26 xzh-VirtualBox systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 12:26:26 xzh-VirtualBox systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 12:26:26 xzh-VirtualBox systemd[1]: Failed to start Postfix Mail Transport Agent. 6月 02 12:36:57 xzh-VirtualBox systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 12:36:57 xzh-VirtualBox postfix/postfix-script[9380]: fatal: the Postfix mail system is already running 6月 02 12:36:58 xzh-VirtualBox systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 12:36:58 xzh-VirtualBox systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 12:36:58 xzh-VirtualBox systemd[1]: Failed to start Postfix Mail Transport Agent. 6月 02 12:37:29 xzh-VirtualBox systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 12:37:29 xzh-VirtualBox postfix/postfix-script[10055]: fatal: the Postfix mail system is already running 6月 02 12:37:30 xzh-VirtualBox systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 12:37:30 xzh-VirtualBox systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 12:37:30 xzh-VirtualBox systemd[1]: Failed to start Postfix Mail Transport Agent. 6月 02 12:41:46 xzh-VirtualBox systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 12:41:46 xzh-VirtualBox postfix/postfix-script[11557]: fatal: the Postfix mail system is already running 6月 02 12:41:47 xzh-VirtualBox systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 12:41:47 xzh-VirtualBox systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 12:41:47 xzh-VirtualBox systemd[1]: Failed to start Postfix Mail Transport Agent. 6月 02 12:42:13 xzh-VirtualBox systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 12:42:13 xzh-VirtualBox postfix/postfix-script[12242]: fatal: the Postfix mail system is already running 6月 02 12:42:14 xzh-VirtualBox systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 12:42:14 xzh-VirtualBox systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 12:42:14 xzh-VirtualBox systemd[1]: Failed to start Postfix Mail Transport Agent. 6月 02 12:53:11 xzh-VirtualBox systemd[1]: postfix.service: Unit cannot be reloaded because it is inactive. 6月 02 12:54:09 xzh-VirtualBox systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 12:54:09 xzh-VirtualBox postfix/postfix-script[12307]: fatal: the Postfix mail system is already running 6月 02 12:54:10 xzh-VirtualBox systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 12:54:10 xzh-VirtualBox systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 12:54:10 xzh-VirtualBox systemd[1]: Failed to start Postfix Mail Transport Agent. 6月 02 12:54:23 xzh-VirtualBox systemd[1]: postfix.service: Unit cannot be reloaded because it is inactive. 6月 02 13:03:15 xzh-VirtualBox.xiangzouhao.asia systemd[1]: postfix.service: Unit cannot be reloaded because it is inactive. 6月 02 13:07:53 xzh-VirtualBox.xiangzouhao.asia systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 13:07:53 xzh-VirtualBox.xiangzouhao.asia postfix/postfix-script[13410]: fatal: the Postfix mail system is already running 6月 02 13:07:54 xzh-VirtualBox.xiangzouhao.asia systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 13:07:54 xzh-VirtualBox.xiangzouhao.asia systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 13:07:54 xzh-VirtualBox.xiangzouhao.asia systemd[1]: Failed to start Postfix Mail Transport Agent. 6月 02 13:13:38 xzh-VirtualBox.xiangzouhao.asia systemd[1]: Starting Postfix Mail Transport Agent... 6月 02 13:13:38 xzh-VirtualBox.xiangzouhao.asia postfix/postfix-script[14137]: fatal: the Postfix mail system is already running 6月 02 13:13:39 xzh-VirtualBox.xiangzouhao.asia systemd[1]: postfix.service: Main process exited, code=exited, status=1/FAILURE 6月 02 13:13:39 xzh-VirtualBox.xiangzouhao.asia systemd[1]: postfix.service: Failed with result 'exit-code'. 6月 02 13:13:39 xzh-VirtualBox.xiangzouhao.asia systemd[1]: Failed to start Postfix Mail Transport Agent. root@xzh-VirtualBox:~# grep -E 'fatal|panic' /var/log/mail.log May 27 23:04:37 xzh-VirtualBox postmulti[4415]: fatal: bad string length 0 < 1: mydomain = May 27 23:04:39 xzh-VirtualBox postmulti[4792]: fatal: bad string length 0 < 1: mydomain = May 29 12:39:04 xzh-VirtualBox postmulti[1393]: fatal: bad string length 0 < 1: mydomain = May 29 19:49:00 xzh-VirtualBox postfix/postfix-script[10419]: fatal: the Postfix mail system is already running May 29 19:50:45 xzh-VirtualBox postfix/postfix-script[11091]: fatal: the Postfix mail system is already running May 29 19:52:44 xzh-VirtualBox postfix/postfix-script[11794]: fatal: the Postfix mail system is already running May 29 19:56:08 xzh-VirtualBox postfix/postfix-script[12475]: fatal: the Postfix mail system is already running May 29 20:00:24 xzh-VirtualBox postfix/postfix-script[13667]: fatal: the Postfix mail system is already running Jun 2 11:23:41 xzh-VirtualBox postfix/postfix-script[1781]: fatal: the Postfix mail system is already running Jun 2 12:03:37 xzh-VirtualBox postfix/postfix-script[6009]: fatal: the Postfix mail system is already running Jun 2 12:11:33 xzh-VirtualBox postfix/postfix-script[6812]: fatal: the Postfix mail system is already running Jun 2 12:15:02 xzh-VirtualBox postfix/postfix-script[7503]: fatal: the Postfix mail system is already running Jun 2 12:16:01 xzh-VirtualBox postfix/postmap[7526]: fatal: open /etc/postfix/virtual: No such file or directory Jun 2 12:20:49 xzh-VirtualBox postfix/postfix-script[7571]: fatal: the Postfix mail system is already running Jun 2 12:26:23 xzh-VirtualBox postfix/postfix-script[8419]: fatal: the Postfix mail system is not running Jun 2 12:26:25 xzh-VirtualBox postfix/postfix-script[9080]: fatal: the Postfix mail system is already running Jun 2 12:36:57 xzh-VirtualBox postfix/postfix-script[9380]: fatal: the Postfix mail system is already running Jun 2 12:37:29 xzh-VirtualBox postfix/postfix-script[10055]: fatal: the Postfix mail system is already running Jun 2 12:41:46 xzh-VirtualBox postfix/postfix-script[11557]: fatal: the Postfix mail system is already running Jun 2 12:42:08 xzh-VirtualBox postfix/postfix-script[11578]: fatal: the Postfix mail system is not running Jun 2 12:42:13 xzh-VirtualBox postfix/postfix-script[12242]: fatal: the Postfix mail system is already running Jun 2 12:54:09 xzh-VirtualBox postfix/postfix-script[12307]: fatal: the Postfix mail system is already running Jun 2 13:07:53 xzh-VirtualBox postfix/postfix-script[13410]: fatal: the Postfix mail system is already running Jun 2 13:13:38 xzh-VirtualBox postfix/postfix-script[14137]: fatal: the Postfix mail system is already running root@xzh-VirtualBox:~#
最新发布
06-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值